From 6738d954946dec4c55dc3f6c393289bfa238a63d Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 20 May 2026 20:18:31 +0000 Subject: [PATCH 1/2] feat: add support for assessment tasks in BigQuery Migration API feat: add suggestion config to translation tasks docs: update comments for various fields in MigrationWorkflow, MigrationTask, and MigrationSubtask docs: Add comment that field `create_time` in message `.google.cloud.bigquery.migration.v2.MigrationWorkflow` is output only docs: Add comment that field `last_update_time` in message `.google.cloud.bigquery.migration.v2.MigrationWorkflow` is output only docs: Fixed typo in comment for enum value `PAUSED` in enum `State` is changed docs: Link to relevant documentation in comment for field `type` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is changed docs: Add comment that field `create_time` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is output only docs: Add comment that field `last_update_time` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is output only docs: Add comment that field `resource_error_count` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is output only docs: Add comment that field `metrics` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is output only docs: Add comment that field `total_processing_error_count` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is output only docs: Add comment that field `total_resource_error_count` in message `.google.cloud.bigquery.migration.v2.MigrationTask` is output only docs: Add comment that field `resource_error_count` in message `.google.cloud.bigquery.migration.v2.MigrationSubtask` is output only docs: Add comment that field `create_time` in message `.google.cloud.bigquery.migration.v2.MigrationSubtask` is output only docs: Add comment that field `last_update_time` in message `.google.cloud.bigquery.migration.v2.MigrationSubtask` is output only docs: Add comment for field `metrics` in message `.google.cloud.bigquery.migration.v2.MigrationSubtask` is output only PiperOrigin-RevId: 918496010 Source-Link: https://github.com/googleapis/googleapis/commit/43731d5d22f8e3526ba7aa708da9d5de26043d0f Source-Link: https://github.com/googleapis/googleapis-gen/commit/1a8cf1fa69363ffbfca334d355c8a453d6eb5665 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWJpZ3F1ZXJ5LW1pZ3JhdGlvbi8uT3dsQm90LnlhbWwiLCJoIjoiMWE4Y2YxZmE2OTM2M2ZmYmZjYTMzNGQzNTVjOGE0NTNkNmViNTY2NSJ9 --- .../.eslintignore | 7 + .../.eslintrc.json | 4 + .../.gitignore | 14 + .../google-cloud-bigquery-migration/.jsdoc.js | 55 + .../.mocharc.js | 33 + .../google-cloud-bigquery-migration/.nycrc | 24 + .../google-cloud-bigquery-migration/README.md | 130 + .../migration/v2/assessment_task.proto | 55 + .../migration/v2/migration_entities.proto | 313 + .../v2/migration_error_details.proto | 64 + .../migration/v2/migration_metrics.proto | 115 + .../migration/v2/migration_service.proto | 256 + .../migration/v2/translation_config.proto | 294 + .../migration/v2/translation_details.proto | 161 + .../migration/v2/translation_suggestion.proto | 63 + .../migration/v2/translation_usability.proto | 65 + .../migration/v2alpha/assessment_task.proto | 49 + .../v2alpha/migration_entities.proto | 244 + .../v2alpha/migration_error_details.proto | 62 + .../migration/v2alpha/migration_metrics.proto | 111 + .../migration/v2alpha/migration_service.proto | 247 + .../v2alpha/translation_service.proto | 135 + .../migration/v2alpha/translation_task.proto | 207 + .../protos/protos.d.ts | 20596 ++++++ .../protos/protos.js | 53890 ++++++++++++++++ .../protos/protos.json | 5006 ++ ...ation_service.create_migration_workflow.js | 67 + ...ation_service.delete_migration_workflow.js | 62 + ...migration_service.get_migration_subtask.js | 66 + ...igration_service.get_migration_workflow.js | 66 + ...gration_service.list_migration_subtasks.js | 86 + ...ration_service.list_migration_workflows.js | 80 + ...ration_service.start_migration_workflow.js | 62 + ...ta_google.cloud.bigquery.migration.v2.json | 335 + ...ation_service.create_migration_workflow.js | 67 + ...ation_service.delete_migration_workflow.js | 62 + ...migration_service.get_migration_subtask.js | 66 + ...igration_service.get_migration_workflow.js | 66 + ...gration_service.list_migration_subtasks.js | 86 + ...ration_service.list_migration_workflows.js | 80 + ...ration_service.start_migration_workflow.js | 62 + ...ogle.cloud.bigquery.migration.v2alpha.json | 383 + ...sql_translation_service.translate_query.js | 72 + .../src/index.ts | 28 + .../src/v2/gapic_metadata.json | 101 + .../src/v2/index.ts | 19 + .../src/v2/migration_service_client.ts | 1817 + .../v2/migration_service_client_config.json | 71 + .../src/v2/migration_service_proto_list.json | 11 + .../src/v2alpha/gapic_metadata.json | 125 + .../src/v2alpha/index.ts | 20 + .../src/v2alpha/migration_service_client.ts | 1817 + .../migration_service_client_config.json | 73 + .../v2alpha/migration_service_proto_list.json | 9 + .../v2alpha/sql_translation_service_client.ts | 711 + ...sql_translation_service_client_config.json | 30 + .../sql_translation_service_proto_list.json | 9 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 32 + .../system-test/install.ts | 51 + .../test/gapic_migration_service_v2.ts | 1929 + .../test/gapic_migration_service_v2alpha.ts | 1934 + .../gapic_sql_translation_service_v2alpha.ts | 620 + .../tsconfig.json | 22 + .../webpack.config.js | 64 + 65 files changed, 93488 insertions(+) create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/.eslintignore create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/.eslintrc.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/.gitignore create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/.jsdoc.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/.mocharc.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/.nycrc create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/README.md create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/assessment_task.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_entities.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_suggestion.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/assessment_task.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_entities.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_error_details.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_metrics.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_service.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_service.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_task.proto create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/protos.d.ts create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/protos.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/protos.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.create_migration_workflow.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.delete_migration_workflow.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_subtask.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_workflow.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_subtasks.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_workflows.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.start_migration_workflow.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.create_migration_workflow.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.delete_migration_workflow.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_subtask.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_workflow.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_subtasks.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_workflows.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.start_migration_workflow.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/sql_translation_service.translate_query.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/index.ts create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2/index.ts create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client.ts create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/gapic_metadata.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/index.ts create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client.ts create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client.ts create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client_config.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_proto_list.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.js create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.ts create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/system-test/install.ts create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2.ts create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2alpha.ts create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/test/gapic_sql_translation_service_v2alpha.ts create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/tsconfig.json create mode 100644 owl-bot-staging/google-cloud-bigquery-migration/webpack.config.js diff --git a/owl-bot-staging/google-cloud-bigquery-migration/.eslintignore b/owl-bot-staging/google-cloud-bigquery-migration/.eslintignore new file mode 100644 index 000000000000..cfc348ec4d11 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/.coverage +build/ +docs/ +protos/ +system-test/ +samples/generated/ diff --git a/owl-bot-staging/google-cloud-bigquery-migration/.eslintrc.json b/owl-bot-staging/google-cloud-bigquery-migration/.eslintrc.json new file mode 100644 index 000000000000..3e8d97ccb390 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/.eslintrc.json @@ -0,0 +1,4 @@ +{ + "extends": "./node_modules/gts", + "root": true +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/.gitignore b/owl-bot-staging/google-cloud-bigquery-migration/.gitignore new file mode 100644 index 000000000000..d4f03a0df2e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/owl-bot-staging/google-cloud-bigquery-migration/.jsdoc.js b/owl-bot-staging/google-cloud-bigquery-migration/.jsdoc.js new file mode 100644 index 000000000000..11c30322277c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +'use strict'; + +module.exports = { + opts: { + readme: './README.md', + package: './package.json', + template: './node_modules/jsdoc-fresh', + recurse: true, + verbose: true, + destination: './docs/' + }, + plugins: [ + 'plugins/markdown', + 'jsdoc-region-tag' + ], + source: { + excludePattern: '(^|\\/|\\\\)[._]', + include: [ + 'build/src', + 'protos' + ], + includePattern: '\\.js$' + }, + templates: { + copyright: 'Copyright 2026 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-cloud/bigquery-migration', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/owl-bot-staging/google-cloud-bigquery-migration/.mocharc.js b/owl-bot-staging/google-cloud-bigquery-migration/.mocharc.js new file mode 100644 index 000000000000..5eb34e86c874 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/.mocharc.js @@ -0,0 +1,33 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000 +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/owl-bot-staging/google-cloud-bigquery-migration/.nycrc b/owl-bot-staging/google-cloud-bigquery-migration/.nycrc new file mode 100644 index 000000000000..81a95fc94b00 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-migration/README.md b/owl-bot-staging/google-cloud-bigquery-migration/README.md new file mode 100644 index 000000000000..da131647a246 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/README.md @@ -0,0 +1,130 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "The comments you see below are used to generate those parts of the template in later states." +Google Cloud Platform logo + +# [BigQuery Migration API: Nodejs Client][homepage] + +This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways +unless absolutely necessary (e.g. because of critical security issues) or with +an extensive deprecation period. Issues and requests against **stable** libraries +are addressed with the highest priority + +[![npm version](https://img.shields.io/npm/v/@google-cloud/bigquery-migration.svg)](https://www.npmjs.org/package/@google-cloud/bigquery-migration) + +BigQuery Migration API client for Node.js + +[//]: # "partials.introduction" + +A comprehensive list of changes in each version may be found in +[the CHANGELOG][homepage_changelog]. + +* [BigQuery Migration API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/migration/latest) + + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the BigQuery Migration API API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. +### Installing the client library + +```bash +npm install @google-cloud/bigquery-migration +``` + +[//]: # "partials.body" + +## Samples + +Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | +| --------------------------- | --------------------------------- | +| create migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/migration_service.create_migration_workflow.js) | +| delete migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/migration_service.delete_migration_workflow.js) | +| get migration subtask | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_subtask.js) | +| get migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_workflow.js) | +| list migration subtasks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_subtasks.js) | +| list migration workflows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_workflows.js) | +| start migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/migration_service.start_migration_workflow.js) | +| cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json) | +| create migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.create_migration_workflow.js) | +| delete migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.delete_migration_workflow.js) | +| get migration subtask | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_subtask.js) | +| get migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_workflow.js) | +| list migration subtasks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_subtasks.js) | +| list migration workflows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_workflows.js) | +| start migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.start_migration_workflow.js) | +| cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json) | +| translate query | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/sql_translation_service.translate_query.js) | + + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-cloud/bigquery-migration@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). + +Please note that this `README.md` +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[projects]: https://console.cloud.google.com/project +[billing]: https://support.google.com/cloud/answer/6293499#enable-billing +[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=bigquerymigration.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local +[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples +[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/CHANGELOG.md +[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/assessment_task.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/assessment_task.proto new file mode 100644 index 000000000000..2703f18c49bb --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/assessment_task.proto @@ -0,0 +1,55 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.migration.v2; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2"; +option go_package = "cloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb"; +option java_multiple_files = true; +option java_outer_classname = "AssessmentTaskProto"; +option java_package = "com.google.cloud.bigquery.migration.v2"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2"; + +// Assessment task config. +message AssessmentTaskDetails { + // Required. The Cloud Storage path for assessment input files. + string input_path = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The BigQuery dataset for output. + string output_dataset = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional Cloud Storage path to write the query logs (which is + // then used as an input path on the translation task) + string querylogs_path = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The data source or data warehouse type (eg: TERADATA/REDSHIFT) + // from which the input data is extracted. + string data_source = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A collection of additional feature flags for this assessment. + optional AssessmentFeatureHandle feature_handle = 6 + [(google.api.field_behavior) = OPTIONAL]; +} + +// User-definable feature flags for assessment tasks. +message AssessmentFeatureHandle { + // Optional. Whether to create a dataset containing non-PII data in addition + // to the output dataset. + optional bool add_shareable_dataset = 1 + [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_entities.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_entities.proto new file mode 100644 index 000000000000..775e3d426ee4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_entities.proto @@ -0,0 +1,313 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.migration.v2; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/bigquery/migration/v2/assessment_task.proto"; +import "google/cloud/bigquery/migration/v2/migration_error_details.proto"; +import "google/cloud/bigquery/migration/v2/migration_metrics.proto"; +import "google/cloud/bigquery/migration/v2/translation_config.proto"; +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"; + +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 = "MigrationEntitiesProto"; +option java_package = "com.google.cloud.bigquery.migration.v2"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2"; + +// A migration workflow which specifies what needs to be done for an EDW +// migration. +message MigrationWorkflow { + option (google.api.resource) = { + type: "bigquerymigration.googleapis.com/MigrationWorkflow" + pattern: "projects/{project}/locations/{location}/workflows/{workflow}" + }; + + // Possible migration workflow states. + enum State { + // Workflow state is unspecified. + STATE_UNSPECIFIED = 0; + + // Workflow is in draft status, i.e. tasks are not yet eligible for + // execution. + DRAFT = 1; + + // Workflow is running (i.e. tasks are eligible for execution). + RUNNING = 2; + + // Workflow is paused. Tasks currently in progress may continue, but no + // further tasks will be scheduled. + PAUSED = 3; + + // Workflow is complete. There should not be any task in a non-terminal + // state, but if they are (e.g. forced termination), they will not be + // scheduled. + COMPLETED = 4; + } + + // 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) = IDENTIFIER + ]; + + // The display name of the workflow. This can be set to give a workflow + // a descriptive name. There is no guarantee or enforcement of uniqueness. + string display_name = 6; + + // The tasks in a workflow in a named map. The name (i.e. key) has no + // meaning and is merely a convenient way to address a specific task + // in a workflow. + map tasks = 2; + + // Output only. That status of the workflow. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the workflow was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the workflow was last updated. + google.protobuf.Timestamp last_update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A single task for a migration which has details about the configuration of +// the task. +message MigrationTask { + // Possible states of a migration task. + enum State { + // The state is unspecified. + STATE_UNSPECIFIED = 0; + + // The task is waiting for orchestration. + PENDING = 1; + + // The task is assigned to an orchestrator. + ORCHESTRATING = 2; + + // The task is running, i.e. its subtasks are ready for execution. + RUNNING = 3; + + // The task is paused. Assigned subtasks can continue, but no new subtasks + // will be scheduled. + PAUSED = 4; + + // The task finished successfully. + SUCCEEDED = 5; + + // The task finished unsuccessfully. + FAILED = 6; + } + + // The details of the task. + oneof task_details { + // Task configuration for Assessment. + AssessmentTaskDetails assessment_task_details = 12; + + // Task configuration for CW Batch/Offline SQL Translation. + TranslationConfigDetails translation_config_details = 14; + + // Task details for unified SQL Translation. + TranslationDetails translation_details = 16; + } + + // Output only. Immutable. The unique identifier for the migration task. The + // ID is server-generated. + string id = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE + ]; + + // The type of the task. This must be one of the supported task types. + // + // Assessment: + // + // - `Assessment_Hive` - Assessment for Hive. + // - `Assessment_Redshift` - Assessment for Redshift. + // - `Assessment_Snowflake` - Assessment for Snowflake. + // - `Assessment_Teradata_v2` - Assessment for Teradata. + // - `Assessment_Oracle` - Assessment for Oracle. + // - `Assessment_Hadoop` - Assessment for Hadoop. + // - `Assessment_Informatica` - Assessment for Informatica. + // + // Translation: + // See [Supported Task + // Types](https://docs.cloud.google.com/bigquery/docs/api-sql-translator#supported_task_types) + // for a list of supported task types. + string type = 2; + + // Output only. The current state of the task. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. An explanation that may be populated when the task is in + // FAILED state. + google.rpc.ErrorInfo processing_error = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the task was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the task was last updated. + google.protobuf.Timestamp last_update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Provides details to errors and issues encountered while + // processing the task. Presence of error details does not mean that the task + // failed. + repeated ResourceErrorDetail resource_error_details = 17 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number or resources with errors. Note: This is not the + // total number of errors as each resource can have more than one error. This + // is used to indicate truncation by having a `resource_error_count` that is + // higher than the size of `resource_error_details`. + int32 resource_error_count = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The metrics for the task. + repeated TimeSeries metrics = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The result of the task. + MigrationTaskResult task_result = 20 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Count of all the processing errors in this task and its + // subtasks. + int32 total_processing_error_count = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Count of all the resource errors in this task and its + // subtasks. + int32 total_resource_error_count = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A subtask for a migration which carries details about the configuration of +// the subtask. The content of the details should not matter to the end user, +// but is a contract between the subtask creator and subtask worker. +message MigrationSubtask { + option (google.api.resource) = { + type: "bigquerymigration.googleapis.com/MigrationSubtask" + pattern: "projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}" + }; + + // Possible states of a migration subtask. + enum State { + // The state is unspecified. + STATE_UNSPECIFIED = 0; + + // The subtask is ready, i.e. it is ready for execution. + ACTIVE = 1; + + // The subtask is running, i.e. it is assigned to a worker for execution. + RUNNING = 2; + + // The subtask finished successfully. + SUCCEEDED = 3; + + // The subtask finished unsuccessfully. + FAILED = 4; + + // The subtask is paused, i.e., it will not be scheduled. If it was already + // assigned,it might still finish but no new lease renewals will be granted. + PAUSED = 5; + + // The subtask is pending a dependency. It will be scheduled once its + // dependencies are done. + PENDING_DEPENDENCY = 6; + } + + // Output only. Immutable. The resource name for the migration subtask. The ID + // is server-generated. + // + // Example: `projects/123/locations/us/workflows/345/subtasks/678` + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE + ]; + + // The unique ID of the task to which this subtask belongs. + string task_id = 2; + + // The type of the Subtask. The migration service does not check whether this + // is a known type. It is up to the task creator (i.e. orchestrator or worker) + // to ensure it only creates subtasks for which there are compatible workers + // polling for Subtasks. + string type = 3; + + // Output only. The current state of the subtask. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. An explanation that may be populated when the task is in + // FAILED state. + google.rpc.ErrorInfo processing_error = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Provides details to errors and issues encountered while + // processing the subtask. Presence of error details does not mean that the + // subtask failed. + repeated ResourceErrorDetail resource_error_details = 12 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The number or resources with errors. Note: This is not the + // total number of errors as each resource can have more than one error. This + // is used to indicate truncation by having a `resource_error_count` that is + // higher than the size of `resource_error_details`. + int32 resource_error_count = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the subtask was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Time when the subtask was last updated. + google.protobuf.Timestamp last_update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The metrics for the subtask. + repeated TimeSeries metrics = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// 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; + + // The Cloud Console URI for the migration workflow. + string console_uri = 3; +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto new file mode 100644 index 000000000000..4f7db8c68a06 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto @@ -0,0 +1,64 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.migration.v2; + +import "google/api/field_behavior.proto"; +import "google/rpc/error_details.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 = "MigrationErrorDetailsProto"; +option java_package = "com.google.cloud.bigquery.migration.v2"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2"; + +// Provides details for errors and the corresponding resources. +message ResourceErrorDetail { + // Required. Information about the resource where the error is located. + google.rpc.ResourceInfo resource_info = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Required. The error details for the resource. + repeated ErrorDetail error_details = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Required. How many errors there are in total for the resource. Truncation + // can be indicated by having an `error_count` that is higher than the size of + // `error_details`. + int32 error_count = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Provides details for errors, e.g. issues that where encountered when +// processing a subtask. +message ErrorDetail { + // Optional. The exact location within the resource (if applicable). + ErrorLocation location = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Describes the cause of the error with structured detail. + google.rpc.ErrorInfo error_info = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Holds information about where the error is located. +message ErrorLocation { + // Optional. If applicable, denotes the line where the error occurred. A zero + // value means that there is no line information. + int32 line = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If applicable, denotes the column where the error occurred. A + // zero value means that there is no columns information. + int32 column = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto new file mode 100644 index 000000000000..50b6e9b53632 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto @@ -0,0 +1,115 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.migration.v2; + +import "google/api/distribution.proto"; +import "google/api/field_behavior.proto"; +import "google/api/metric.proto"; +import "google/protobuf/timestamp.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 = "MigrationMetricsProto"; +option java_package = "com.google.cloud.bigquery.migration.v2"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2"; + +// The metrics object for a SubTask. +message TimeSeries { + // Required. The name of the metric. + // + // If the metric is not known by the service yet, it will be auto-created. + string metric = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The value type of the time series. + google.api.MetricDescriptor.ValueType value_type = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. The metric kind of the time series. + // + // If present, it must be the same as the metric kind of the associated + // metric. If the associated metric's descriptor must be auto-created, then + // this field specifies the metric kind of the new descriptor and must be + // either `GAUGE` (the default) or `CUMULATIVE`. + google.api.MetricDescriptor.MetricKind metric_kind = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The data points of this time series. When listing time series, + // points are returned in reverse time order. + // + // When creating a time series, this field must contain exactly one point and + // the point's type must be the same as the value type of the associated + // metric. If the associated metric's descriptor must be auto-created, then + // the value type of the descriptor is determined by the point's type, which + // must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. + repeated Point points = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// A single data point in a time series. +message Point { + // The time interval to which the data point applies. For `GAUGE` metrics, + // the start time does not need to be supplied, but if it is supplied, it must + // equal the end time. For `DELTA` metrics, the start and end time should + // specify a non-zero interval, with subsequent points specifying contiguous + // and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end + // time should specify a non-zero interval, with subsequent points specifying + // the same start time and increasing end times, until an event resets the + // cumulative value to zero and sets a new start time for the following + // points. + TimeInterval interval = 1; + + // The value of the data point. + TypedValue value = 2; +} + +// A time interval extending just after a start time through an end time. +// If the start time is the same as the end time, then the interval +// represents a single point in time. +message TimeInterval { + // Optional. The beginning of the time interval. The default value + // for the start time is the end time. The start time must not be + // later than the end time. + google.protobuf.Timestamp start_time = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Required. The end of the time interval. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// A single strongly-typed value. +message TypedValue { + // The typed value field. + oneof value { + // A Boolean value: `true` or `false`. + bool bool_value = 1; + + // A 64-bit integer. Its range is approximately `+/-9.2x10^18`. + int64 int64_value = 2; + + // A 64-bit double-precision floating-point number. Its magnitude + // is approximately `+/-10^(+/-300)` and it has 16 significant digits of + // precision. + double double_value = 3; + + // A variable-length string value. + string string_value = 4; + + // A distribution value. + google.api.Distribution distribution_value = 5; + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto new file mode 100644 index 000000000000..53032afd5780 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto @@ -0,0 +1,256 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.migration.v2; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/bigquery/migration/v2/migration_entities.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.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 = "MigrationServiceProto"; +option java_package = "com.google.cloud.bigquery.migration.v2"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2"; + +// Service to handle EDW migrations. +service MigrationService { + option (google.api.default_host) = "bigquerymigration.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a migration workflow. + rpc CreateMigrationWorkflow(CreateMigrationWorkflowRequest) + returns (MigrationWorkflow) { + option (google.api.http) = { + post: "/v2/{parent=projects/*/locations/*}/workflows" + body: "migration_workflow" + }; + option (google.api.method_signature) = "parent,migration_workflow"; + } + + // Gets a previously created migration workflow. + rpc GetMigrationWorkflow(GetMigrationWorkflowRequest) + returns (MigrationWorkflow) { + option (google.api.http) = { + get: "/v2/{name=projects/*/locations/*/workflows/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists previously created migration workflow. + rpc ListMigrationWorkflows(ListMigrationWorkflowsRequest) + returns (ListMigrationWorkflowsResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/locations/*}/workflows" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a migration workflow by name. + rpc DeleteMigrationWorkflow(DeleteMigrationWorkflowRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2/{name=projects/*/locations/*/workflows/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Starts a previously created migration workflow. I.e., the state transitions + // from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. + // An error will be signaled if the state is anything other than DRAFT or + // RUNNING. + rpc StartMigrationWorkflow(StartMigrationWorkflowRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v2/{name=projects/*/locations/*/workflows/*}:start" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets a previously created migration subtask. + rpc GetMigrationSubtask(GetMigrationSubtaskRequest) + returns (MigrationSubtask) { + option (google.api.http) = { + get: "/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists previously created migration subtasks. + rpc ListMigrationSubtasks(ListMigrationSubtasksRequest) + returns (ListMigrationSubtasksResponse) { + option (google.api.http) = { + get: "/v2/{parent=projects/*/locations/*/workflows/*}/subtasks" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request to create a migration workflow resource. +message CreateMigrationWorkflowRequest { + // Required. The name of the project to which this migration workflow belongs. + // Example: `projects/foo/locations/bar` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The migration workflow to create. + MigrationWorkflow migration_workflow = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// A request to get a previously created migration workflow. +message GetMigrationWorkflowRequest { + // Required. The unique identifier for the migration workflow. + // Example: `projects/123/locations/us/workflows/1234` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerymigration.googleapis.com/MigrationWorkflow" + } + ]; + + // The list of fields to be retrieved. + google.protobuf.FieldMask read_mask = 2; +} + +// A request to list previously created migration workflows. +message ListMigrationWorkflowsRequest { + // Required. The project and location of the migration workflows to list. + // Example: `projects/123/locations/us` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The list of fields to be retrieved. + google.protobuf.FieldMask read_mask = 2; + + // The maximum number of migration workflows to return. The service may return + // fewer than this number. + int32 page_size = 3; + + // A page token, received from previous `ListMigrationWorkflows` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListMigrationWorkflows` + // must match the call that provided the page token. + string page_token = 4; +} + +// Response object for a `ListMigrationWorkflows` call. +message ListMigrationWorkflowsResponse { + // The migration workflows for the specified project / location. + repeated MigrationWorkflow migration_workflows = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// A request to delete a previously created migration workflow. +message DeleteMigrationWorkflowRequest { + // Required. The unique identifier for the migration workflow. + // Example: `projects/123/locations/us/workflows/1234` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerymigration.googleapis.com/MigrationWorkflow" + } + ]; +} + +// A request to start a previously created migration workflow. +message StartMigrationWorkflowRequest { + // Required. The unique identifier for the migration workflow. + // Example: `projects/123/locations/us/workflows/1234` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerymigration.googleapis.com/MigrationWorkflow" + } + ]; +} + +// A request to get a previously created migration subtasks. +message GetMigrationSubtaskRequest { + // Required. The unique identifier for the migration subtask. + // Example: `projects/123/locations/us/workflows/1234/subtasks/543` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerymigration.googleapis.com/MigrationSubtask" + } + ]; + + // Optional. The list of fields to be retrieved. + google.protobuf.FieldMask read_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to list previously created migration subtasks. +message ListMigrationSubtasksRequest { + // Required. The migration task of the subtasks to list. + // Example: `projects/123/locations/us/workflows/1234` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerymigration.googleapis.com/MigrationWorkflow" + } + ]; + + // Optional. The list of fields to be retrieved. + google.protobuf.FieldMask read_mask = 2 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of migration tasks to return. The service may + // return fewer than this number. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from previous `ListMigrationSubtasks` + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListMigrationSubtasks` + // must match the call that provided the page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply. This can be used to get the subtasks of a + // specific tasks in a workflow, e.g. `migration_task = "ab012"` where + // `"ab012"` is the task ID (not the name in the named map). + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for a `ListMigrationSubtasks` call. +message ListMigrationSubtasksResponse { + // The migration subtasks for the specified task. + repeated MigrationSubtask migration_subtasks = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto new file mode 100644 index 000000000000..82bbfb9b38e8 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto @@ -0,0 +1,294 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.migration.v2; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2"; +option go_package = "cloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb"; +option java_multiple_files = true; +option java_outer_classname = "TranslationConfigProto"; +option java_package = "com.google.cloud.bigquery.migration.v2"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2"; + +// The translation config to capture necessary settings for a translation task +// and subtask. +message TranslationConfigDetails { + // The chosen path where the source for input files will be found. + oneof source_location { + // The Cloud Storage path for a directory of files to translate in a task. + string gcs_source_path = 1; + } + + // The chosen path where the destination for output files will be found. + oneof target_location { + // The Cloud Storage path to write back the corresponding input files to. + string gcs_target_path = 2; + } + + // The mapping of full SQL object names from their current state to the + // desired output. + oneof output_name_mapping { + // The mapping of objects to their desired output names in list form. + ObjectNameMappingList name_mapping_list = 5; + } + + // The dialect of the input files. + Dialect source_dialect = 3; + + // The target dialect for the engine to translate the input to. + Dialect target_dialect = 4; + + // The default source environment values for the translation. + SourceEnv source_env = 6; + + // 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. +message Dialect { + // The possible dialect options that this message represents. + oneof dialect_value { + // The BigQuery dialect + BigQueryDialect bigquery_dialect = 1; + + // The HiveQL dialect + HiveQLDialect hiveql_dialect = 2; + + // The Redshift dialect + RedshiftDialect redshift_dialect = 3; + + // The Teradata dialect + TeradataDialect teradata_dialect = 4; + + // The Oracle dialect + OracleDialect oracle_dialect = 5; + + // The SparkSQL dialect + SparkSQLDialect sparksql_dialect = 6; + + // The Snowflake dialect + SnowflakeDialect snowflake_dialect = 7; + + // The Netezza dialect + NetezzaDialect netezza_dialect = 8; + + // The Azure Synapse dialect + AzureSynapseDialect azure_synapse_dialect = 9; + + // The Vertica dialect + VerticaDialect vertica_dialect = 10; + + // The SQL Server dialect + SQLServerDialect sql_server_dialect = 11; + + // The Postgresql dialect + PostgresqlDialect postgresql_dialect = 12; + + // The Presto dialect + PrestoDialect presto_dialect = 13; + + // 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; + } +} + +// The dialect definition for BigQuery. +message BigQueryDialect {} + +// The dialect definition for HiveQL. +message HiveQLDialect {} + +// The dialect definition for Redshift. +message RedshiftDialect {} + +// The dialect definition for Teradata. +message TeradataDialect { + // The sub-dialect options for Teradata. + enum Mode { + // Unspecified mode. + MODE_UNSPECIFIED = 0; + + // Teradata SQL mode. + SQL = 1; + + // BTEQ mode (which includes SQL). + BTEQ = 2; + } + + // Which Teradata sub-dialect mode the user specifies. + Mode mode = 1; +} + +// The dialect definition for Oracle. +message OracleDialect {} + +// The dialect definition for SparkSQL. +message SparkSQLDialect {} + +// The dialect definition for Snowflake. +message SnowflakeDialect {} + +// The dialect definition for Netezza. +message NetezzaDialect {} + +// The dialect definition for Azure Synapse. +message AzureSynapseDialect {} + +// The dialect definition for Vertica. +message VerticaDialect {} + +// The dialect definition for SQL Server. +message SQLServerDialect {} + +// The dialect definition for Postgresql. +message PostgresqlDialect {} + +// The dialect definition for Presto. +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 { + // The elements of the object name map. + repeated ObjectNameMapping name_map = 1; +} + +// Represents a key-value pair of NameMappingKey to NameMappingValue to +// represent the mapping of SQL names from the input value to desired output. +message ObjectNameMapping { + // The name of the object in source that is being mapped. + NameMappingKey source = 1; + + // The desired target name of the object that is being mapped. + NameMappingValue target = 2; +} + +// The potential components of a full name mapping that will be mapped +// during translation in the source data warehouse. +message NameMappingKey { + // The type of the object that is being mapped. + enum Type { + // Unspecified name mapping type. + TYPE_UNSPECIFIED = 0; + + // The object being mapped is a database. + DATABASE = 1; + + // The object being mapped is a schema. + SCHEMA = 2; + + // The object being mapped is a relation. + RELATION = 3; + + // The object being mapped is an attribute. + ATTRIBUTE = 4; + + // The object being mapped is a relation alias. + RELATION_ALIAS = 5; + + // The object being mapped is a an attribute alias. + ATTRIBUTE_ALIAS = 6; + + // The object being mapped is a function. + FUNCTION = 7; + } + + // The type of object that is being mapped. + Type type = 1; + + // The database name (BigQuery project ID equivalent in the source data + // warehouse). + string database = 2; + + // The schema name (BigQuery dataset equivalent in the source data warehouse). + string schema = 3; + + // The relation name (BigQuery table or view equivalent in the source data + // warehouse). + string relation = 4; + + // The attribute name (BigQuery column equivalent in the source data + // warehouse). + string attribute = 5; +} + +// The potential components of a full name mapping that will be mapped +// during translation in the target data warehouse. +message NameMappingValue { + // The database name (BigQuery project ID equivalent in the target data + // warehouse). + string database = 1; + + // The schema name (BigQuery dataset equivalent in the target data warehouse). + string schema = 2; + + // The relation name (BigQuery table or view equivalent in the target data + // warehouse). + string relation = 3; + + // The attribute name (BigQuery column equivalent in the target data + // warehouse). + string attribute = 4; +} + +// Represents the default source environment values for the translation. +message SourceEnv { + // 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 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/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto new file mode 100644 index 000000000000..5737556cda17 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto @@ -0,0 +1,161 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.migration.v2; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2"; +option go_package = "cloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb"; +option java_multiple_files = true; +option java_outer_classname = "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; + + // The configuration for the suggestion if requested as a target type. + SuggestionConfig suggestion_config = 6; +} + +// The configuration for the suggestion if requested as a target type. +message SuggestionConfig { + // The list of suggestion steps to skip. + repeated SuggestionStep skip_suggestion_steps = 1; +} + +// Suggestion step to skip. +message SuggestionStep { + // Suggestion type. + enum SuggestionType { + // Suggestion type unspecified. + SUGGESTION_TYPE_UNSPECIFIED = 0; + + // Query customization. + QUERY_CUSTOMIZATION = 1; + + // Translation explanation. + TRANSLATION_EXPLANATION = 2; + } + + // The target to apply the suggestion to. + enum RewriteTarget { + // Rewrite target unspecified. + REWRITE_TARGET_UNSPECIFIED = 0; + + // Source SQL. + SOURCE_SQL = 1; + + // Target SQL. + TARGET_SQL = 2; + } + + // The type of suggestion. + SuggestionType suggestion_type = 1; + + // The rewrite target. + RewriteTarget rewrite_target = 2; +} + +// Represents one mapping from a source SQL to a target SQL. +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; + + // The path to a single source file in Cloud Storage. + string gcs_file_path = 4; + } + + // Optional. The optional field to specify the encoding of the sql bytes. + 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/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_suggestion.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_suggestion.proto new file mode 100644 index 000000000000..aaa051eb8d29 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_suggestion.proto @@ -0,0 +1,63 @@ +// Copyright 2025 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/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto new file mode 100644 index 000000000000..944a687f64de --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto @@ -0,0 +1,65 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.bigquery.migration.v2; + +import "google/api/field_behavior.proto"; +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/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/assessment_task.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/assessment_task.proto new file mode 100644 index 000000000000..ffe32100a8da --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/assessment_task.proto @@ -0,0 +1,49 @@ +// Copyright 2025 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.v2alpha; + +import "google/api/field_behavior.proto"; + +option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2Alpha"; +option go_package = "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb"; +option java_multiple_files = true; +option java_outer_classname = "AssessmentTaskProto"; +option java_package = "com.google.cloud.bigquery.migration.v2alpha"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2alpha"; + +// Assessment task config. +message AssessmentTaskDetails { + // Required. The Cloud Storage path for assessment input files. + string input_path = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The BigQuery dataset for output. + string output_dataset = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional Cloud Storage path to write the query logs (which is + // then used as an input path on the translation task) + string querylogs_path = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The data source or data warehouse type (eg: TERADATA/REDSHIFT) + // from which the input data is extracted. + string data_source = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Details for an assessment task orchestration result. +message AssessmentOrchestrationResultDetails { + // Optional. The version used for the output table schemas. + string output_tables_schema_version = 1 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_entities.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_entities.proto new file mode 100644 index 000000000000..4cd0c912d484 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_entities.proto @@ -0,0 +1,244 @@ +// Copyright 2025 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.v2alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/bigquery/migration/v2alpha/assessment_task.proto"; +import "google/cloud/bigquery/migration/v2alpha/migration_error_details.proto"; +import "google/cloud/bigquery/migration/v2alpha/migration_metrics.proto"; +import "google/cloud/bigquery/migration/v2alpha/translation_task.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/error_details.proto"; + +option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2Alpha"; +option go_package = "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb"; +option java_multiple_files = true; +option java_outer_classname = "MigrationEntitiesProto"; +option java_package = "com.google.cloud.bigquery.migration.v2alpha"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2alpha"; + +// A migration workflow which specifies what needs to be done for an EDW +// migration. +message MigrationWorkflow { + option (google.api.resource) = { + type: "bigquerymigration.googleapis.com/MigrationWorkflow" + pattern: "projects/{project}/locations/{location}/workflows/{workflow}" + }; + + // Possible migration workflow states. + enum State { + // Workflow state is unspecified. + STATE_UNSPECIFIED = 0; + + // Workflow is in draft status, i.e. tasks are not yet eligible for + // execution. + DRAFT = 1; + + // Workflow is running (i.e. tasks are eligible for execution). + RUNNING = 2; + + // Workflow is paused. Tasks currently in progress may continue, but no + // further tasks will be scheduled. + PAUSED = 3; + + // Workflow is complete. There should not be any task in a non-terminal + // state, but if they are (e.g. forced termination), they will not be + // scheduled. + COMPLETED = 4; + } + + // Output only. Immutable. 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 + ]; + + // The display name of the workflow. This can be set to give a workflow + // a descriptive name. There is no guarantee or enforcement of uniqueness. + string display_name = 6; + + // The tasks in a workflow in a named map. The name (i.e. key) has no + // meaning and is merely a convenient way to address a specific task + // in a workflow. + map tasks = 2; + + // Output only. That status of the workflow. + State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Time when the workflow was created. + google.protobuf.Timestamp create_time = 4; + + // Time when the workflow was last updated. + google.protobuf.Timestamp last_update_time = 5; +} + +// A single task for a migration which has details about the configuration of +// the task. +message MigrationTask { + // Possible states of a migration task. + enum State { + // The state is unspecified. + STATE_UNSPECIFIED = 0; + + // The task is waiting for orchestration. + PENDING = 1; + + // The task is assigned to an orchestrator. + ORCHESTRATING = 2; + + // The task is running, i.e. its subtasks are ready for execution. + RUNNING = 3; + + // Tha task is paused. Assigned subtasks can continue, but no new subtasks + // will be scheduled. + PAUSED = 4; + + // The task finished successfully. + SUCCEEDED = 5; + + // The task finished unsuccessfully. + FAILED = 6; + } + + // The details of the task. + oneof task_details { + // Task configuration for Assessment. + AssessmentTaskDetails assessment_task_details = 12; + + // Task configuration for Batch/Offline SQL Translation. + TranslationTaskDetails translation_task_details = 13; + } + + // Output only. Immutable. The unique identifier for the migration task. The ID is server-generated. + string id = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE + ]; + + // The type of the task. This must be a supported task type. + string type = 2; + + // DEPRECATED! Use one of the task_details below. + // The details of the task. The type URL must be one of the supported task + // details messages and correspond to the Task's type. + google.protobuf.Any details = 3; + + // Output only. The current state of the task. + State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. An explanation that may be populated when the task is in FAILED state. + google.rpc.ErrorInfo processing_error = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Time when the task was created. + google.protobuf.Timestamp create_time = 6; + + // Time when the task was last updated. + google.protobuf.Timestamp last_update_time = 7; + + // Output only. Additional information about the orchestration. + MigrationTaskOrchestrationResult orchestration_result = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// A subtask for a migration which carries details about the configuration of +// the subtask. The content of the details should not matter to the end user, +// but is a contract between the subtask creator and subtask worker. +message MigrationSubtask { + option (google.api.resource) = { + type: "bigquerymigration.googleapis.com/MigrationSubtask" + pattern: "projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}" + }; + + // Possible states of a migration subtask. + enum State { + // The state is unspecified. + STATE_UNSPECIFIED = 0; + + // The subtask is ready, i.e. it is ready for execution. + ACTIVE = 1; + + // The subtask is running, i.e. it is assigned to a worker for execution. + RUNNING = 2; + + // The subtask finished successfully. + SUCCEEDED = 3; + + // The subtask finished unsuccessfully. + FAILED = 4; + + // The subtask is paused, i.e., it will not be scheduled. If it was already + // assigned,it might still finish but no new lease renewals will be granted. + PAUSED = 5; + } + + // Output only. Immutable. The resource name for the migration subtask. The ID is + // server-generated. + // + // Example: `projects/123/locations/us/workflows/345/subtasks/678` + string name = 1 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE + ]; + + // The unique ID of the task to which this subtask belongs. + string task_id = 2; + + // The type of the Subtask. The migration service does not check whether this + // is a known type. It is up to the task creator (i.e. orchestrator or worker) + // to ensure it only creates subtasks for which there are compatible workers + // polling for Subtasks. + string type = 3; + + // Output only. The current state of the subtask. + State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. An explanation that may be populated when the task is in FAILED state. + google.rpc.ErrorInfo processing_error = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Provides details to errors and issues encountered while processing the + // subtask. Presence of error details does not mean that the subtask failed. + repeated ResourceErrorDetail resource_error_details = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The number or resources with errors. Note: This is not the total + // number of errors as each resource can have more than one error. + // This is used to indicate truncation by having a `resource_error_count` + // that is higher than the size of `resource_error_details`. + int32 resource_error_count = 13; + + // Time when the subtask was created. + google.protobuf.Timestamp create_time = 7; + + // Time when the subtask was last updated. + google.protobuf.Timestamp last_update_time = 8; + + // The metrics for the subtask. + repeated TimeSeries metrics = 11; +} + +// Additional information from the orchestrator when it is done with the +// task orchestration. +message MigrationTaskOrchestrationResult { + // Details specific to the task type. + oneof details { + // Details specific to assessment task types. + AssessmentOrchestrationResultDetails assessment_details = 1; + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_error_details.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_error_details.proto new file mode 100644 index 000000000000..4800e9f887ab --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_error_details.proto @@ -0,0 +1,62 @@ +// Copyright 2025 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.v2alpha; + +import "google/api/field_behavior.proto"; +import "google/rpc/error_details.proto"; + +option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2Alpha"; +option go_package = "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb"; +option java_multiple_files = true; +option java_outer_classname = "MigrationErrorDetailsProto"; +option java_package = "com.google.cloud.bigquery.migration.v2alpha"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2alpha"; + +// Provides details for errors and the corresponding resources. +message ResourceErrorDetail { + // Required. Information about the resource where the error is located. + google.rpc.ResourceInfo resource_info = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The error details for the resource. + repeated ErrorDetail error_details = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. How many errors there are in total for the resource. Truncation can be + // indicated by having an `error_count` that is higher than the size of + // `error_details`. + int32 error_count = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Provides details for errors, e.g. issues that where encountered when +// processing a subtask. +message ErrorDetail { + // Optional. The exact location within the resource (if applicable). + ErrorLocation location = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. Describes the cause of the error with structured detail. + google.rpc.ErrorInfo error_info = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Holds information about where the error is located. +message ErrorLocation { + // Optional. If applicable, denotes the line where the error occurred. A zero value + // means that there is no line information. + int32 line = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If applicable, denotes the column where the error occurred. A zero value + // means that there is no columns information. + int32 column = 2 [(google.api.field_behavior) = OPTIONAL]; +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_metrics.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_metrics.proto new file mode 100644 index 000000000000..1f0d19c46bf5 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_metrics.proto @@ -0,0 +1,111 @@ +// Copyright 2025 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.v2alpha; + +import "google/api/distribution.proto"; +import "google/api/field_behavior.proto"; +import "google/api/metric.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2Alpha"; +option go_package = "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb"; +option java_multiple_files = true; +option java_outer_classname = "MigrationMetricsProto"; +option java_package = "com.google.cloud.bigquery.migration.v2alpha"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2alpha"; + +// The metrics object for a SubTask. +message TimeSeries { + // Required. The name of the metric. + // + // If the metric is not known by the service yet, it will be auto-created. + string metric = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The value type of the time series. + google.api.MetricDescriptor.ValueType value_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The metric kind of the time series. + // + // If present, it must be the same as the metric kind of the associated + // metric. If the associated metric's descriptor must be auto-created, then + // this field specifies the metric kind of the new descriptor and must be + // either `GAUGE` (the default) or `CUMULATIVE`. + google.api.MetricDescriptor.MetricKind metric_kind = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The data points of this time series. When listing time series, points are + // returned in reverse time order. + // + // When creating a time series, this field must contain exactly one point and + // the point's type must be the same as the value type of the associated + // metric. If the associated metric's descriptor must be auto-created, then + // the value type of the descriptor is determined by the point's type, which + // must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. + repeated Point points = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// A single data point in a time series. +message Point { + // The time interval to which the data point applies. For `GAUGE` metrics, + // the start time does not need to be supplied, but if it is supplied, it must + // equal the end time. For `DELTA` metrics, the start and end time should + // specify a non-zero interval, with subsequent points specifying contiguous + // and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end + // time should specify a non-zero interval, with subsequent points specifying + // the same start time and increasing end times, until an event resets the + // cumulative value to zero and sets a new start time for the following + // points. + TimeInterval interval = 1; + + // The value of the data point. + TypedValue value = 2; +} + +// A time interval extending just after a start time through an end time. +// If the start time is the same as the end time, then the interval +// represents a single point in time. +message TimeInterval { + // Optional. The beginning of the time interval. The default value + // for the start time is the end time. The start time must not be + // later than the end time. + google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Required. The end of the time interval. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A single strongly-typed value. +message TypedValue { + // The typed value field. + oneof value { + // A Boolean value: `true` or `false`. + bool bool_value = 1; + + // A 64-bit integer. Its range is approximately +/-9.2x10^18. + int64 int64_value = 2; + + // A 64-bit double-precision floating-point number. Its magnitude + // is approximately +/-10^(+/-300) and it has 16 significant digits of + // precision. + double double_value = 3; + + // A variable-length string value. + string string_value = 4; + + // A distribution value. + google.api.Distribution distribution_value = 5; + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_service.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_service.proto new file mode 100644 index 000000000000..573be39621fa --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_service.proto @@ -0,0 +1,247 @@ +// Copyright 2025 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.v2alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/bigquery/migration/v2alpha/migration_entities.proto"; +import "google/cloud/bigquery/migration/v2alpha/migration_error_details.proto"; +import "google/cloud/bigquery/migration/v2alpha/migration_metrics.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2Alpha"; +option go_package = "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb"; +option java_multiple_files = true; +option java_outer_classname = "MigrationServiceProto"; +option java_package = "com.google.cloud.bigquery.migration.v2alpha"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2alpha"; + +// Service to handle EDW migrations. +service MigrationService { + option (google.api.default_host) = "bigquerymigration.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Creates a migration workflow. + rpc CreateMigrationWorkflow(CreateMigrationWorkflowRequest) returns (MigrationWorkflow) { + option (google.api.http) = { + post: "/v2alpha/{parent=projects/*/locations/*}/workflows" + body: "migration_workflow" + }; + option (google.api.method_signature) = "parent,migration_workflow"; + } + + // Gets a previously created migration workflow. + rpc GetMigrationWorkflow(GetMigrationWorkflowRequest) returns (MigrationWorkflow) { + option (google.api.http) = { + get: "/v2alpha/{name=projects/*/locations/*/workflows/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists previously created migration workflow. + rpc ListMigrationWorkflows(ListMigrationWorkflowsRequest) returns (ListMigrationWorkflowsResponse) { + option (google.api.http) = { + get: "/v2alpha/{parent=projects/*/locations/*}/workflows" + }; + option (google.api.method_signature) = "parent"; + } + + // Deletes a migration workflow by name. + rpc DeleteMigrationWorkflow(DeleteMigrationWorkflowRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v2alpha/{name=projects/*/locations/*/workflows/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Starts a previously created migration workflow. I.e., the state transitions + // from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. + // An error will be signaled if the state is anything other than DRAFT or + // RUNNING. + rpc StartMigrationWorkflow(StartMigrationWorkflowRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + post: "/v2alpha/{name=projects/*/locations/*/workflows/*}:start" + body: "*" + }; + option (google.api.method_signature) = "name"; + } + + // Gets a previously created migration subtask. + rpc GetMigrationSubtask(GetMigrationSubtaskRequest) returns (MigrationSubtask) { + option (google.api.http) = { + get: "/v2alpha/{name=projects/*/locations/*/workflows/*/subtasks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists previously created migration subtasks. + rpc ListMigrationSubtasks(ListMigrationSubtasksRequest) returns (ListMigrationSubtasksResponse) { + option (google.api.http) = { + get: "/v2alpha/{parent=projects/*/locations/*/workflows/*}/subtasks" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Request to create a migration workflow resource. +message CreateMigrationWorkflowRequest { + // Required. The name of the project to which this migration workflow belongs. + // Example: `projects/foo/locations/bar` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The migration workflow to create. + MigrationWorkflow migration_workflow = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// A request to get a previously created migration workflow. +message GetMigrationWorkflowRequest { + // Required. The unique identifier for the migration workflow. + // Example: `projects/123/locations/us/workflows/1234` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerymigration.googleapis.com/MigrationWorkflow" + } + ]; + + // The list of fields to be retrieved. + google.protobuf.FieldMask read_mask = 2; +} + +// A request to list previously created migration workflows. +message ListMigrationWorkflowsRequest { + // Required. The project and location of the migration workflows to list. + // Example: `projects/123/locations/us` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // The list of fields to be retrieved. + google.protobuf.FieldMask read_mask = 2; + + // The maximum number of migration workflows to return. The service may return + // fewer than this number. + int32 page_size = 3; + + // A page token, received from previous `ListMigrationWorkflows` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListMigrationWorkflows` + // must match the call that provided the page token. + string page_token = 4; +} + +// Response object for a `ListMigrationWorkflows` call. +message ListMigrationWorkflowsResponse { + // The migration workflows for the specified project / location. + repeated MigrationWorkflow migration_workflows = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// A request to delete a previously created migration workflow. +message DeleteMigrationWorkflowRequest { + // Required. The unique identifier for the migration workflow. + // Example: `projects/123/locations/us/workflows/1234` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerymigration.googleapis.com/MigrationWorkflow" + } + ]; +} + +// A request to start a previously created migration workflow. +message StartMigrationWorkflowRequest { + // Required. The unique identifier for the migration workflow. + // Example: `projects/123/locations/us/workflows/1234` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerymigration.googleapis.com/MigrationWorkflow" + } + ]; +} + +// A request to get a previously created migration subtasks. +message GetMigrationSubtaskRequest { + // Required. The unique identifier for the migration subtask. + // Example: `projects/123/locations/us/workflows/1234/subtasks/543` + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerymigration.googleapis.com/MigrationSubtask" + } + ]; + + // Optional. The list of fields to be retrieved. + google.protobuf.FieldMask read_mask = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// A request to list previously created migration subtasks. +message ListMigrationSubtasksRequest { + // Required. The migration task of the subtasks to list. + // Example: `projects/123/locations/us/workflows/1234` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "bigquerymigration.googleapis.com/MigrationWorkflow" + } + ]; + + // Optional. The list of fields to be retrieved. + google.protobuf.FieldMask read_mask = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The maximum number of migration tasks to return. The service may return + // fewer than this number. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from previous `ListMigrationSubtasks` call. + // Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to `ListMigrationSubtasks` + // must match the call that provided the page token. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The filter to apply. This can be used to get the subtasks of a specific + // tasks in a workflow, e.g. `migration_task = "ab012"` where `"ab012"` is the + // task ID (not the name in the named map). + string filter = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response object for a `ListMigrationSubtasks` call. +message ListMigrationSubtasksResponse { + // The migration subtasks for the specified task. + repeated MigrationSubtask migration_subtasks = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_service.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_service.proto new file mode 100644 index 000000000000..c40b3918b347 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_service.proto @@ -0,0 +1,135 @@ +// Copyright 2025 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.v2alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2Alpha"; +option go_package = "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb"; +option java_multiple_files = true; +option java_outer_classname = "TranslationServiceProto"; +option java_package = "com.google.cloud.bigquery.migration.v2alpha"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2alpha"; + +// Provides other SQL dialects to GoogleSQL translation operations. +service SqlTranslationService { + option (google.api.default_host) = "bigquerymigration.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; + + // Translates input queries from source dialects to GoogleSQL. + rpc TranslateQuery(TranslateQueryRequest) returns (TranslateQueryResponse) { + option (google.api.http) = { + post: "/v2alpha/{parent=projects/*/locations/*}:translateQuery" + body: "*" + }; + option (google.api.method_signature) = "parent,source_dialect,query"; + } +} + +// The request of translating a SQL query to Standard SQL. +message TranslateQueryRequest { + // Supported SQL translation source dialects. + enum SqlTranslationSourceDialect { + // SqlTranslationSourceDialect not specified. + SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED = 0; + + // Teradata SQL. + TERADATA = 1; + } + + // Required. The name of the project to which this translation request belongs. + // Example: `projects/foo/locations/bar` + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Required. The source SQL dialect of `queries`. + SqlTranslationSourceDialect source_dialect = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The query to be translated. + string query = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// The response of translating a SQL query to Standard SQL. +message TranslateQueryResponse { + // Output only. Immutable. The unique identifier for the SQL translation job. + // Example: `projects/123/locations/us/translation/1234` + string translation_job = 4 [ + (google.api.field_behavior) = OUTPUT_ONLY, + (google.api.field_behavior) = IMMUTABLE + ]; + + // The translated result. This will be empty if the translation fails. + string translated_query = 1; + + // The list of errors encountered during the translation, if present. + repeated SqlTranslationError errors = 2; + + // The list of warnings encountered during the translation, if present, + // indicates non-semantically correct translation. + repeated SqlTranslationWarning warnings = 3; +} + +// Structured error object capturing the error message and the location in the +// source text where the error occurs. +message SqlTranslationErrorDetail { + // Specifies the row from the source text where the error occurred. + int64 row = 1; + + // Specifie the column from the source texts where the error occurred. + int64 column = 2; + + // A human-readable description of the error. + string message = 3; +} + +// The detailed error object if the SQL translation job fails. +message SqlTranslationError { + // The error type of the SQL translation job. + enum SqlTranslationErrorType { + // SqlTranslationErrorType not specified. + SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED = 0; + + // Failed to parse the input text as a SQL query. + SQL_PARSE_ERROR = 1; + + // Found unsupported functions in the input SQL query that are not able to + // translate. + UNSUPPORTED_SQL_FUNCTION = 2; + } + + // The type of SQL translation error. + SqlTranslationErrorType error_type = 1; + + // Specifies the details of the error, including the error message and + // location from the source text. + SqlTranslationErrorDetail error_detail = 2; +} + +// The detailed warning object if the SQL translation job is completed but not +// semantically correct. +message SqlTranslationWarning { + // Specifies the details of the warning, including the warning message and + // location from the source text. + SqlTranslationErrorDetail warning_detail = 1; +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_task.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_task.proto new file mode 100644 index 000000000000..405ea08883e7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_task.proto @@ -0,0 +1,207 @@ +// Copyright 2025 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.v2alpha; + +option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2Alpha"; +option go_package = "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb"; +option java_multiple_files = true; +option java_outer_classname = "TranslationTaskProto"; +option java_package = "com.google.cloud.bigquery.migration.v2alpha"; +option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2alpha"; + +// Mapping between an input and output file to be translated in a subtask. +message TranslationFileMapping { + // The Cloud Storage path for a file to translation in a subtask. + string input_path = 1; + + // The Cloud Storage path to write back the corresponding input file to. + string output_path = 2; +} + +// The translation task config to capture necessary settings for a translation +// task and subtask. +message TranslationTaskDetails { + // The file encoding types. + enum FileEncoding { + // File encoding setting is not specified. + FILE_ENCODING_UNSPECIFIED = 0; + + // File encoding is UTF_8. + UTF_8 = 1; + + // File encoding is ISO_8859_1. + ISO_8859_1 = 2; + + // File encoding is US_ASCII. + US_ASCII = 3; + + // File encoding is UTF_16. + UTF_16 = 4; + + // File encoding is UTF_16LE. + UTF_16LE = 5; + + // File encoding is UTF_16BE. + UTF_16BE = 6; + } + + // The special token data type. + enum TokenType { + // Token type is not specified. + TOKEN_TYPE_UNSPECIFIED = 0; + + // Token type as string. + STRING = 1; + + // Token type as integer. + INT64 = 2; + + // Token type as numeric. + NUMERIC = 3; + + // Token type as boolean. + BOOL = 4; + + // Token type as float. + FLOAT64 = 5; + + // Token type as date. + DATE = 6; + + // Token type as timestamp. + TIMESTAMP = 7; + } + + // The language specific settings for the translation task. + oneof language_options { + // The Teradata SQL specific settings for the translation task. + TeradataOptions teradata_options = 10; + + // The BTEQ specific settings for the translation task. + BteqOptions bteq_options = 11; + } + + // The Cloud Storage path for translation input files. + string input_path = 1; + + // The Cloud Storage path for translation output files. + string output_path = 2; + + // Cloud Storage files to be processed for translation. + repeated TranslationFileMapping file_paths = 12; + + // The Cloud Storage path to DDL files as table schema to assist semantic + // translation. + string schema_path = 3; + + // The file encoding type. + FileEncoding file_encoding = 4; + + // The settings for SQL identifiers. + IdentifierSettings identifier_settings = 5; + + // The map capturing special tokens to be replaced during translation. The key + // is special token in string. The value is the token data type. This is used + // to translate SQL query template which contains special token as place + // holder. The special token makes a query invalid to parse. This map will be + // applied to annotate those special token with types to let parser understand + // how to parse them into proper structure with type information. + map special_token_map = 6; + + // The filter applied to translation details. + Filter filter = 7; + + // Specifies the exact name of the bigquery table ("dataset.table") to be used + // for surfacing raw translation errors. If the table does not exist, we will + // create it. If it already exists and the schema is the same, we will re-use. + // If the table exists and the schema is different, we will throw an error. + string translation_exception_table = 13; +} + +// The filter applied to fields of translation details. +message Filter { + // The list of prefixes used to exclude processing for input files. + repeated string input_file_exclusion_prefixes = 1; +} + +// Settings related to SQL identifiers. +message IdentifierSettings { + // The identifier case type. + enum IdentifierCase { + // The identifier case is not specified. + IDENTIFIER_CASE_UNSPECIFIED = 0; + + // Identifiers' cases will be kept as the original cases. + ORIGINAL = 1; + + // Identifiers will be in upper cases. + UPPER = 2; + + // Identifiers will be in lower cases. + LOWER = 3; + } + + // The SQL identifier rewrite mode. + enum IdentifierRewriteMode { + // SQL Identifier rewrite mode is unspecified. + IDENTIFIER_REWRITE_MODE_UNSPECIFIED = 0; + + // SQL identifiers won't be rewrite. + NONE = 1; + + // All SQL identifiers will be rewrite. + REWRITE_ALL = 2; + } + + // The setting to control output queries' identifier case. + IdentifierCase output_identifier_case = 1; + + // Specifies the rewrite mode for SQL identifiers. + IdentifierRewriteMode identifier_rewrite_mode = 2; +} + +// Teradata SQL specific translation task related settings. +message TeradataOptions { + +} + +// BTEQ translation task related settings. +message BteqOptions { + // Specifies the project and dataset in BigQuery that will be used for + // external table creation during the translation. + DatasetReference project_dataset = 1; + + // The Cloud Storage location to be used as the default path for files that + // are not otherwise specified in the file replacement map. + string default_path_uri = 2; + + // Maps the local paths that are used in BTEQ scripts (the keys) to the paths + // in Cloud Storage that should be used in their stead in the translation (the + // value). + map file_replacement_map = 3; +} + +// Reference to a BigQuery dataset. +message DatasetReference { + // A unique ID for this dataset, without the project name. The ID + // must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). + // The maximum length is 1,024 characters. + string dataset_id = 1; + + // The ID of the project containing this dataset. + string project_id = 2; +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.d.ts b/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.d.ts new file mode 100644 index 000000000000..4d0e9970c82e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.d.ts @@ -0,0 +1,20596 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +import type {protobuf as $protobuf} from "google-gax"; +import Long = require("long"); +/** Namespace google. */ +export namespace google { + + /** Namespace cloud. */ + namespace cloud { + + /** Namespace bigquery. */ + namespace bigquery { + + /** Namespace migration. */ + namespace migration { + + /** Namespace v2. */ + namespace v2 { + + /** Properties of an AssessmentTaskDetails. */ + interface IAssessmentTaskDetails { + + /** AssessmentTaskDetails inputPath */ + inputPath?: (string|null); + + /** AssessmentTaskDetails outputDataset */ + outputDataset?: (string|null); + + /** AssessmentTaskDetails querylogsPath */ + querylogsPath?: (string|null); + + /** AssessmentTaskDetails dataSource */ + dataSource?: (string|null); + + /** AssessmentTaskDetails featureHandle */ + featureHandle?: (google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null); + } + + /** Represents an AssessmentTaskDetails. */ + class AssessmentTaskDetails implements IAssessmentTaskDetails { + + /** + * Constructs a new AssessmentTaskDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails); + + /** AssessmentTaskDetails inputPath. */ + public inputPath: string; + + /** AssessmentTaskDetails outputDataset. */ + public outputDataset: string; + + /** AssessmentTaskDetails querylogsPath. */ + public querylogsPath: string; + + /** AssessmentTaskDetails dataSource. */ + public dataSource: string; + + /** AssessmentTaskDetails featureHandle. */ + public featureHandle?: (google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null); + + /** + * Creates a new AssessmentTaskDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns AssessmentTaskDetails instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; + + /** + * Encodes the specified AssessmentTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. + * @param message AssessmentTaskDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AssessmentTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. + * @param message AssessmentTaskDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AssessmentTaskDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssessmentTaskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; + + /** + * Decodes an AssessmentTaskDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssessmentTaskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; + + /** + * Verifies an AssessmentTaskDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AssessmentTaskDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssessmentTaskDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; + + /** + * Creates a plain object from an AssessmentTaskDetails message. Also converts values to other types if specified. + * @param message AssessmentTaskDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.AssessmentTaskDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AssessmentTaskDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AssessmentTaskDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AssessmentFeatureHandle. */ + interface IAssessmentFeatureHandle { + + /** AssessmentFeatureHandle addShareableDataset */ + addShareableDataset?: (boolean|null); + } + + /** Represents an AssessmentFeatureHandle. */ + class AssessmentFeatureHandle implements IAssessmentFeatureHandle { + + /** + * Constructs a new AssessmentFeatureHandle. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle); + + /** AssessmentFeatureHandle addShareableDataset. */ + public addShareableDataset?: (boolean|null); + + /** + * Creates a new AssessmentFeatureHandle instance using the specified properties. + * @param [properties] Properties to set + * @returns AssessmentFeatureHandle instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; + + /** + * Encodes the specified AssessmentFeatureHandle message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. + * @param message AssessmentFeatureHandle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AssessmentFeatureHandle message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. + * @param message AssessmentFeatureHandle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AssessmentFeatureHandle message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssessmentFeatureHandle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; + + /** + * Decodes an AssessmentFeatureHandle message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssessmentFeatureHandle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; + + /** + * Verifies an AssessmentFeatureHandle message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AssessmentFeatureHandle message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssessmentFeatureHandle + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; + + /** + * Creates a plain object from an AssessmentFeatureHandle message. Also converts values to other types if specified. + * @param message AssessmentFeatureHandle + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.AssessmentFeatureHandle, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AssessmentFeatureHandle to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AssessmentFeatureHandle + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MigrationWorkflow. */ + interface IMigrationWorkflow { + + /** MigrationWorkflow name */ + name?: (string|null); + + /** MigrationWorkflow displayName */ + displayName?: (string|null); + + /** MigrationWorkflow tasks */ + tasks?: ({ [k: string]: google.cloud.bigquery.migration.v2.IMigrationTask }|null); + + /** MigrationWorkflow state */ + state?: (google.cloud.bigquery.migration.v2.MigrationWorkflow.State|keyof typeof google.cloud.bigquery.migration.v2.MigrationWorkflow.State|null); + + /** MigrationWorkflow createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** MigrationWorkflow lastUpdateTime */ + lastUpdateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a MigrationWorkflow. */ + class MigrationWorkflow implements IMigrationWorkflow { + + /** + * Constructs a new MigrationWorkflow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IMigrationWorkflow); + + /** MigrationWorkflow name. */ + public name: string; + + /** MigrationWorkflow displayName. */ + public displayName: string; + + /** MigrationWorkflow tasks. */ + public tasks: { [k: string]: google.cloud.bigquery.migration.v2.IMigrationTask }; + + /** MigrationWorkflow state. */ + public state: (google.cloud.bigquery.migration.v2.MigrationWorkflow.State|keyof typeof google.cloud.bigquery.migration.v2.MigrationWorkflow.State); + + /** MigrationWorkflow createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** MigrationWorkflow lastUpdateTime. */ + public lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new MigrationWorkflow instance using the specified properties. + * @param [properties] Properties to set + * @returns MigrationWorkflow instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IMigrationWorkflow): google.cloud.bigquery.migration.v2.MigrationWorkflow; + + /** + * Encodes the specified MigrationWorkflow message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. + * @param message MigrationWorkflow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IMigrationWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MigrationWorkflow message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. + * @param message MigrationWorkflow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IMigrationWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MigrationWorkflow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MigrationWorkflow + * @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.MigrationWorkflow; + + /** + * Decodes a MigrationWorkflow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MigrationWorkflow + * @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.MigrationWorkflow; + + /** + * Verifies a MigrationWorkflow 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 MigrationWorkflow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MigrationWorkflow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.MigrationWorkflow; + + /** + * Creates a plain object from a MigrationWorkflow message. Also converts values to other types if specified. + * @param message MigrationWorkflow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.MigrationWorkflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MigrationWorkflow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MigrationWorkflow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MigrationWorkflow { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + DRAFT = 1, + RUNNING = 2, + PAUSED = 3, + COMPLETED = 4 + } + } + + /** Properties of a MigrationTask. */ + interface IMigrationTask { + + /** MigrationTask assessmentTaskDetails */ + assessmentTaskDetails?: (google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null); + + /** MigrationTask translationConfigDetails */ + translationConfigDetails?: (google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null); + + /** MigrationTask translationDetails */ + translationDetails?: (google.cloud.bigquery.migration.v2.ITranslationDetails|null); + + /** MigrationTask id */ + id?: (string|null); + + /** MigrationTask type */ + type?: (string|null); + + /** MigrationTask state */ + state?: (google.cloud.bigquery.migration.v2.MigrationTask.State|keyof typeof google.cloud.bigquery.migration.v2.MigrationTask.State|null); + + /** MigrationTask processingError */ + processingError?: (google.rpc.IErrorInfo|null); + + /** MigrationTask createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** 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. */ + class MigrationTask implements IMigrationTask { + + /** + * Constructs a new MigrationTask. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IMigrationTask); + + /** MigrationTask assessmentTaskDetails. */ + public assessmentTaskDetails?: (google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null); + + /** MigrationTask translationConfigDetails. */ + public translationConfigDetails?: (google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null); + + /** MigrationTask translationDetails. */ + public translationDetails?: (google.cloud.bigquery.migration.v2.ITranslationDetails|null); + + /** MigrationTask id. */ + public id: string; + + /** MigrationTask type. */ + public type: string; + + /** MigrationTask state. */ + public state: (google.cloud.bigquery.migration.v2.MigrationTask.State|keyof typeof google.cloud.bigquery.migration.v2.MigrationTask.State); + + /** MigrationTask processingError. */ + public processingError?: (google.rpc.IErrorInfo|null); + + /** MigrationTask createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** 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?: ("assessmentTaskDetails"|"translationConfigDetails"|"translationDetails"); + + /** + * Creates a new MigrationTask instance using the specified properties. + * @param [properties] Properties to set + * @returns MigrationTask instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IMigrationTask): google.cloud.bigquery.migration.v2.MigrationTask; + + /** + * Encodes the specified MigrationTask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. + * @param message MigrationTask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IMigrationTask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MigrationTask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. + * @param message MigrationTask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IMigrationTask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MigrationTask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MigrationTask + * @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.MigrationTask; + + /** + * Decodes a MigrationTask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MigrationTask + * @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.MigrationTask; + + /** + * Verifies a MigrationTask 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 MigrationTask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MigrationTask + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.MigrationTask; + + /** + * Creates a plain object from a MigrationTask message. Also converts values to other types if specified. + * @param message MigrationTask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.MigrationTask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MigrationTask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MigrationTask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MigrationTask { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PENDING = 1, + ORCHESTRATING = 2, + RUNNING = 3, + PAUSED = 4, + SUCCEEDED = 5, + FAILED = 6 + } + } + + /** Properties of a MigrationSubtask. */ + interface IMigrationSubtask { + + /** MigrationSubtask name */ + name?: (string|null); + + /** MigrationSubtask taskId */ + taskId?: (string|null); + + /** MigrationSubtask type */ + type?: (string|null); + + /** MigrationSubtask state */ + state?: (google.cloud.bigquery.migration.v2.MigrationSubtask.State|keyof typeof google.cloud.bigquery.migration.v2.MigrationSubtask.State|null); + + /** MigrationSubtask processingError */ + processingError?: (google.rpc.IErrorInfo|null); + + /** MigrationSubtask resourceErrorDetails */ + resourceErrorDetails?: (google.cloud.bigquery.migration.v2.IResourceErrorDetail[]|null); + + /** MigrationSubtask resourceErrorCount */ + resourceErrorCount?: (number|null); + + /** MigrationSubtask createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** MigrationSubtask lastUpdateTime */ + lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** MigrationSubtask metrics */ + metrics?: (google.cloud.bigquery.migration.v2.ITimeSeries[]|null); + } + + /** Represents a MigrationSubtask. */ + class MigrationSubtask implements IMigrationSubtask { + + /** + * Constructs a new MigrationSubtask. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IMigrationSubtask); + + /** MigrationSubtask name. */ + public name: string; + + /** MigrationSubtask taskId. */ + public taskId: string; + + /** MigrationSubtask type. */ + public type: string; + + /** MigrationSubtask state. */ + public state: (google.cloud.bigquery.migration.v2.MigrationSubtask.State|keyof typeof google.cloud.bigquery.migration.v2.MigrationSubtask.State); + + /** MigrationSubtask processingError. */ + public processingError?: (google.rpc.IErrorInfo|null); + + /** MigrationSubtask resourceErrorDetails. */ + public resourceErrorDetails: google.cloud.bigquery.migration.v2.IResourceErrorDetail[]; + + /** MigrationSubtask resourceErrorCount. */ + public resourceErrorCount: number; + + /** MigrationSubtask createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** MigrationSubtask lastUpdateTime. */ + public lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** MigrationSubtask metrics. */ + public metrics: google.cloud.bigquery.migration.v2.ITimeSeries[]; + + /** + * Creates a new MigrationSubtask instance using the specified properties. + * @param [properties] Properties to set + * @returns MigrationSubtask instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IMigrationSubtask): google.cloud.bigquery.migration.v2.MigrationSubtask; + + /** + * Encodes the specified MigrationSubtask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. + * @param message MigrationSubtask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IMigrationSubtask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MigrationSubtask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. + * @param message MigrationSubtask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IMigrationSubtask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MigrationSubtask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MigrationSubtask + * @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.MigrationSubtask; + + /** + * Decodes a MigrationSubtask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MigrationSubtask + * @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.MigrationSubtask; + + /** + * Verifies a MigrationSubtask 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 MigrationSubtask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MigrationSubtask + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.MigrationSubtask; + + /** + * Creates a plain object from a MigrationSubtask message. Also converts values to other types if specified. + * @param message MigrationSubtask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.MigrationSubtask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MigrationSubtask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MigrationSubtask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MigrationSubtask { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + RUNNING = 2, + SUCCEEDED = 3, + FAILED = 4, + PAUSED = 5, + PENDING_DEPENDENCY = 6 + } + } + + /** 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); + + /** TranslationTaskResult consoleUri */ + consoleUri?: (string|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[]; + + /** TranslationTaskResult consoleUri. */ + public consoleUri: string; + + /** + * 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 { + + /** ResourceErrorDetail resourceInfo */ + resourceInfo?: (google.rpc.IResourceInfo|null); + + /** ResourceErrorDetail errorDetails */ + errorDetails?: (google.cloud.bigquery.migration.v2.IErrorDetail[]|null); + + /** ResourceErrorDetail errorCount */ + errorCount?: (number|null); + } + + /** Represents a ResourceErrorDetail. */ + class ResourceErrorDetail implements IResourceErrorDetail { + + /** + * Constructs a new ResourceErrorDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IResourceErrorDetail); + + /** ResourceErrorDetail resourceInfo. */ + public resourceInfo?: (google.rpc.IResourceInfo|null); + + /** ResourceErrorDetail errorDetails. */ + public errorDetails: google.cloud.bigquery.migration.v2.IErrorDetail[]; + + /** ResourceErrorDetail errorCount. */ + public errorCount: number; + + /** + * Creates a new ResourceErrorDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceErrorDetail instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IResourceErrorDetail): google.cloud.bigquery.migration.v2.ResourceErrorDetail; + + /** + * Encodes the specified ResourceErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify|verify} messages. + * @param message ResourceErrorDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IResourceErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify|verify} messages. + * @param message ResourceErrorDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IResourceErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceErrorDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceErrorDetail + * @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.ResourceErrorDetail; + + /** + * Decodes a ResourceErrorDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceErrorDetail + * @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.ResourceErrorDetail; + + /** + * Verifies a ResourceErrorDetail 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 ResourceErrorDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceErrorDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ResourceErrorDetail; + + /** + * Creates a plain object from a ResourceErrorDetail message. Also converts values to other types if specified. + * @param message ResourceErrorDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.ResourceErrorDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceErrorDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceErrorDetail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ErrorDetail. */ + interface IErrorDetail { + + /** ErrorDetail location */ + location?: (google.cloud.bigquery.migration.v2.IErrorLocation|null); + + /** ErrorDetail errorInfo */ + errorInfo?: (google.rpc.IErrorInfo|null); + } + + /** Represents an ErrorDetail. */ + class ErrorDetail implements IErrorDetail { + + /** + * Constructs a new ErrorDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IErrorDetail); + + /** ErrorDetail location. */ + public location?: (google.cloud.bigquery.migration.v2.IErrorLocation|null); + + /** ErrorDetail errorInfo. */ + public errorInfo?: (google.rpc.IErrorInfo|null); + + /** + * Creates a new ErrorDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorDetail instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IErrorDetail): google.cloud.bigquery.migration.v2.ErrorDetail; + + /** + * Encodes the specified ErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. + * @param message ErrorDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. + * @param message ErrorDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorDetail + * @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.ErrorDetail; + + /** + * Decodes an ErrorDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorDetail + * @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.ErrorDetail; + + /** + * Verifies an ErrorDetail 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 ErrorDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ErrorDetail; + + /** + * Creates a plain object from an ErrorDetail message. Also converts values to other types if specified. + * @param message ErrorDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.ErrorDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorDetail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ErrorLocation. */ + interface IErrorLocation { + + /** ErrorLocation line */ + line?: (number|null); + + /** ErrorLocation column */ + column?: (number|null); + } + + /** Represents an ErrorLocation. */ + class ErrorLocation implements IErrorLocation { + + /** + * Constructs a new ErrorLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IErrorLocation); + + /** ErrorLocation line. */ + public line: number; + + /** ErrorLocation column. */ + public column: number; + + /** + * Creates a new ErrorLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorLocation instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IErrorLocation): google.cloud.bigquery.migration.v2.ErrorLocation; + + /** + * Encodes the specified ErrorLocation message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorLocation.verify|verify} messages. + * @param message ErrorLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IErrorLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorLocation message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorLocation.verify|verify} messages. + * @param message ErrorLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IErrorLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorLocation + * @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.ErrorLocation; + + /** + * Decodes an ErrorLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorLocation + * @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.ErrorLocation; + + /** + * Verifies an ErrorLocation 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 ErrorLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorLocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ErrorLocation; + + /** + * Creates a plain object from an ErrorLocation message. Also converts values to other types if specified. + * @param message ErrorLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.ErrorLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimeSeries. */ + interface ITimeSeries { + + /** TimeSeries metric */ + metric?: (string|null); + + /** TimeSeries valueType */ + valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); + + /** TimeSeries metricKind */ + metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); + + /** TimeSeries points */ + points?: (google.cloud.bigquery.migration.v2.IPoint[]|null); + } + + /** Represents a TimeSeries. */ + class TimeSeries implements ITimeSeries { + + /** + * Constructs a new TimeSeries. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ITimeSeries); + + /** TimeSeries metric. */ + public metric: string; + + /** TimeSeries valueType. */ + public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); + + /** TimeSeries metricKind. */ + public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); + + /** TimeSeries points. */ + public points: google.cloud.bigquery.migration.v2.IPoint[]; + + /** + * Creates a new TimeSeries instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeries instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ITimeSeries): google.cloud.bigquery.migration.v2.TimeSeries; + + /** + * Encodes the specified TimeSeries message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeSeries.verify|verify} messages. + * @param message TimeSeries message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeSeries.verify|verify} messages. + * @param message TimeSeries message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeSeries message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeries + * @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.TimeSeries; + + /** + * Decodes a TimeSeries message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeries + * @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.TimeSeries; + + /** + * Verifies a TimeSeries 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 TimeSeries message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeries + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.TimeSeries; + + /** + * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. + * @param message TimeSeries + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.TimeSeries, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeSeries to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeSeries + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Point. */ + interface IPoint { + + /** Point interval */ + interval?: (google.cloud.bigquery.migration.v2.ITimeInterval|null); + + /** Point value */ + value?: (google.cloud.bigquery.migration.v2.ITypedValue|null); + } + + /** Represents a Point. */ + class Point implements IPoint { + + /** + * Constructs a new Point. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IPoint); + + /** Point interval. */ + public interval?: (google.cloud.bigquery.migration.v2.ITimeInterval|null); + + /** Point value. */ + public value?: (google.cloud.bigquery.migration.v2.ITypedValue|null); + + /** + * Creates a new Point instance using the specified properties. + * @param [properties] Properties to set + * @returns Point instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IPoint): google.cloud.bigquery.migration.v2.Point; + + /** + * Encodes the specified Point message. Does not implicitly {@link google.cloud.bigquery.migration.v2.Point.verify|verify} messages. + * @param message Point message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Point message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.Point.verify|verify} messages. + * @param message Point message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Point message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Point + * @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.Point; + + /** + * Decodes a Point message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Point + * @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.Point; + + /** + * Verifies a Point 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 Point message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Point + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.Point; + + /** + * Creates a plain object from a Point message. Also converts values to other types if specified. + * @param message Point + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.Point, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Point to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Point + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimeInterval. */ + interface ITimeInterval { + + /** TimeInterval startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** TimeInterval endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a TimeInterval. */ + class TimeInterval implements ITimeInterval { + + /** + * Constructs a new TimeInterval. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ITimeInterval); + + /** TimeInterval startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** TimeInterval endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new TimeInterval instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeInterval instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ITimeInterval): google.cloud.bigquery.migration.v2.TimeInterval; + + /** + * Encodes the specified TimeInterval message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeInterval.verify|verify} messages. + * @param message TimeInterval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ITimeInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeInterval message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeInterval.verify|verify} messages. + * @param message TimeInterval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ITimeInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeInterval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeInterval + * @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.TimeInterval; + + /** + * Decodes a TimeInterval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeInterval + * @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.TimeInterval; + + /** + * Verifies a TimeInterval 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 TimeInterval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeInterval + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.TimeInterval; + + /** + * Creates a plain object from a TimeInterval message. Also converts values to other types if specified. + * @param message TimeInterval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.TimeInterval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeInterval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeInterval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TypedValue. */ + interface ITypedValue { + + /** TypedValue boolValue */ + boolValue?: (boolean|null); + + /** TypedValue int64Value */ + int64Value?: (number|Long|string|null); + + /** TypedValue doubleValue */ + doubleValue?: (number|null); + + /** TypedValue stringValue */ + stringValue?: (string|null); + + /** TypedValue distributionValue */ + distributionValue?: (google.api.IDistribution|null); + } + + /** Represents a TypedValue. */ + class TypedValue implements ITypedValue { + + /** + * Constructs a new TypedValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ITypedValue); + + /** TypedValue boolValue. */ + public boolValue?: (boolean|null); + + /** TypedValue int64Value. */ + public int64Value?: (number|Long|string|null); + + /** TypedValue doubleValue. */ + public doubleValue?: (number|null); + + /** TypedValue stringValue. */ + public stringValue?: (string|null); + + /** TypedValue distributionValue. */ + public distributionValue?: (google.api.IDistribution|null); + + /** TypedValue value. */ + public value?: ("boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"); + + /** + * Creates a new TypedValue instance using the specified properties. + * @param [properties] Properties to set + * @returns TypedValue instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ITypedValue): google.cloud.bigquery.migration.v2.TypedValue; + + /** + * Encodes the specified TypedValue message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TypedValue.verify|verify} messages. + * @param message TypedValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ITypedValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TypedValue message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TypedValue.verify|verify} messages. + * @param message TypedValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ITypedValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TypedValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TypedValue + * @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.TypedValue; + + /** + * Decodes a TypedValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TypedValue + * @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.TypedValue; + + /** + * Verifies a TypedValue 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 TypedValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TypedValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.TypedValue; + + /** + * Creates a plain object from a TypedValue message. Also converts values to other types if specified. + * @param message TypedValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.TypedValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TypedValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TypedValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TranslationConfigDetails. */ + interface ITranslationConfigDetails { + + /** TranslationConfigDetails gcsSourcePath */ + gcsSourcePath?: (string|null); + + /** TranslationConfigDetails gcsTargetPath */ + gcsTargetPath?: (string|null); + + /** TranslationConfigDetails nameMappingList */ + nameMappingList?: (google.cloud.bigquery.migration.v2.IObjectNameMappingList|null); + + /** TranslationConfigDetails sourceDialect */ + sourceDialect?: (google.cloud.bigquery.migration.v2.IDialect|null); + + /** TranslationConfigDetails targetDialect */ + targetDialect?: (google.cloud.bigquery.migration.v2.IDialect|null); + + /** TranslationConfigDetails sourceEnv */ + sourceEnv?: (google.cloud.bigquery.migration.v2.ISourceEnv|null); + + /** TranslationConfigDetails requestSource */ + requestSource?: (string|null); + + /** TranslationConfigDetails targetTypes */ + targetTypes?: (string[]|null); + } + + /** Represents a TranslationConfigDetails. */ + class TranslationConfigDetails implements ITranslationConfigDetails { + + /** + * Constructs a new TranslationConfigDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ITranslationConfigDetails); + + /** TranslationConfigDetails gcsSourcePath. */ + public gcsSourcePath?: (string|null); + + /** TranslationConfigDetails gcsTargetPath. */ + public gcsTargetPath?: (string|null); + + /** TranslationConfigDetails nameMappingList. */ + public nameMappingList?: (google.cloud.bigquery.migration.v2.IObjectNameMappingList|null); + + /** TranslationConfigDetails sourceDialect. */ + public sourceDialect?: (google.cloud.bigquery.migration.v2.IDialect|null); + + /** TranslationConfigDetails targetDialect. */ + public targetDialect?: (google.cloud.bigquery.migration.v2.IDialect|null); + + /** TranslationConfigDetails sourceEnv. */ + public sourceEnv?: (google.cloud.bigquery.migration.v2.ISourceEnv|null); + + /** TranslationConfigDetails requestSource. */ + public requestSource: string; + + /** TranslationConfigDetails targetTypes. */ + public targetTypes: string[]; + + /** TranslationConfigDetails sourceLocation. */ + public sourceLocation?: "gcsSourcePath"; + + /** TranslationConfigDetails targetLocation. */ + public targetLocation?: "gcsTargetPath"; + + /** TranslationConfigDetails outputNameMapping. */ + public outputNameMapping?: "nameMappingList"; + + /** + * Creates a new TranslationConfigDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns TranslationConfigDetails instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ITranslationConfigDetails): google.cloud.bigquery.migration.v2.TranslationConfigDetails; + + /** + * Encodes the specified TranslationConfigDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationConfigDetails.verify|verify} messages. + * @param message TranslationConfigDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ITranslationConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TranslationConfigDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationConfigDetails.verify|verify} messages. + * @param message TranslationConfigDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ITranslationConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TranslationConfigDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TranslationConfigDetails + * @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.TranslationConfigDetails; + + /** + * Decodes a TranslationConfigDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TranslationConfigDetails + * @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.TranslationConfigDetails; + + /** + * Verifies a TranslationConfigDetails 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 TranslationConfigDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TranslationConfigDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.TranslationConfigDetails; + + /** + * Creates a plain object from a TranslationConfigDetails message. Also converts values to other types if specified. + * @param message TranslationConfigDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.TranslationConfigDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TranslationConfigDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TranslationConfigDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Dialect. */ + interface IDialect { + + /** Dialect bigqueryDialect */ + bigqueryDialect?: (google.cloud.bigquery.migration.v2.IBigQueryDialect|null); + + /** Dialect hiveqlDialect */ + hiveqlDialect?: (google.cloud.bigquery.migration.v2.IHiveQLDialect|null); + + /** Dialect redshiftDialect */ + redshiftDialect?: (google.cloud.bigquery.migration.v2.IRedshiftDialect|null); + + /** Dialect teradataDialect */ + teradataDialect?: (google.cloud.bigquery.migration.v2.ITeradataDialect|null); + + /** Dialect oracleDialect */ + oracleDialect?: (google.cloud.bigquery.migration.v2.IOracleDialect|null); + + /** Dialect sparksqlDialect */ + sparksqlDialect?: (google.cloud.bigquery.migration.v2.ISparkSQLDialect|null); + + /** Dialect snowflakeDialect */ + snowflakeDialect?: (google.cloud.bigquery.migration.v2.ISnowflakeDialect|null); + + /** Dialect netezzaDialect */ + netezzaDialect?: (google.cloud.bigquery.migration.v2.INetezzaDialect|null); + + /** Dialect azureSynapseDialect */ + azureSynapseDialect?: (google.cloud.bigquery.migration.v2.IAzureSynapseDialect|null); + + /** Dialect verticaDialect */ + verticaDialect?: (google.cloud.bigquery.migration.v2.IVerticaDialect|null); + + /** Dialect sqlServerDialect */ + sqlServerDialect?: (google.cloud.bigquery.migration.v2.ISQLServerDialect|null); + + /** Dialect postgresqlDialect */ + postgresqlDialect?: (google.cloud.bigquery.migration.v2.IPostgresqlDialect|null); + + /** Dialect prestoDialect */ + prestoDialect?: (google.cloud.bigquery.migration.v2.IPrestoDialect|null); + + /** 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. */ + class Dialect implements IDialect { + + /** + * Constructs a new Dialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IDialect); + + /** Dialect bigqueryDialect. */ + public bigqueryDialect?: (google.cloud.bigquery.migration.v2.IBigQueryDialect|null); + + /** Dialect hiveqlDialect. */ + public hiveqlDialect?: (google.cloud.bigquery.migration.v2.IHiveQLDialect|null); + + /** Dialect redshiftDialect. */ + public redshiftDialect?: (google.cloud.bigquery.migration.v2.IRedshiftDialect|null); + + /** Dialect teradataDialect. */ + public teradataDialect?: (google.cloud.bigquery.migration.v2.ITeradataDialect|null); + + /** Dialect oracleDialect. */ + public oracleDialect?: (google.cloud.bigquery.migration.v2.IOracleDialect|null); + + /** Dialect sparksqlDialect. */ + public sparksqlDialect?: (google.cloud.bigquery.migration.v2.ISparkSQLDialect|null); + + /** Dialect snowflakeDialect. */ + public snowflakeDialect?: (google.cloud.bigquery.migration.v2.ISnowflakeDialect|null); + + /** Dialect netezzaDialect. */ + public netezzaDialect?: (google.cloud.bigquery.migration.v2.INetezzaDialect|null); + + /** Dialect azureSynapseDialect. */ + public azureSynapseDialect?: (google.cloud.bigquery.migration.v2.IAzureSynapseDialect|null); + + /** Dialect verticaDialect. */ + public verticaDialect?: (google.cloud.bigquery.migration.v2.IVerticaDialect|null); + + /** Dialect sqlServerDialect. */ + public sqlServerDialect?: (google.cloud.bigquery.migration.v2.ISQLServerDialect|null); + + /** Dialect postgresqlDialect. */ + public postgresqlDialect?: (google.cloud.bigquery.migration.v2.IPostgresqlDialect|null); + + /** Dialect prestoDialect. */ + public prestoDialect?: (google.cloud.bigquery.migration.v2.IPrestoDialect|null); + + /** 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"|"db2Dialect"|"sqliteDialect"|"greenplumDialect"); + + /** + * Creates a new Dialect instance using the specified properties. + * @param [properties] Properties to set + * @returns Dialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IDialect): google.cloud.bigquery.migration.v2.Dialect; + + /** + * Encodes the specified Dialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.Dialect.verify|verify} messages. + * @param message Dialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Dialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.Dialect.verify|verify} messages. + * @param message Dialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Dialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Dialect + * @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.Dialect; + + /** + * Decodes a Dialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Dialect + * @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.Dialect; + + /** + * Verifies a Dialect 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 Dialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Dialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.Dialect; + + /** + * Creates a plain object from a Dialect message. Also converts values to other types if specified. + * @param message Dialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.Dialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Dialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Dialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BigQueryDialect. */ + interface IBigQueryDialect { + } + + /** Represents a BigQueryDialect. */ + class BigQueryDialect implements IBigQueryDialect { + + /** + * Constructs a new BigQueryDialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IBigQueryDialect); + + /** + * Creates a new BigQueryDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns BigQueryDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IBigQueryDialect): google.cloud.bigquery.migration.v2.BigQueryDialect; + + /** + * Encodes the specified BigQueryDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.BigQueryDialect.verify|verify} messages. + * @param message BigQueryDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IBigQueryDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BigQueryDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.BigQueryDialect.verify|verify} messages. + * @param message BigQueryDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IBigQueryDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BigQueryDialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BigQueryDialect + * @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.BigQueryDialect; + + /** + * Decodes a BigQueryDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BigQueryDialect + * @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.BigQueryDialect; + + /** + * Verifies a BigQueryDialect 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 BigQueryDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BigQueryDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.BigQueryDialect; + + /** + * Creates a plain object from a BigQueryDialect message. Also converts values to other types if specified. + * @param message BigQueryDialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.BigQueryDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BigQueryDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BigQueryDialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HiveQLDialect. */ + interface IHiveQLDialect { + } + + /** Represents a HiveQLDialect. */ + class HiveQLDialect implements IHiveQLDialect { + + /** + * Constructs a new HiveQLDialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IHiveQLDialect); + + /** + * Creates a new HiveQLDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns HiveQLDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IHiveQLDialect): google.cloud.bigquery.migration.v2.HiveQLDialect; + + /** + * Encodes the specified HiveQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. + * @param message HiveQLDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IHiveQLDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HiveQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. + * @param message HiveQLDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IHiveQLDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HiveQLDialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HiveQLDialect + * @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.HiveQLDialect; + + /** + * Decodes a HiveQLDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HiveQLDialect + * @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.HiveQLDialect; + + /** + * Verifies a HiveQLDialect 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 HiveQLDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HiveQLDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.HiveQLDialect; + + /** + * Creates a plain object from a HiveQLDialect message. Also converts values to other types if specified. + * @param message HiveQLDialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.HiveQLDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HiveQLDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HiveQLDialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RedshiftDialect. */ + interface IRedshiftDialect { + } + + /** Represents a RedshiftDialect. */ + class RedshiftDialect implements IRedshiftDialect { + + /** + * Constructs a new RedshiftDialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IRedshiftDialect); + + /** + * Creates a new RedshiftDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns RedshiftDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IRedshiftDialect): google.cloud.bigquery.migration.v2.RedshiftDialect; + + /** + * Encodes the specified RedshiftDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.RedshiftDialect.verify|verify} messages. + * @param message RedshiftDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IRedshiftDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RedshiftDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.RedshiftDialect.verify|verify} messages. + * @param message RedshiftDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IRedshiftDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RedshiftDialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RedshiftDialect + * @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.RedshiftDialect; + + /** + * Decodes a RedshiftDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RedshiftDialect + * @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.RedshiftDialect; + + /** + * Verifies a RedshiftDialect 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 RedshiftDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RedshiftDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.RedshiftDialect; + + /** + * Creates a plain object from a RedshiftDialect message. Also converts values to other types if specified. + * @param message RedshiftDialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.RedshiftDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RedshiftDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RedshiftDialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TeradataDialect. */ + interface ITeradataDialect { + + /** TeradataDialect mode */ + mode?: (google.cloud.bigquery.migration.v2.TeradataDialect.Mode|keyof typeof google.cloud.bigquery.migration.v2.TeradataDialect.Mode|null); + } + + /** Represents a TeradataDialect. */ + class TeradataDialect implements ITeradataDialect { + + /** + * Constructs a new TeradataDialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ITeradataDialect); + + /** TeradataDialect mode. */ + public mode: (google.cloud.bigquery.migration.v2.TeradataDialect.Mode|keyof typeof google.cloud.bigquery.migration.v2.TeradataDialect.Mode); + + /** + * Creates a new TeradataDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns TeradataDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ITeradataDialect): google.cloud.bigquery.migration.v2.TeradataDialect; + + /** + * Encodes the specified TeradataDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TeradataDialect.verify|verify} messages. + * @param message TeradataDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ITeradataDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TeradataDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TeradataDialect.verify|verify} messages. + * @param message TeradataDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ITeradataDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TeradataDialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TeradataDialect + * @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.TeradataDialect; + + /** + * Decodes a TeradataDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TeradataDialect + * @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.TeradataDialect; + + /** + * Verifies a TeradataDialect 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 TeradataDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TeradataDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.TeradataDialect; + + /** + * Creates a plain object from a TeradataDialect message. Also converts values to other types if specified. + * @param message TeradataDialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.TeradataDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TeradataDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TeradataDialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TeradataDialect { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + SQL = 1, + BTEQ = 2 + } + } + + /** Properties of an OracleDialect. */ + interface IOracleDialect { + } + + /** Represents an OracleDialect. */ + class OracleDialect implements IOracleDialect { + + /** + * Constructs a new OracleDialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IOracleDialect); + + /** + * Creates a new OracleDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns OracleDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IOracleDialect): google.cloud.bigquery.migration.v2.OracleDialect; + + /** + * Encodes the specified OracleDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.OracleDialect.verify|verify} messages. + * @param message OracleDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IOracleDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OracleDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.OracleDialect.verify|verify} messages. + * @param message OracleDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IOracleDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OracleDialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OracleDialect + * @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.OracleDialect; + + /** + * Decodes an OracleDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OracleDialect + * @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.OracleDialect; + + /** + * Verifies an OracleDialect 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 OracleDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OracleDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.OracleDialect; + + /** + * Creates a plain object from an OracleDialect message. Also converts values to other types if specified. + * @param message OracleDialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.OracleDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OracleDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OracleDialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SparkSQLDialect. */ + interface ISparkSQLDialect { + } + + /** Represents a SparkSQLDialect. */ + class SparkSQLDialect implements ISparkSQLDialect { + + /** + * Constructs a new SparkSQLDialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ISparkSQLDialect); + + /** + * Creates a new SparkSQLDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns SparkSQLDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ISparkSQLDialect): google.cloud.bigquery.migration.v2.SparkSQLDialect; + + /** + * Encodes the specified SparkSQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SparkSQLDialect.verify|verify} messages. + * @param message SparkSQLDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ISparkSQLDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SparkSQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SparkSQLDialect.verify|verify} messages. + * @param message SparkSQLDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISparkSQLDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SparkSQLDialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SparkSQLDialect + * @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.SparkSQLDialect; + + /** + * Decodes a SparkSQLDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SparkSQLDialect + * @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.SparkSQLDialect; + + /** + * Verifies a SparkSQLDialect 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 SparkSQLDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SparkSQLDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SparkSQLDialect; + + /** + * Creates a plain object from a SparkSQLDialect message. Also converts values to other types if specified. + * @param message SparkSQLDialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.SparkSQLDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SparkSQLDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SparkSQLDialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SnowflakeDialect. */ + interface ISnowflakeDialect { + } + + /** Represents a SnowflakeDialect. */ + class SnowflakeDialect implements ISnowflakeDialect { + + /** + * Constructs a new SnowflakeDialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ISnowflakeDialect); + + /** + * Creates a new SnowflakeDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns SnowflakeDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ISnowflakeDialect): google.cloud.bigquery.migration.v2.SnowflakeDialect; + + /** + * Encodes the specified SnowflakeDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SnowflakeDialect.verify|verify} messages. + * @param message SnowflakeDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ISnowflakeDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SnowflakeDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SnowflakeDialect.verify|verify} messages. + * @param message SnowflakeDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISnowflakeDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SnowflakeDialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SnowflakeDialect + * @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.SnowflakeDialect; + + /** + * Decodes a SnowflakeDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SnowflakeDialect + * @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.SnowflakeDialect; + + /** + * Verifies a SnowflakeDialect 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 SnowflakeDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SnowflakeDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SnowflakeDialect; + + /** + * Creates a plain object from a SnowflakeDialect message. Also converts values to other types if specified. + * @param message SnowflakeDialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.SnowflakeDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SnowflakeDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SnowflakeDialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NetezzaDialect. */ + interface INetezzaDialect { + } + + /** Represents a NetezzaDialect. */ + class NetezzaDialect implements INetezzaDialect { + + /** + * Constructs a new NetezzaDialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.INetezzaDialect); + + /** + * Creates a new NetezzaDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns NetezzaDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.INetezzaDialect): google.cloud.bigquery.migration.v2.NetezzaDialect; + + /** + * Encodes the specified NetezzaDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NetezzaDialect.verify|verify} messages. + * @param message NetezzaDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.INetezzaDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NetezzaDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NetezzaDialect.verify|verify} messages. + * @param message NetezzaDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.INetezzaDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NetezzaDialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NetezzaDialect + * @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.NetezzaDialect; + + /** + * Decodes a NetezzaDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NetezzaDialect + * @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.NetezzaDialect; + + /** + * Verifies a NetezzaDialect 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 NetezzaDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NetezzaDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.NetezzaDialect; + + /** + * Creates a plain object from a NetezzaDialect message. Also converts values to other types if specified. + * @param message NetezzaDialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.NetezzaDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NetezzaDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NetezzaDialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AzureSynapseDialect. */ + interface IAzureSynapseDialect { + } + + /** Represents an AzureSynapseDialect. */ + class AzureSynapseDialect implements IAzureSynapseDialect { + + /** + * Constructs a new AzureSynapseDialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IAzureSynapseDialect); + + /** + * Creates a new AzureSynapseDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns AzureSynapseDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IAzureSynapseDialect): google.cloud.bigquery.migration.v2.AzureSynapseDialect; + + /** + * Encodes the specified AzureSynapseDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AzureSynapseDialect.verify|verify} messages. + * @param message AzureSynapseDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IAzureSynapseDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AzureSynapseDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AzureSynapseDialect.verify|verify} messages. + * @param message AzureSynapseDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IAzureSynapseDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AzureSynapseDialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AzureSynapseDialect + * @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.AzureSynapseDialect; + + /** + * Decodes an AzureSynapseDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AzureSynapseDialect + * @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.AzureSynapseDialect; + + /** + * Verifies an AzureSynapseDialect 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 AzureSynapseDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AzureSynapseDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.AzureSynapseDialect; + + /** + * Creates a plain object from an AzureSynapseDialect message. Also converts values to other types if specified. + * @param message AzureSynapseDialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.AzureSynapseDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AzureSynapseDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AzureSynapseDialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a VerticaDialect. */ + interface IVerticaDialect { + } + + /** Represents a VerticaDialect. */ + class VerticaDialect implements IVerticaDialect { + + /** + * Constructs a new VerticaDialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IVerticaDialect); + + /** + * Creates a new VerticaDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns VerticaDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IVerticaDialect): google.cloud.bigquery.migration.v2.VerticaDialect; + + /** + * Encodes the specified VerticaDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.VerticaDialect.verify|verify} messages. + * @param message VerticaDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IVerticaDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VerticaDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.VerticaDialect.verify|verify} messages. + * @param message VerticaDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IVerticaDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VerticaDialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VerticaDialect + * @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.VerticaDialect; + + /** + * Decodes a VerticaDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VerticaDialect + * @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.VerticaDialect; + + /** + * Verifies a VerticaDialect 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 VerticaDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VerticaDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.VerticaDialect; + + /** + * Creates a plain object from a VerticaDialect message. Also converts values to other types if specified. + * @param message VerticaDialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.VerticaDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VerticaDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VerticaDialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SQLServerDialect. */ + interface ISQLServerDialect { + } + + /** Represents a SQLServerDialect. */ + class SQLServerDialect implements ISQLServerDialect { + + /** + * Constructs a new SQLServerDialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ISQLServerDialect); + + /** + * Creates a new SQLServerDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns SQLServerDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ISQLServerDialect): google.cloud.bigquery.migration.v2.SQLServerDialect; + + /** + * Encodes the specified SQLServerDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLServerDialect.verify|verify} messages. + * @param message SQLServerDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ISQLServerDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SQLServerDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLServerDialect.verify|verify} messages. + * @param message SQLServerDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISQLServerDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SQLServerDialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SQLServerDialect + * @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.SQLServerDialect; + + /** + * Decodes a SQLServerDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SQLServerDialect + * @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.SQLServerDialect; + + /** + * Verifies a SQLServerDialect 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 SQLServerDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SQLServerDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SQLServerDialect; + + /** + * Creates a plain object from a SQLServerDialect message. Also converts values to other types if specified. + * @param message SQLServerDialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.SQLServerDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SQLServerDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SQLServerDialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PostgresqlDialect. */ + interface IPostgresqlDialect { + } + + /** Represents a PostgresqlDialect. */ + class PostgresqlDialect implements IPostgresqlDialect { + + /** + * Constructs a new PostgresqlDialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IPostgresqlDialect); + + /** + * Creates a new PostgresqlDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns PostgresqlDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IPostgresqlDialect): google.cloud.bigquery.migration.v2.PostgresqlDialect; + + /** + * Encodes the specified PostgresqlDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.PostgresqlDialect.verify|verify} messages. + * @param message PostgresqlDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IPostgresqlDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PostgresqlDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PostgresqlDialect.verify|verify} messages. + * @param message PostgresqlDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IPostgresqlDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PostgresqlDialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PostgresqlDialect + * @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.PostgresqlDialect; + + /** + * Decodes a PostgresqlDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PostgresqlDialect + * @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.PostgresqlDialect; + + /** + * Verifies a PostgresqlDialect 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 PostgresqlDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PostgresqlDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.PostgresqlDialect; + + /** + * Creates a plain object from a PostgresqlDialect message. Also converts values to other types if specified. + * @param message PostgresqlDialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.PostgresqlDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PostgresqlDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PostgresqlDialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PrestoDialect. */ + interface IPrestoDialect { + } + + /** Represents a PrestoDialect. */ + class PrestoDialect implements IPrestoDialect { + + /** + * Constructs a new PrestoDialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IPrestoDialect); + + /** + * Creates a new PrestoDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns PrestoDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IPrestoDialect): google.cloud.bigquery.migration.v2.PrestoDialect; + + /** + * Encodes the specified PrestoDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.PrestoDialect.verify|verify} messages. + * @param message PrestoDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IPrestoDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PrestoDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PrestoDialect.verify|verify} messages. + * @param message PrestoDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IPrestoDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PrestoDialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PrestoDialect + * @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.PrestoDialect; + + /** + * Decodes a PrestoDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PrestoDialect + * @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.PrestoDialect; + + /** + * Verifies a PrestoDialect 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 PrestoDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PrestoDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.PrestoDialect; + + /** + * Creates a plain object from a PrestoDialect message. Also converts values to other types if specified. + * @param message PrestoDialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.PrestoDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PrestoDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PrestoDialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MySQLDialect. */ + interface IMySQLDialect { + } + + /** Represents a MySQLDialect. */ + class MySQLDialect implements IMySQLDialect { + + /** + * Constructs a new MySQLDialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IMySQLDialect); + + /** + * Creates a new MySQLDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns MySQLDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IMySQLDialect): google.cloud.bigquery.migration.v2.MySQLDialect; + + /** + * Encodes the specified MySQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MySQLDialect.verify|verify} messages. + * @param message MySQLDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IMySQLDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MySQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MySQLDialect.verify|verify} messages. + * @param message MySQLDialect message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IMySQLDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MySQLDialect message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MySQLDialect + * @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.MySQLDialect; + + /** + * Decodes a MySQLDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MySQLDialect + * @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.MySQLDialect; + + /** + * Verifies a MySQLDialect 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 MySQLDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MySQLDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.MySQLDialect; + + /** + * Creates a plain object from a MySQLDialect message. Also converts values to other types if specified. + * @param message MySQLDialect + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.MySQLDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MySQLDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MySQLDialect + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DB2Dialect. */ + interface IDB2Dialect { + } + + /** Represents a DB2Dialect. */ + class DB2Dialect implements IDB2Dialect { + + /** + * Constructs a new DB2Dialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IDB2Dialect); + + /** + * Creates a new DB2Dialect instance using the specified properties. + * @param [properties] Properties to set + * @returns DB2Dialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IDB2Dialect): google.cloud.bigquery.migration.v2.DB2Dialect; + + /** + * 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.IDB2Dialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IDB2Dialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.DB2Dialect; + + /** + * Decodes a DB2Dialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.DB2Dialect; + + /** + * 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 a DB2Dialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DB2Dialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.DB2Dialect; + + /** + * 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.DB2Dialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DB2Dialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 a SQLiteDialect. */ + interface ISQLiteDialect { + } + + /** Represents a SQLiteDialect. */ + class SQLiteDialect implements ISQLiteDialect { + + /** + * Constructs a new SQLiteDialect. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ISQLiteDialect); + + /** + * Creates a new SQLiteDialect instance using the specified properties. + * @param [properties] Properties to set + * @returns SQLiteDialect instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ISQLiteDialect): google.cloud.bigquery.migration.v2.SQLiteDialect; + + /** + * 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.ISQLiteDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.ISQLiteDialect, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.SQLiteDialect; + + /** + * Decodes a SQLiteDialect message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.SQLiteDialect; + + /** + * 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 a SQLiteDialect message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SQLiteDialect + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SQLiteDialect; + + /** + * 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.SQLiteDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SQLiteDialect to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 GreenplumDialect. */ + interface IGreenplumDialect { + } + + /** Represents a GreenplumDialect. */ + class GreenplumDialect implements IGreenplumDialect { + + /** + * Constructs a new GreenplumDialect. + * @param [properties] Properties to set + */ + 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 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); + + /** TranslationDetails suggestionConfig */ + suggestionConfig?: (google.cloud.bigquery.migration.v2.ISuggestionConfig|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[]; + + /** TranslationDetails suggestionConfig. */ + public suggestionConfig?: (google.cloud.bigquery.migration.v2.ISuggestionConfig|null); + + /** + * Creates a new TranslationDetails instance using the specified properties. + * @param [properties] Properties to set + * @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 SuggestionConfig. */ + interface ISuggestionConfig { + + /** SuggestionConfig skipSuggestionSteps */ + skipSuggestionSteps?: (google.cloud.bigquery.migration.v2.ISuggestionStep[]|null); + } + + /** Represents a SuggestionConfig. */ + class SuggestionConfig implements ISuggestionConfig { + + /** + * Constructs a new SuggestionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ISuggestionConfig); + + /** SuggestionConfig skipSuggestionSteps. */ + public skipSuggestionSteps: google.cloud.bigquery.migration.v2.ISuggestionStep[]; + + /** + * Creates a new SuggestionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestionConfig instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ISuggestionConfig): google.cloud.bigquery.migration.v2.SuggestionConfig; + + /** + * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. + * @param message SuggestionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. + * @param message SuggestionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SuggestionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.SuggestionConfig; + + /** + * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.SuggestionConfig; + + /** + * Verifies a SuggestionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SuggestionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SuggestionConfig; + + /** + * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. + * @param message SuggestionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.SuggestionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SuggestionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SuggestionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SuggestionStep. */ + interface ISuggestionStep { + + /** SuggestionStep suggestionType */ + suggestionType?: (google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|null); + + /** SuggestionStep rewriteTarget */ + rewriteTarget?: (google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|null); + } + + /** Represents a SuggestionStep. */ + class SuggestionStep implements ISuggestionStep { + + /** + * Constructs a new SuggestionStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ISuggestionStep); + + /** SuggestionStep suggestionType. */ + public suggestionType: (google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType); + + /** SuggestionStep rewriteTarget. */ + public rewriteTarget: (google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget); + + /** + * Creates a new SuggestionStep instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestionStep instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ISuggestionStep): google.cloud.bigquery.migration.v2.SuggestionStep; + + /** + * Encodes the specified SuggestionStep message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. + * @param message SuggestionStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ISuggestionStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SuggestionStep message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. + * @param message SuggestionStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISuggestionStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SuggestionStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestionStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.SuggestionStep; + + /** + * Decodes a SuggestionStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestionStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.SuggestionStep; + + /** + * Verifies a SuggestionStep message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SuggestionStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestionStep + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SuggestionStep; + + /** + * Creates a plain object from a SuggestionStep message. Also converts values to other types if specified. + * @param message SuggestionStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.SuggestionStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SuggestionStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SuggestionStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SuggestionStep { + + /** SuggestionType enum. */ + enum SuggestionType { + SUGGESTION_TYPE_UNSPECIFIED = 0, + QUERY_CUSTOMIZATION = 1, + TRANSLATION_EXPLANATION = 2 + } + + /** RewriteTarget enum. */ + enum RewriteTarget { + REWRITE_TARGET_UNSPECIFIED = 0, + SOURCE_SQL = 1, + TARGET_SQL = 2 + } + } + + /** Properties of a SourceTargetMapping. */ + interface ISourceTargetMapping { + + /** 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 gcsFilePath */ + gcsFilePath?: (string|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 gcsFilePath. */ + public gcsFilePath?: (string|null); + + /** SourceSpec encoding. */ + public encoding: string; + + /** SourceSpec source. */ + public source?: ("baseUri"|"literal"|"gcsFilePath"); + + /** + * 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 }; + + /** + * 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; + } + + /** Properties of a Literal. */ + interface ILiteral { + + /** Literal literalString */ + literalString?: (string|null); + + /** Literal literalBytes */ + literalBytes?: (Uint8Array|Buffer|string|null); + + /** Literal relativePath */ + relativePath?: (string|null); + } + + /** Represents a Literal. */ + class Literal implements ILiteral { + + /** + * Constructs a new Literal. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ILiteral); + + /** Literal literalString. */ + public literalString?: (string|null); + + /** Literal literalBytes. */ + public literalBytes?: (Uint8Array|Buffer|string|null); + + /** Literal relativePath. */ + public relativePath: string; + + /** Literal literalData. */ + public literalData?: ("literalString"|"literalBytes"); + + /** + * 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.ILiteral, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.ILiteral, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.Literal; + + /** + * Decodes a Literal message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.Literal; + + /** + * 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 Literal message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Literal + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.Literal; + + /** + * 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.Literal, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Literal to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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; + } + + /** Properties of a SourceEnvironment. */ + interface ISourceEnvironment { + + /** SourceEnvironment defaultDatabase */ + defaultDatabase?: (string|null); + + /** SourceEnvironment schemaSearchPath */ + schemaSearchPath?: (string[]|null); + + /** SourceEnvironment metadataStoreDataset */ + metadataStoreDataset?: (string|null); + } + + /** Represents a SourceEnvironment. */ + class SourceEnvironment implements ISourceEnvironment { + + /** + * Constructs a new SourceEnvironment. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ISourceEnvironment); + + /** SourceEnvironment defaultDatabase. */ + public defaultDatabase: string; + + /** SourceEnvironment schemaSearchPath. */ + public schemaSearchPath: string[]; + + /** SourceEnvironment metadataStoreDataset. */ + public metadataStoreDataset: string; + + /** + * Creates a new SourceEnvironment instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceEnvironment instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ISourceEnvironment): google.cloud.bigquery.migration.v2.SourceEnvironment; + + /** + * 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.ISourceEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.ISourceEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.SourceEnvironment; + + /** + * Decodes a SourceEnvironment message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.SourceEnvironment; + + /** + * 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 SourceEnvironment message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceEnvironment + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SourceEnvironment; + + /** + * 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.SourceEnvironment, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceEnvironment to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * 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 GcsReportLogMessage. */ + interface IGcsReportLogMessage { + + /** GcsReportLogMessage severity */ + severity?: (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 GcsReportLogMessage. */ + class GcsReportLogMessage implements IGcsReportLogMessage { + + /** + * Constructs a new GcsReportLogMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IGcsReportLogMessage); + + /** GcsReportLogMessage severity. */ + public severity: 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 GcsReportLogMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsReportLogMessage instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IGcsReportLogMessage): google.cloud.bigquery.migration.v2.GcsReportLogMessage; + + /** + * 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.IGcsReportLogMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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.IGcsReportLogMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * 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 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.GcsReportLogMessage; + + /** + * Decodes a GcsReportLogMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @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.GcsReportLogMessage; + + /** + * 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 GcsReportLogMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsReportLogMessage + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.GcsReportLogMessage; + + /** + * 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.GcsReportLogMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsReportLogMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsReportLogMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a MigrationService */ + class MigrationService extends $protobuf.rpc.Service { + + /** + * Constructs a new MigrationService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new MigrationService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MigrationService; + + /** + * Calls CreateMigrationWorkflow. + * @param request CreateMigrationWorkflowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MigrationWorkflow + */ + public createMigrationWorkflow(request: google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2.MigrationService.CreateMigrationWorkflowCallback): void; + + /** + * Calls CreateMigrationWorkflow. + * @param request CreateMigrationWorkflowRequest message or plain object + * @returns Promise + */ + public createMigrationWorkflow(request: google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest): Promise; + + /** + * Calls GetMigrationWorkflow. + * @param request GetMigrationWorkflowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MigrationWorkflow + */ + public getMigrationWorkflow(request: google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2.MigrationService.GetMigrationWorkflowCallback): void; + + /** + * Calls GetMigrationWorkflow. + * @param request GetMigrationWorkflowRequest message or plain object + * @returns Promise + */ + public getMigrationWorkflow(request: google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest): Promise; + + /** + * Calls ListMigrationWorkflows. + * @param request ListMigrationWorkflowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMigrationWorkflowsResponse + */ + public listMigrationWorkflows(request: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, callback: google.cloud.bigquery.migration.v2.MigrationService.ListMigrationWorkflowsCallback): void; + + /** + * Calls ListMigrationWorkflows. + * @param request ListMigrationWorkflowsRequest message or plain object + * @returns Promise + */ + public listMigrationWorkflows(request: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest): Promise; + + /** + * Calls DeleteMigrationWorkflow. + * @param request DeleteMigrationWorkflowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteMigrationWorkflow(request: google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2.MigrationService.DeleteMigrationWorkflowCallback): void; + + /** + * Calls DeleteMigrationWorkflow. + * @param request DeleteMigrationWorkflowRequest message or plain object + * @returns Promise + */ + public deleteMigrationWorkflow(request: google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest): Promise; + + /** + * Calls StartMigrationWorkflow. + * @param request StartMigrationWorkflowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public startMigrationWorkflow(request: google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2.MigrationService.StartMigrationWorkflowCallback): void; + + /** + * Calls StartMigrationWorkflow. + * @param request StartMigrationWorkflowRequest message or plain object + * @returns Promise + */ + public startMigrationWorkflow(request: google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest): Promise; + + /** + * Calls GetMigrationSubtask. + * @param request GetMigrationSubtaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MigrationSubtask + */ + public getMigrationSubtask(request: google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, callback: google.cloud.bigquery.migration.v2.MigrationService.GetMigrationSubtaskCallback): void; + + /** + * Calls GetMigrationSubtask. + * @param request GetMigrationSubtaskRequest message or plain object + * @returns Promise + */ + public getMigrationSubtask(request: google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest): Promise; + + /** + * Calls ListMigrationSubtasks. + * @param request ListMigrationSubtasksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMigrationSubtasksResponse + */ + public listMigrationSubtasks(request: google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, callback: google.cloud.bigquery.migration.v2.MigrationService.ListMigrationSubtasksCallback): void; + + /** + * Calls ListMigrationSubtasks. + * @param request ListMigrationSubtasksRequest message or plain object + * @returns Promise + */ + public listMigrationSubtasks(request: google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest): Promise; + } + + namespace MigrationService { + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|createMigrationWorkflow}. + * @param error Error, if any + * @param [response] MigrationWorkflow + */ + type CreateMigrationWorkflowCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2.MigrationWorkflow) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|getMigrationWorkflow}. + * @param error Error, if any + * @param [response] MigrationWorkflow + */ + type GetMigrationWorkflowCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2.MigrationWorkflow) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|listMigrationWorkflows}. + * @param error Error, if any + * @param [response] ListMigrationWorkflowsResponse + */ + type ListMigrationWorkflowsCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|deleteMigrationWorkflow}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteMigrationWorkflowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|startMigrationWorkflow}. + * @param error Error, if any + * @param [response] Empty + */ + type StartMigrationWorkflowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|getMigrationSubtask}. + * @param error Error, if any + * @param [response] MigrationSubtask + */ + type GetMigrationSubtaskCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2.MigrationSubtask) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|listMigrationSubtasks}. + * @param error Error, if any + * @param [response] ListMigrationSubtasksResponse + */ + type ListMigrationSubtasksCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse) => void; + } + + /** Properties of a CreateMigrationWorkflowRequest. */ + interface ICreateMigrationWorkflowRequest { + + /** CreateMigrationWorkflowRequest parent */ + parent?: (string|null); + + /** CreateMigrationWorkflowRequest migrationWorkflow */ + migrationWorkflow?: (google.cloud.bigquery.migration.v2.IMigrationWorkflow|null); + } + + /** Represents a CreateMigrationWorkflowRequest. */ + class CreateMigrationWorkflowRequest implements ICreateMigrationWorkflowRequest { + + /** + * Constructs a new CreateMigrationWorkflowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest); + + /** CreateMigrationWorkflowRequest parent. */ + public parent: string; + + /** CreateMigrationWorkflowRequest migrationWorkflow. */ + public migrationWorkflow?: (google.cloud.bigquery.migration.v2.IMigrationWorkflow|null); + + /** + * Creates a new CreateMigrationWorkflowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateMigrationWorkflowRequest instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest): google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest; + + /** + * Encodes the specified CreateMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest.verify|verify} messages. + * @param message CreateMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest.verify|verify} messages. + * @param message CreateMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateMigrationWorkflowRequest + * @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.CreateMigrationWorkflowRequest; + + /** + * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateMigrationWorkflowRequest + * @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.CreateMigrationWorkflowRequest; + + /** + * Verifies a CreateMigrationWorkflowRequest 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 CreateMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateMigrationWorkflowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest; + + /** + * Creates a plain object from a CreateMigrationWorkflowRequest message. Also converts values to other types if specified. + * @param message CreateMigrationWorkflowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateMigrationWorkflowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateMigrationWorkflowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMigrationWorkflowRequest. */ + interface IGetMigrationWorkflowRequest { + + /** GetMigrationWorkflowRequest name */ + name?: (string|null); + + /** GetMigrationWorkflowRequest readMask */ + readMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a GetMigrationWorkflowRequest. */ + class GetMigrationWorkflowRequest implements IGetMigrationWorkflowRequest { + + /** + * Constructs a new GetMigrationWorkflowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest); + + /** GetMigrationWorkflowRequest name. */ + public name: string; + + /** GetMigrationWorkflowRequest readMask. */ + public readMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new GetMigrationWorkflowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMigrationWorkflowRequest instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest): google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest; + + /** + * Encodes the specified GetMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest.verify|verify} messages. + * @param message GetMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest.verify|verify} messages. + * @param message GetMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMigrationWorkflowRequest + * @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.GetMigrationWorkflowRequest; + + /** + * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMigrationWorkflowRequest + * @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.GetMigrationWorkflowRequest; + + /** + * Verifies a GetMigrationWorkflowRequest 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 GetMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMigrationWorkflowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest; + + /** + * Creates a plain object from a GetMigrationWorkflowRequest message. Also converts values to other types if specified. + * @param message GetMigrationWorkflowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMigrationWorkflowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMigrationWorkflowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMigrationWorkflowsRequest. */ + interface IListMigrationWorkflowsRequest { + + /** ListMigrationWorkflowsRequest parent */ + parent?: (string|null); + + /** ListMigrationWorkflowsRequest readMask */ + readMask?: (google.protobuf.IFieldMask|null); + + /** ListMigrationWorkflowsRequest pageSize */ + pageSize?: (number|null); + + /** ListMigrationWorkflowsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListMigrationWorkflowsRequest. */ + class ListMigrationWorkflowsRequest implements IListMigrationWorkflowsRequest { + + /** + * Constructs a new ListMigrationWorkflowsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest); + + /** ListMigrationWorkflowsRequest parent. */ + public parent: string; + + /** ListMigrationWorkflowsRequest readMask. */ + public readMask?: (google.protobuf.IFieldMask|null); + + /** ListMigrationWorkflowsRequest pageSize. */ + public pageSize: number; + + /** ListMigrationWorkflowsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListMigrationWorkflowsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMigrationWorkflowsRequest instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest): google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest; + + /** + * Encodes the specified ListMigrationWorkflowsRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest.verify|verify} messages. + * @param message ListMigrationWorkflowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMigrationWorkflowsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest.verify|verify} messages. + * @param message ListMigrationWorkflowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMigrationWorkflowsRequest + * @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.ListMigrationWorkflowsRequest; + + /** + * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMigrationWorkflowsRequest + * @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.ListMigrationWorkflowsRequest; + + /** + * Verifies a ListMigrationWorkflowsRequest 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 ListMigrationWorkflowsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMigrationWorkflowsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest; + + /** + * Creates a plain object from a ListMigrationWorkflowsRequest message. Also converts values to other types if specified. + * @param message ListMigrationWorkflowsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMigrationWorkflowsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMigrationWorkflowsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMigrationWorkflowsResponse. */ + interface IListMigrationWorkflowsResponse { + + /** ListMigrationWorkflowsResponse migrationWorkflows */ + migrationWorkflows?: (google.cloud.bigquery.migration.v2.IMigrationWorkflow[]|null); + + /** ListMigrationWorkflowsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMigrationWorkflowsResponse. */ + class ListMigrationWorkflowsResponse implements IListMigrationWorkflowsResponse { + + /** + * Constructs a new ListMigrationWorkflowsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse); + + /** ListMigrationWorkflowsResponse migrationWorkflows. */ + public migrationWorkflows: google.cloud.bigquery.migration.v2.IMigrationWorkflow[]; + + /** ListMigrationWorkflowsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListMigrationWorkflowsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMigrationWorkflowsResponse instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse): google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse; + + /** + * Encodes the specified ListMigrationWorkflowsResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse.verify|verify} messages. + * @param message ListMigrationWorkflowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMigrationWorkflowsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse.verify|verify} messages. + * @param message ListMigrationWorkflowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMigrationWorkflowsResponse + * @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.ListMigrationWorkflowsResponse; + + /** + * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMigrationWorkflowsResponse + * @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.ListMigrationWorkflowsResponse; + + /** + * Verifies a ListMigrationWorkflowsResponse 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 ListMigrationWorkflowsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMigrationWorkflowsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse; + + /** + * Creates a plain object from a ListMigrationWorkflowsResponse message. Also converts values to other types if specified. + * @param message ListMigrationWorkflowsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMigrationWorkflowsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMigrationWorkflowsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteMigrationWorkflowRequest. */ + interface IDeleteMigrationWorkflowRequest { + + /** DeleteMigrationWorkflowRequest name */ + name?: (string|null); + } + + /** Represents a DeleteMigrationWorkflowRequest. */ + class DeleteMigrationWorkflowRequest implements IDeleteMigrationWorkflowRequest { + + /** + * Constructs a new DeleteMigrationWorkflowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest); + + /** DeleteMigrationWorkflowRequest name. */ + public name: string; + + /** + * Creates a new DeleteMigrationWorkflowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteMigrationWorkflowRequest instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest): google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest; + + /** + * Encodes the specified DeleteMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest.verify|verify} messages. + * @param message DeleteMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest.verify|verify} messages. + * @param message DeleteMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteMigrationWorkflowRequest + * @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.DeleteMigrationWorkflowRequest; + + /** + * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteMigrationWorkflowRequest + * @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.DeleteMigrationWorkflowRequest; + + /** + * Verifies a DeleteMigrationWorkflowRequest 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 DeleteMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteMigrationWorkflowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest; + + /** + * Creates a plain object from a DeleteMigrationWorkflowRequest message. Also converts values to other types if specified. + * @param message DeleteMigrationWorkflowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteMigrationWorkflowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteMigrationWorkflowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StartMigrationWorkflowRequest. */ + interface IStartMigrationWorkflowRequest { + + /** StartMigrationWorkflowRequest name */ + name?: (string|null); + } + + /** Represents a StartMigrationWorkflowRequest. */ + class StartMigrationWorkflowRequest implements IStartMigrationWorkflowRequest { + + /** + * Constructs a new StartMigrationWorkflowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest); + + /** StartMigrationWorkflowRequest name. */ + public name: string; + + /** + * Creates a new StartMigrationWorkflowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StartMigrationWorkflowRequest instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest): google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest; + + /** + * Encodes the specified StartMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest.verify|verify} messages. + * @param message StartMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest.verify|verify} messages. + * @param message StartMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartMigrationWorkflowRequest + * @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.StartMigrationWorkflowRequest; + + /** + * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartMigrationWorkflowRequest + * @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.StartMigrationWorkflowRequest; + + /** + * Verifies a StartMigrationWorkflowRequest 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 StartMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartMigrationWorkflowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest; + + /** + * Creates a plain object from a StartMigrationWorkflowRequest message. Also converts values to other types if specified. + * @param message StartMigrationWorkflowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartMigrationWorkflowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartMigrationWorkflowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMigrationSubtaskRequest. */ + interface IGetMigrationSubtaskRequest { + + /** GetMigrationSubtaskRequest name */ + name?: (string|null); + + /** GetMigrationSubtaskRequest readMask */ + readMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a GetMigrationSubtaskRequest. */ + class GetMigrationSubtaskRequest implements IGetMigrationSubtaskRequest { + + /** + * Constructs a new GetMigrationSubtaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest); + + /** GetMigrationSubtaskRequest name. */ + public name: string; + + /** GetMigrationSubtaskRequest readMask. */ + public readMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new GetMigrationSubtaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMigrationSubtaskRequest instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest): google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest; + + /** + * Encodes the specified GetMigrationSubtaskRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest.verify|verify} messages. + * @param message GetMigrationSubtaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMigrationSubtaskRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest.verify|verify} messages. + * @param message GetMigrationSubtaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMigrationSubtaskRequest + * @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.GetMigrationSubtaskRequest; + + /** + * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMigrationSubtaskRequest + * @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.GetMigrationSubtaskRequest; + + /** + * Verifies a GetMigrationSubtaskRequest 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 GetMigrationSubtaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMigrationSubtaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest; + + /** + * Creates a plain object from a GetMigrationSubtaskRequest message. Also converts values to other types if specified. + * @param message GetMigrationSubtaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMigrationSubtaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMigrationSubtaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMigrationSubtasksRequest. */ + interface IListMigrationSubtasksRequest { + + /** ListMigrationSubtasksRequest parent */ + parent?: (string|null); + + /** ListMigrationSubtasksRequest readMask */ + readMask?: (google.protobuf.IFieldMask|null); + + /** ListMigrationSubtasksRequest pageSize */ + pageSize?: (number|null); + + /** ListMigrationSubtasksRequest pageToken */ + pageToken?: (string|null); + + /** ListMigrationSubtasksRequest filter */ + filter?: (string|null); + } + + /** Represents a ListMigrationSubtasksRequest. */ + class ListMigrationSubtasksRequest implements IListMigrationSubtasksRequest { + + /** + * Constructs a new ListMigrationSubtasksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest); + + /** ListMigrationSubtasksRequest parent. */ + public parent: string; + + /** ListMigrationSubtasksRequest readMask. */ + public readMask?: (google.protobuf.IFieldMask|null); + + /** ListMigrationSubtasksRequest pageSize. */ + public pageSize: number; + + /** ListMigrationSubtasksRequest pageToken. */ + public pageToken: string; + + /** ListMigrationSubtasksRequest filter. */ + public filter: string; + + /** + * Creates a new ListMigrationSubtasksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMigrationSubtasksRequest instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest): google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest; + + /** + * Encodes the specified ListMigrationSubtasksRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest.verify|verify} messages. + * @param message ListMigrationSubtasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMigrationSubtasksRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest.verify|verify} messages. + * @param message ListMigrationSubtasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMigrationSubtasksRequest + * @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.ListMigrationSubtasksRequest; + + /** + * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMigrationSubtasksRequest + * @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.ListMigrationSubtasksRequest; + + /** + * Verifies a ListMigrationSubtasksRequest 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 ListMigrationSubtasksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMigrationSubtasksRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest; + + /** + * Creates a plain object from a ListMigrationSubtasksRequest message. Also converts values to other types if specified. + * @param message ListMigrationSubtasksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMigrationSubtasksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMigrationSubtasksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMigrationSubtasksResponse. */ + interface IListMigrationSubtasksResponse { + + /** ListMigrationSubtasksResponse migrationSubtasks */ + migrationSubtasks?: (google.cloud.bigquery.migration.v2.IMigrationSubtask[]|null); + + /** ListMigrationSubtasksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMigrationSubtasksResponse. */ + class ListMigrationSubtasksResponse implements IListMigrationSubtasksResponse { + + /** + * Constructs a new ListMigrationSubtasksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse); + + /** ListMigrationSubtasksResponse migrationSubtasks. */ + public migrationSubtasks: google.cloud.bigquery.migration.v2.IMigrationSubtask[]; + + /** ListMigrationSubtasksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListMigrationSubtasksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMigrationSubtasksResponse instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse): google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse; + + /** + * Encodes the specified ListMigrationSubtasksResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse.verify|verify} messages. + * @param message ListMigrationSubtasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMigrationSubtasksResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse.verify|verify} messages. + * @param message ListMigrationSubtasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMigrationSubtasksResponse + * @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.ListMigrationSubtasksResponse; + + /** + * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMigrationSubtasksResponse + * @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.ListMigrationSubtasksResponse; + + /** + * Verifies a ListMigrationSubtasksResponse 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 ListMigrationSubtasksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMigrationSubtasksResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse; + + /** + * Creates a plain object from a ListMigrationSubtasksResponse message. Also converts values to other types if specified. + * @param message ListMigrationSubtasksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMigrationSubtasksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMigrationSubtasksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + 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. */ + namespace v2alpha { + + /** Properties of an AssessmentTaskDetails. */ + interface IAssessmentTaskDetails { + + /** AssessmentTaskDetails inputPath */ + inputPath?: (string|null); + + /** AssessmentTaskDetails outputDataset */ + outputDataset?: (string|null); + + /** AssessmentTaskDetails querylogsPath */ + querylogsPath?: (string|null); + + /** AssessmentTaskDetails dataSource */ + dataSource?: (string|null); + } + + /** Represents an AssessmentTaskDetails. */ + class AssessmentTaskDetails implements IAssessmentTaskDetails { + + /** + * Constructs a new AssessmentTaskDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails); + + /** AssessmentTaskDetails inputPath. */ + public inputPath: string; + + /** AssessmentTaskDetails outputDataset. */ + public outputDataset: string; + + /** AssessmentTaskDetails querylogsPath. */ + public querylogsPath: string; + + /** AssessmentTaskDetails dataSource. */ + public dataSource: string; + + /** + * Creates a new AssessmentTaskDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns AssessmentTaskDetails instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails): google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails; + + /** + * Encodes the specified AssessmentTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.verify|verify} messages. + * @param message AssessmentTaskDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AssessmentTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.verify|verify} messages. + * @param message AssessmentTaskDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AssessmentTaskDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssessmentTaskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails; + + /** + * Decodes an AssessmentTaskDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssessmentTaskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails; + + /** + * Verifies an AssessmentTaskDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AssessmentTaskDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssessmentTaskDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails; + + /** + * Creates a plain object from an AssessmentTaskDetails message. Also converts values to other types if specified. + * @param message AssessmentTaskDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AssessmentTaskDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AssessmentTaskDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AssessmentOrchestrationResultDetails. */ + interface IAssessmentOrchestrationResultDetails { + + /** AssessmentOrchestrationResultDetails outputTablesSchemaVersion */ + outputTablesSchemaVersion?: (string|null); + } + + /** Represents an AssessmentOrchestrationResultDetails. */ + class AssessmentOrchestrationResultDetails implements IAssessmentOrchestrationResultDetails { + + /** + * Constructs a new AssessmentOrchestrationResultDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails); + + /** AssessmentOrchestrationResultDetails outputTablesSchemaVersion. */ + public outputTablesSchemaVersion: string; + + /** + * Creates a new AssessmentOrchestrationResultDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns AssessmentOrchestrationResultDetails instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails): google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails; + + /** + * Encodes the specified AssessmentOrchestrationResultDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.verify|verify} messages. + * @param message AssessmentOrchestrationResultDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AssessmentOrchestrationResultDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.verify|verify} messages. + * @param message AssessmentOrchestrationResultDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AssessmentOrchestrationResultDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssessmentOrchestrationResultDetails + * @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.v2alpha.AssessmentOrchestrationResultDetails; + + /** + * Decodes an AssessmentOrchestrationResultDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssessmentOrchestrationResultDetails + * @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.v2alpha.AssessmentOrchestrationResultDetails; + + /** + * Verifies an AssessmentOrchestrationResultDetails 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 AssessmentOrchestrationResultDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssessmentOrchestrationResultDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails; + + /** + * Creates a plain object from an AssessmentOrchestrationResultDetails message. Also converts values to other types if specified. + * @param message AssessmentOrchestrationResultDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AssessmentOrchestrationResultDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AssessmentOrchestrationResultDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MigrationWorkflow. */ + interface IMigrationWorkflow { + + /** MigrationWorkflow name */ + name?: (string|null); + + /** MigrationWorkflow displayName */ + displayName?: (string|null); + + /** MigrationWorkflow tasks */ + tasks?: ({ [k: string]: google.cloud.bigquery.migration.v2alpha.IMigrationTask }|null); + + /** MigrationWorkflow state */ + state?: (google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State|keyof typeof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State|null); + + /** MigrationWorkflow createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** MigrationWorkflow lastUpdateTime */ + lastUpdateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a MigrationWorkflow. */ + class MigrationWorkflow implements IMigrationWorkflow { + + /** + * Constructs a new MigrationWorkflow. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow); + + /** MigrationWorkflow name. */ + public name: string; + + /** MigrationWorkflow displayName. */ + public displayName: string; + + /** MigrationWorkflow tasks. */ + public tasks: { [k: string]: google.cloud.bigquery.migration.v2alpha.IMigrationTask }; + + /** MigrationWorkflow state. */ + public state: (google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State|keyof typeof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State); + + /** MigrationWorkflow createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** MigrationWorkflow lastUpdateTime. */ + public lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new MigrationWorkflow instance using the specified properties. + * @param [properties] Properties to set + * @returns MigrationWorkflow instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow): google.cloud.bigquery.migration.v2alpha.MigrationWorkflow; + + /** + * Encodes the specified MigrationWorkflow message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.verify|verify} messages. + * @param message MigrationWorkflow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MigrationWorkflow message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.verify|verify} messages. + * @param message MigrationWorkflow message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MigrationWorkflow message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MigrationWorkflow + * @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.v2alpha.MigrationWorkflow; + + /** + * Decodes a MigrationWorkflow message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MigrationWorkflow + * @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.v2alpha.MigrationWorkflow; + + /** + * Verifies a MigrationWorkflow 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 MigrationWorkflow message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MigrationWorkflow + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.MigrationWorkflow; + + /** + * Creates a plain object from a MigrationWorkflow message. Also converts values to other types if specified. + * @param message MigrationWorkflow + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.MigrationWorkflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MigrationWorkflow to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MigrationWorkflow + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MigrationWorkflow { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + DRAFT = 1, + RUNNING = 2, + PAUSED = 3, + COMPLETED = 4 + } + } + + /** Properties of a MigrationTask. */ + interface IMigrationTask { + + /** MigrationTask assessmentTaskDetails */ + assessmentTaskDetails?: (google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails|null); + + /** MigrationTask translationTaskDetails */ + translationTaskDetails?: (google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails|null); + + /** MigrationTask id */ + id?: (string|null); + + /** MigrationTask type */ + type?: (string|null); + + /** MigrationTask details */ + details?: (google.protobuf.IAny|null); + + /** MigrationTask state */ + state?: (google.cloud.bigquery.migration.v2alpha.MigrationTask.State|keyof typeof google.cloud.bigquery.migration.v2alpha.MigrationTask.State|null); + + /** MigrationTask processingError */ + processingError?: (google.rpc.IErrorInfo|null); + + /** MigrationTask createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** MigrationTask lastUpdateTime */ + lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** MigrationTask orchestrationResult */ + orchestrationResult?: (google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult|null); + } + + /** Represents a MigrationTask. */ + class MigrationTask implements IMigrationTask { + + /** + * Constructs a new MigrationTask. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationTask); + + /** MigrationTask assessmentTaskDetails. */ + public assessmentTaskDetails?: (google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails|null); + + /** MigrationTask translationTaskDetails. */ + public translationTaskDetails?: (google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails|null); + + /** MigrationTask id. */ + public id: string; + + /** MigrationTask type. */ + public type: string; + + /** MigrationTask details. */ + public details?: (google.protobuf.IAny|null); + + /** MigrationTask state. */ + public state: (google.cloud.bigquery.migration.v2alpha.MigrationTask.State|keyof typeof google.cloud.bigquery.migration.v2alpha.MigrationTask.State); + + /** MigrationTask processingError. */ + public processingError?: (google.rpc.IErrorInfo|null); + + /** MigrationTask createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** MigrationTask lastUpdateTime. */ + public lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** MigrationTask orchestrationResult. */ + public orchestrationResult?: (google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult|null); + + /** MigrationTask taskDetails. */ + public taskDetails?: ("assessmentTaskDetails"|"translationTaskDetails"); + + /** + * Creates a new MigrationTask instance using the specified properties. + * @param [properties] Properties to set + * @returns MigrationTask instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationTask): google.cloud.bigquery.migration.v2alpha.MigrationTask; + + /** + * Encodes the specified MigrationTask message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTask.verify|verify} messages. + * @param message MigrationTask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IMigrationTask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MigrationTask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTask.verify|verify} messages. + * @param message MigrationTask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IMigrationTask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MigrationTask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MigrationTask + * @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.v2alpha.MigrationTask; + + /** + * Decodes a MigrationTask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MigrationTask + * @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.v2alpha.MigrationTask; + + /** + * Verifies a MigrationTask 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 MigrationTask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MigrationTask + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.MigrationTask; + + /** + * Creates a plain object from a MigrationTask message. Also converts values to other types if specified. + * @param message MigrationTask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.MigrationTask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MigrationTask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MigrationTask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MigrationTask { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + PENDING = 1, + ORCHESTRATING = 2, + RUNNING = 3, + PAUSED = 4, + SUCCEEDED = 5, + FAILED = 6 + } + } + + /** Properties of a MigrationSubtask. */ + interface IMigrationSubtask { + + /** MigrationSubtask name */ + name?: (string|null); + + /** MigrationSubtask taskId */ + taskId?: (string|null); + + /** MigrationSubtask type */ + type?: (string|null); + + /** MigrationSubtask state */ + state?: (google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State|keyof typeof google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State|null); + + /** MigrationSubtask processingError */ + processingError?: (google.rpc.IErrorInfo|null); + + /** MigrationSubtask resourceErrorDetails */ + resourceErrorDetails?: (google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail[]|null); + + /** MigrationSubtask resourceErrorCount */ + resourceErrorCount?: (number|null); + + /** MigrationSubtask createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** MigrationSubtask lastUpdateTime */ + lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** MigrationSubtask metrics */ + metrics?: (google.cloud.bigquery.migration.v2alpha.ITimeSeries[]|null); + } + + /** Represents a MigrationSubtask. */ + class MigrationSubtask implements IMigrationSubtask { + + /** + * Constructs a new MigrationSubtask. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationSubtask); + + /** MigrationSubtask name. */ + public name: string; + + /** MigrationSubtask taskId. */ + public taskId: string; + + /** MigrationSubtask type. */ + public type: string; + + /** MigrationSubtask state. */ + public state: (google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State|keyof typeof google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State); + + /** MigrationSubtask processingError. */ + public processingError?: (google.rpc.IErrorInfo|null); + + /** MigrationSubtask resourceErrorDetails. */ + public resourceErrorDetails: google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail[]; + + /** MigrationSubtask resourceErrorCount. */ + public resourceErrorCount: number; + + /** MigrationSubtask createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** MigrationSubtask lastUpdateTime. */ + public lastUpdateTime?: (google.protobuf.ITimestamp|null); + + /** MigrationSubtask metrics. */ + public metrics: google.cloud.bigquery.migration.v2alpha.ITimeSeries[]; + + /** + * Creates a new MigrationSubtask instance using the specified properties. + * @param [properties] Properties to set + * @returns MigrationSubtask instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationSubtask): google.cloud.bigquery.migration.v2alpha.MigrationSubtask; + + /** + * Encodes the specified MigrationSubtask message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationSubtask.verify|verify} messages. + * @param message MigrationSubtask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MigrationSubtask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationSubtask.verify|verify} messages. + * @param message MigrationSubtask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MigrationSubtask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MigrationSubtask + * @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.v2alpha.MigrationSubtask; + + /** + * Decodes a MigrationSubtask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MigrationSubtask + * @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.v2alpha.MigrationSubtask; + + /** + * Verifies a MigrationSubtask 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 MigrationSubtask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MigrationSubtask + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.MigrationSubtask; + + /** + * Creates a plain object from a MigrationSubtask message. Also converts values to other types if specified. + * @param message MigrationSubtask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.MigrationSubtask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MigrationSubtask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MigrationSubtask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MigrationSubtask { + + /** State enum. */ + enum State { + STATE_UNSPECIFIED = 0, + ACTIVE = 1, + RUNNING = 2, + SUCCEEDED = 3, + FAILED = 4, + PAUSED = 5 + } + } + + /** Properties of a MigrationTaskOrchestrationResult. */ + interface IMigrationTaskOrchestrationResult { + + /** MigrationTaskOrchestrationResult assessmentDetails */ + assessmentDetails?: (google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails|null); + } + + /** Represents a MigrationTaskOrchestrationResult. */ + class MigrationTaskOrchestrationResult implements IMigrationTaskOrchestrationResult { + + /** + * Constructs a new MigrationTaskOrchestrationResult. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult); + + /** MigrationTaskOrchestrationResult assessmentDetails. */ + public assessmentDetails?: (google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails|null); + + /** MigrationTaskOrchestrationResult details. */ + public details?: "assessmentDetails"; + + /** + * Creates a new MigrationTaskOrchestrationResult instance using the specified properties. + * @param [properties] Properties to set + * @returns MigrationTaskOrchestrationResult instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult): google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult; + + /** + * Encodes the specified MigrationTaskOrchestrationResult message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.verify|verify} messages. + * @param message MigrationTaskOrchestrationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MigrationTaskOrchestrationResult message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.verify|verify} messages. + * @param message MigrationTaskOrchestrationResult message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MigrationTaskOrchestrationResult message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MigrationTaskOrchestrationResult + * @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.v2alpha.MigrationTaskOrchestrationResult; + + /** + * Decodes a MigrationTaskOrchestrationResult message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MigrationTaskOrchestrationResult + * @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.v2alpha.MigrationTaskOrchestrationResult; + + /** + * Verifies a MigrationTaskOrchestrationResult 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 MigrationTaskOrchestrationResult message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MigrationTaskOrchestrationResult + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult; + + /** + * Creates a plain object from a MigrationTaskOrchestrationResult message. Also converts values to other types if specified. + * @param message MigrationTaskOrchestrationResult + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MigrationTaskOrchestrationResult to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MigrationTaskOrchestrationResult + * @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 { + + /** ResourceErrorDetail resourceInfo */ + resourceInfo?: (google.rpc.IResourceInfo|null); + + /** ResourceErrorDetail errorDetails */ + errorDetails?: (google.cloud.bigquery.migration.v2alpha.IErrorDetail[]|null); + + /** ResourceErrorDetail errorCount */ + errorCount?: (number|null); + } + + /** Represents a ResourceErrorDetail. */ + class ResourceErrorDetail implements IResourceErrorDetail { + + /** + * Constructs a new ResourceErrorDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail); + + /** ResourceErrorDetail resourceInfo. */ + public resourceInfo?: (google.rpc.IResourceInfo|null); + + /** ResourceErrorDetail errorDetails. */ + public errorDetails: google.cloud.bigquery.migration.v2alpha.IErrorDetail[]; + + /** ResourceErrorDetail errorCount. */ + public errorCount: number; + + /** + * Creates a new ResourceErrorDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceErrorDetail instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail): google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail; + + /** + * Encodes the specified ResourceErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.verify|verify} messages. + * @param message ResourceErrorDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.verify|verify} messages. + * @param message ResourceErrorDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceErrorDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceErrorDetail + * @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.v2alpha.ResourceErrorDetail; + + /** + * Decodes a ResourceErrorDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceErrorDetail + * @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.v2alpha.ResourceErrorDetail; + + /** + * Verifies a ResourceErrorDetail 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 ResourceErrorDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceErrorDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail; + + /** + * Creates a plain object from a ResourceErrorDetail message. Also converts values to other types if specified. + * @param message ResourceErrorDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceErrorDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceErrorDetail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ErrorDetail. */ + interface IErrorDetail { + + /** ErrorDetail location */ + location?: (google.cloud.bigquery.migration.v2alpha.IErrorLocation|null); + + /** ErrorDetail errorInfo */ + errorInfo?: (google.rpc.IErrorInfo|null); + } + + /** Represents an ErrorDetail. */ + class ErrorDetail implements IErrorDetail { + + /** + * Constructs a new ErrorDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IErrorDetail); + + /** ErrorDetail location. */ + public location?: (google.cloud.bigquery.migration.v2alpha.IErrorLocation|null); + + /** ErrorDetail errorInfo. */ + public errorInfo?: (google.rpc.IErrorInfo|null); + + /** + * Creates a new ErrorDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorDetail instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IErrorDetail): google.cloud.bigquery.migration.v2alpha.ErrorDetail; + + /** + * Encodes the specified ErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorDetail.verify|verify} messages. + * @param message ErrorDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorDetail.verify|verify} messages. + * @param message ErrorDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorDetail + * @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.v2alpha.ErrorDetail; + + /** + * Decodes an ErrorDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorDetail + * @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.v2alpha.ErrorDetail; + + /** + * Verifies an ErrorDetail 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 ErrorDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.ErrorDetail; + + /** + * Creates a plain object from an ErrorDetail message. Also converts values to other types if specified. + * @param message ErrorDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.ErrorDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorDetail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an ErrorLocation. */ + interface IErrorLocation { + + /** ErrorLocation line */ + line?: (number|null); + + /** ErrorLocation column */ + column?: (number|null); + } + + /** Represents an ErrorLocation. */ + class ErrorLocation implements IErrorLocation { + + /** + * Constructs a new ErrorLocation. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IErrorLocation); + + /** ErrorLocation line. */ + public line: number; + + /** ErrorLocation column. */ + public column: number; + + /** + * Creates a new ErrorLocation instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorLocation instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IErrorLocation): google.cloud.bigquery.migration.v2alpha.ErrorLocation; + + /** + * Encodes the specified ErrorLocation message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorLocation.verify|verify} messages. + * @param message ErrorLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IErrorLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorLocation message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorLocation.verify|verify} messages. + * @param message ErrorLocation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IErrorLocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorLocation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorLocation + * @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.v2alpha.ErrorLocation; + + /** + * Decodes an ErrorLocation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorLocation + * @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.v2alpha.ErrorLocation; + + /** + * Verifies an ErrorLocation 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 ErrorLocation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorLocation + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.ErrorLocation; + + /** + * Creates a plain object from an ErrorLocation message. Also converts values to other types if specified. + * @param message ErrorLocation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.ErrorLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorLocation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorLocation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimeSeries. */ + interface ITimeSeries { + + /** TimeSeries metric */ + metric?: (string|null); + + /** TimeSeries valueType */ + valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); + + /** TimeSeries metricKind */ + metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); + + /** TimeSeries points */ + points?: (google.cloud.bigquery.migration.v2alpha.IPoint[]|null); + } + + /** Represents a TimeSeries. */ + class TimeSeries implements ITimeSeries { + + /** + * Constructs a new TimeSeries. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITimeSeries); + + /** TimeSeries metric. */ + public metric: string; + + /** TimeSeries valueType. */ + public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); + + /** TimeSeries metricKind. */ + public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); + + /** TimeSeries points. */ + public points: google.cloud.bigquery.migration.v2alpha.IPoint[]; + + /** + * Creates a new TimeSeries instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeSeries instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITimeSeries): google.cloud.bigquery.migration.v2alpha.TimeSeries; + + /** + * Encodes the specified TimeSeries message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeSeries.verify|verify} messages. + * @param message TimeSeries message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeSeries.verify|verify} messages. + * @param message TimeSeries message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeSeries message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeSeries + * @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.v2alpha.TimeSeries; + + /** + * Decodes a TimeSeries message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeSeries + * @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.v2alpha.TimeSeries; + + /** + * Verifies a TimeSeries 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 TimeSeries message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeSeries + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TimeSeries; + + /** + * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. + * @param message TimeSeries + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.TimeSeries, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeSeries to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeSeries + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Point. */ + interface IPoint { + + /** Point interval */ + interval?: (google.cloud.bigquery.migration.v2alpha.ITimeInterval|null); + + /** Point value */ + value?: (google.cloud.bigquery.migration.v2alpha.ITypedValue|null); + } + + /** Represents a Point. */ + class Point implements IPoint { + + /** + * Constructs a new Point. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IPoint); + + /** Point interval. */ + public interval?: (google.cloud.bigquery.migration.v2alpha.ITimeInterval|null); + + /** Point value. */ + public value?: (google.cloud.bigquery.migration.v2alpha.ITypedValue|null); + + /** + * Creates a new Point instance using the specified properties. + * @param [properties] Properties to set + * @returns Point instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IPoint): google.cloud.bigquery.migration.v2alpha.Point; + + /** + * Encodes the specified Point message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Point.verify|verify} messages. + * @param message Point message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Point message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Point.verify|verify} messages. + * @param message Point message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Point message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Point + * @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.v2alpha.Point; + + /** + * Decodes a Point message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Point + * @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.v2alpha.Point; + + /** + * Verifies a Point 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 Point message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Point + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.Point; + + /** + * Creates a plain object from a Point message. Also converts values to other types if specified. + * @param message Point + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.Point, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Point to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Point + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TimeInterval. */ + interface ITimeInterval { + + /** TimeInterval startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** TimeInterval endTime */ + endTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a TimeInterval. */ + class TimeInterval implements ITimeInterval { + + /** + * Constructs a new TimeInterval. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITimeInterval); + + /** TimeInterval startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** TimeInterval endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new TimeInterval instance using the specified properties. + * @param [properties] Properties to set + * @returns TimeInterval instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITimeInterval): google.cloud.bigquery.migration.v2alpha.TimeInterval; + + /** + * Encodes the specified TimeInterval message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeInterval.verify|verify} messages. + * @param message TimeInterval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.ITimeInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TimeInterval message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeInterval.verify|verify} messages. + * @param message TimeInterval message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITimeInterval, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TimeInterval message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TimeInterval + * @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.v2alpha.TimeInterval; + + /** + * Decodes a TimeInterval message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TimeInterval + * @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.v2alpha.TimeInterval; + + /** + * Verifies a TimeInterval 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 TimeInterval message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TimeInterval + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TimeInterval; + + /** + * Creates a plain object from a TimeInterval message. Also converts values to other types if specified. + * @param message TimeInterval + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.TimeInterval, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TimeInterval to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TimeInterval + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TypedValue. */ + interface ITypedValue { + + /** TypedValue boolValue */ + boolValue?: (boolean|null); + + /** TypedValue int64Value */ + int64Value?: (number|Long|string|null); + + /** TypedValue doubleValue */ + doubleValue?: (number|null); + + /** TypedValue stringValue */ + stringValue?: (string|null); + + /** TypedValue distributionValue */ + distributionValue?: (google.api.IDistribution|null); + } + + /** Represents a TypedValue. */ + class TypedValue implements ITypedValue { + + /** + * Constructs a new TypedValue. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITypedValue); + + /** TypedValue boolValue. */ + public boolValue?: (boolean|null); + + /** TypedValue int64Value. */ + public int64Value?: (number|Long|string|null); + + /** TypedValue doubleValue. */ + public doubleValue?: (number|null); + + /** TypedValue stringValue. */ + public stringValue?: (string|null); + + /** TypedValue distributionValue. */ + public distributionValue?: (google.api.IDistribution|null); + + /** TypedValue value. */ + public value?: ("boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"); + + /** + * Creates a new TypedValue instance using the specified properties. + * @param [properties] Properties to set + * @returns TypedValue instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITypedValue): google.cloud.bigquery.migration.v2alpha.TypedValue; + + /** + * Encodes the specified TypedValue message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TypedValue.verify|verify} messages. + * @param message TypedValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.ITypedValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TypedValue message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TypedValue.verify|verify} messages. + * @param message TypedValue message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITypedValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TypedValue message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TypedValue + * @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.v2alpha.TypedValue; + + /** + * Decodes a TypedValue message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TypedValue + * @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.v2alpha.TypedValue; + + /** + * Verifies a TypedValue 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 TypedValue message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TypedValue + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TypedValue; + + /** + * Creates a plain object from a TypedValue message. Also converts values to other types if specified. + * @param message TypedValue + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.TypedValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TypedValue to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TypedValue + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TranslationFileMapping. */ + interface ITranslationFileMapping { + + /** TranslationFileMapping inputPath */ + inputPath?: (string|null); + + /** TranslationFileMapping outputPath */ + outputPath?: (string|null); + } + + /** Represents a TranslationFileMapping. */ + class TranslationFileMapping implements ITranslationFileMapping { + + /** + * Constructs a new TranslationFileMapping. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping); + + /** TranslationFileMapping inputPath. */ + public inputPath: string; + + /** TranslationFileMapping outputPath. */ + public outputPath: string; + + /** + * Creates a new TranslationFileMapping instance using the specified properties. + * @param [properties] Properties to set + * @returns TranslationFileMapping instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping): google.cloud.bigquery.migration.v2alpha.TranslationFileMapping; + + /** + * Encodes the specified TranslationFileMapping message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.verify|verify} messages. + * @param message TranslationFileMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TranslationFileMapping message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.verify|verify} messages. + * @param message TranslationFileMapping message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TranslationFileMapping message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TranslationFileMapping + * @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.v2alpha.TranslationFileMapping; + + /** + * Decodes a TranslationFileMapping message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TranslationFileMapping + * @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.v2alpha.TranslationFileMapping; + + /** + * Verifies a TranslationFileMapping 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 TranslationFileMapping message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TranslationFileMapping + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TranslationFileMapping; + + /** + * Creates a plain object from a TranslationFileMapping message. Also converts values to other types if specified. + * @param message TranslationFileMapping + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.TranslationFileMapping, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TranslationFileMapping to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TranslationFileMapping + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a TranslationTaskDetails. */ + interface ITranslationTaskDetails { + + /** TranslationTaskDetails teradataOptions */ + teradataOptions?: (google.cloud.bigquery.migration.v2alpha.ITeradataOptions|null); + + /** TranslationTaskDetails bteqOptions */ + bteqOptions?: (google.cloud.bigquery.migration.v2alpha.IBteqOptions|null); + + /** TranslationTaskDetails inputPath */ + inputPath?: (string|null); + + /** TranslationTaskDetails outputPath */ + outputPath?: (string|null); + + /** TranslationTaskDetails filePaths */ + filePaths?: (google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping[]|null); + + /** TranslationTaskDetails schemaPath */ + schemaPath?: (string|null); + + /** TranslationTaskDetails fileEncoding */ + fileEncoding?: (google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding|keyof typeof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding|null); + + /** TranslationTaskDetails identifierSettings */ + identifierSettings?: (google.cloud.bigquery.migration.v2alpha.IIdentifierSettings|null); + + /** TranslationTaskDetails specialTokenMap */ + specialTokenMap?: ({ [k: string]: google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.TokenType }|null); + + /** TranslationTaskDetails filter */ + filter?: (google.cloud.bigquery.migration.v2alpha.IFilter|null); + + /** TranslationTaskDetails translationExceptionTable */ + translationExceptionTable?: (string|null); + } + + /** Represents a TranslationTaskDetails. */ + class TranslationTaskDetails implements ITranslationTaskDetails { + + /** + * Constructs a new TranslationTaskDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails); + + /** TranslationTaskDetails teradataOptions. */ + public teradataOptions?: (google.cloud.bigquery.migration.v2alpha.ITeradataOptions|null); + + /** TranslationTaskDetails bteqOptions. */ + public bteqOptions?: (google.cloud.bigquery.migration.v2alpha.IBteqOptions|null); + + /** TranslationTaskDetails inputPath. */ + public inputPath: string; + + /** TranslationTaskDetails outputPath. */ + public outputPath: string; + + /** TranslationTaskDetails filePaths. */ + public filePaths: google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping[]; + + /** TranslationTaskDetails schemaPath. */ + public schemaPath: string; + + /** TranslationTaskDetails fileEncoding. */ + public fileEncoding: (google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding|keyof typeof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding); + + /** TranslationTaskDetails identifierSettings. */ + public identifierSettings?: (google.cloud.bigquery.migration.v2alpha.IIdentifierSettings|null); + + /** TranslationTaskDetails specialTokenMap. */ + public specialTokenMap: { [k: string]: google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.TokenType }; + + /** TranslationTaskDetails filter. */ + public filter?: (google.cloud.bigquery.migration.v2alpha.IFilter|null); + + /** TranslationTaskDetails translationExceptionTable. */ + public translationExceptionTable: string; + + /** TranslationTaskDetails languageOptions. */ + public languageOptions?: ("teradataOptions"|"bteqOptions"); + + /** + * Creates a new TranslationTaskDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns TranslationTaskDetails instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails): google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails; + + /** + * Encodes the specified TranslationTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.verify|verify} messages. + * @param message TranslationTaskDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TranslationTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.verify|verify} messages. + * @param message TranslationTaskDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TranslationTaskDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TranslationTaskDetails + * @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.v2alpha.TranslationTaskDetails; + + /** + * Decodes a TranslationTaskDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TranslationTaskDetails + * @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.v2alpha.TranslationTaskDetails; + + /** + * Verifies a TranslationTaskDetails 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 TranslationTaskDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TranslationTaskDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails; + + /** + * Creates a plain object from a TranslationTaskDetails message. Also converts values to other types if specified. + * @param message TranslationTaskDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TranslationTaskDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TranslationTaskDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TranslationTaskDetails { + + /** FileEncoding enum. */ + enum FileEncoding { + FILE_ENCODING_UNSPECIFIED = 0, + UTF_8 = 1, + ISO_8859_1 = 2, + US_ASCII = 3, + UTF_16 = 4, + UTF_16LE = 5, + UTF_16BE = 6 + } + + /** TokenType enum. */ + enum TokenType { + TOKEN_TYPE_UNSPECIFIED = 0, + STRING = 1, + INT64 = 2, + NUMERIC = 3, + BOOL = 4, + FLOAT64 = 5, + DATE = 6, + TIMESTAMP = 7 + } + } + + /** Properties of a Filter. */ + interface IFilter { + + /** Filter inputFileExclusionPrefixes */ + inputFileExclusionPrefixes?: (string[]|null); + } + + /** Represents a Filter. */ + class Filter implements IFilter { + + /** + * Constructs a new Filter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IFilter); + + /** Filter inputFileExclusionPrefixes. */ + public inputFileExclusionPrefixes: string[]; + + /** + * Creates a new Filter instance using the specified properties. + * @param [properties] Properties to set + * @returns Filter instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IFilter): google.cloud.bigquery.migration.v2alpha.Filter; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Filter.verify|verify} messages. + * @param message Filter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Filter + * @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.v2alpha.Filter; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Filter + * @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.v2alpha.Filter; + + /** + * Verifies a Filter 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 Filter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Filter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.Filter; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @param message Filter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Filter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Filter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an IdentifierSettings. */ + interface IIdentifierSettings { + + /** IdentifierSettings outputIdentifierCase */ + outputIdentifierCase?: (google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase|keyof typeof google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase|null); + + /** IdentifierSettings identifierRewriteMode */ + identifierRewriteMode?: (google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode|keyof typeof google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode|null); + } + + /** Represents an IdentifierSettings. */ + class IdentifierSettings implements IIdentifierSettings { + + /** + * Constructs a new IdentifierSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IIdentifierSettings); + + /** IdentifierSettings outputIdentifierCase. */ + public outputIdentifierCase: (google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase|keyof typeof google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase); + + /** IdentifierSettings identifierRewriteMode. */ + public identifierRewriteMode: (google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode|keyof typeof google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode); + + /** + * Creates a new IdentifierSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns IdentifierSettings instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IIdentifierSettings): google.cloud.bigquery.migration.v2alpha.IdentifierSettings; + + /** + * Encodes the specified IdentifierSettings message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.IdentifierSettings.verify|verify} messages. + * @param message IdentifierSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IIdentifierSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IdentifierSettings message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.IdentifierSettings.verify|verify} messages. + * @param message IdentifierSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IIdentifierSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an IdentifierSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IdentifierSettings + * @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.v2alpha.IdentifierSettings; + + /** + * Decodes an IdentifierSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IdentifierSettings + * @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.v2alpha.IdentifierSettings; + + /** + * Verifies an IdentifierSettings 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 IdentifierSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IdentifierSettings + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.IdentifierSettings; + + /** + * Creates a plain object from an IdentifierSettings message. Also converts values to other types if specified. + * @param message IdentifierSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.IdentifierSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IdentifierSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IdentifierSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace IdentifierSettings { + + /** IdentifierCase enum. */ + enum IdentifierCase { + IDENTIFIER_CASE_UNSPECIFIED = 0, + ORIGINAL = 1, + UPPER = 2, + LOWER = 3 + } + + /** IdentifierRewriteMode enum. */ + enum IdentifierRewriteMode { + IDENTIFIER_REWRITE_MODE_UNSPECIFIED = 0, + NONE = 1, + REWRITE_ALL = 2 + } + } + + /** Properties of a TeradataOptions. */ + interface ITeradataOptions { + } + + /** Represents a TeradataOptions. */ + class TeradataOptions implements ITeradataOptions { + + /** + * Constructs a new TeradataOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITeradataOptions); + + /** + * Creates a new TeradataOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns TeradataOptions instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITeradataOptions): google.cloud.bigquery.migration.v2alpha.TeradataOptions; + + /** + * Encodes the specified TeradataOptions message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TeradataOptions.verify|verify} messages. + * @param message TeradataOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.ITeradataOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TeradataOptions message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TeradataOptions.verify|verify} messages. + * @param message TeradataOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITeradataOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TeradataOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TeradataOptions + * @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.v2alpha.TeradataOptions; + + /** + * Decodes a TeradataOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TeradataOptions + * @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.v2alpha.TeradataOptions; + + /** + * Verifies a TeradataOptions 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 TeradataOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TeradataOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TeradataOptions; + + /** + * Creates a plain object from a TeradataOptions message. Also converts values to other types if specified. + * @param message TeradataOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.TeradataOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TeradataOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TeradataOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BteqOptions. */ + interface IBteqOptions { + + /** BteqOptions projectDataset */ + projectDataset?: (google.cloud.bigquery.migration.v2alpha.IDatasetReference|null); + + /** BteqOptions defaultPathUri */ + defaultPathUri?: (string|null); + + /** BteqOptions fileReplacementMap */ + fileReplacementMap?: ({ [k: string]: string }|null); + } + + /** Represents a BteqOptions. */ + class BteqOptions implements IBteqOptions { + + /** + * Constructs a new BteqOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IBteqOptions); + + /** BteqOptions projectDataset. */ + public projectDataset?: (google.cloud.bigquery.migration.v2alpha.IDatasetReference|null); + + /** BteqOptions defaultPathUri. */ + public defaultPathUri: string; + + /** BteqOptions fileReplacementMap. */ + public fileReplacementMap: { [k: string]: string }; + + /** + * Creates a new BteqOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns BteqOptions instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IBteqOptions): google.cloud.bigquery.migration.v2alpha.BteqOptions; + + /** + * Encodes the specified BteqOptions message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.BteqOptions.verify|verify} messages. + * @param message BteqOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IBteqOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BteqOptions message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.BteqOptions.verify|verify} messages. + * @param message BteqOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IBteqOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BteqOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BteqOptions + * @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.v2alpha.BteqOptions; + + /** + * Decodes a BteqOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BteqOptions + * @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.v2alpha.BteqOptions; + + /** + * Verifies a BteqOptions 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 BteqOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BteqOptions + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.BteqOptions; + + /** + * Creates a plain object from a BteqOptions message. Also converts values to other types if specified. + * @param message BteqOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.BteqOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BteqOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BteqOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DatasetReference. */ + interface IDatasetReference { + + /** DatasetReference datasetId */ + datasetId?: (string|null); + + /** DatasetReference projectId */ + projectId?: (string|null); + } + + /** Represents a DatasetReference. */ + class DatasetReference implements IDatasetReference { + + /** + * Constructs a new DatasetReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IDatasetReference); + + /** DatasetReference datasetId. */ + public datasetId: string; + + /** DatasetReference projectId. */ + public projectId: string; + + /** + * Creates a new DatasetReference instance using the specified properties. + * @param [properties] Properties to set + * @returns DatasetReference instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IDatasetReference): google.cloud.bigquery.migration.v2alpha.DatasetReference; + + /** + * Encodes the specified DatasetReference message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DatasetReference.verify|verify} messages. + * @param message DatasetReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IDatasetReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DatasetReference message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DatasetReference.verify|verify} messages. + * @param message DatasetReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IDatasetReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DatasetReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DatasetReference + * @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.v2alpha.DatasetReference; + + /** + * Decodes a DatasetReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DatasetReference + * @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.v2alpha.DatasetReference; + + /** + * Verifies a DatasetReference 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 DatasetReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DatasetReference + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.DatasetReference; + + /** + * Creates a plain object from a DatasetReference message. Also converts values to other types if specified. + * @param message DatasetReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.DatasetReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DatasetReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DatasetReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a MigrationService */ + class MigrationService extends $protobuf.rpc.Service { + + /** + * Constructs a new MigrationService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new MigrationService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MigrationService; + + /** + * Calls CreateMigrationWorkflow. + * @param request CreateMigrationWorkflowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MigrationWorkflow + */ + public createMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2alpha.MigrationService.CreateMigrationWorkflowCallback): void; + + /** + * Calls CreateMigrationWorkflow. + * @param request CreateMigrationWorkflowRequest message or plain object + * @returns Promise + */ + public createMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest): Promise; + + /** + * Calls GetMigrationWorkflow. + * @param request GetMigrationWorkflowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MigrationWorkflow + */ + public getMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationWorkflowCallback): void; + + /** + * Calls GetMigrationWorkflow. + * @param request GetMigrationWorkflowRequest message or plain object + * @returns Promise + */ + public getMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest): Promise; + + /** + * Calls ListMigrationWorkflows. + * @param request ListMigrationWorkflowsRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMigrationWorkflowsResponse + */ + public listMigrationWorkflows(request: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, callback: google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationWorkflowsCallback): void; + + /** + * Calls ListMigrationWorkflows. + * @param request ListMigrationWorkflowsRequest message or plain object + * @returns Promise + */ + public listMigrationWorkflows(request: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest): Promise; + + /** + * Calls DeleteMigrationWorkflow. + * @param request DeleteMigrationWorkflowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2alpha.MigrationService.DeleteMigrationWorkflowCallback): void; + + /** + * Calls DeleteMigrationWorkflow. + * @param request DeleteMigrationWorkflowRequest message or plain object + * @returns Promise + */ + public deleteMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest): Promise; + + /** + * Calls StartMigrationWorkflow. + * @param request StartMigrationWorkflowRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public startMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2alpha.MigrationService.StartMigrationWorkflowCallback): void; + + /** + * Calls StartMigrationWorkflow. + * @param request StartMigrationWorkflowRequest message or plain object + * @returns Promise + */ + public startMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest): Promise; + + /** + * Calls GetMigrationSubtask. + * @param request GetMigrationSubtaskRequest message or plain object + * @param callback Node-style callback called with the error, if any, and MigrationSubtask + */ + public getMigrationSubtask(request: google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest, callback: google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationSubtaskCallback): void; + + /** + * Calls GetMigrationSubtask. + * @param request GetMigrationSubtaskRequest message or plain object + * @returns Promise + */ + public getMigrationSubtask(request: google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest): Promise; + + /** + * Calls ListMigrationSubtasks. + * @param request ListMigrationSubtasksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListMigrationSubtasksResponse + */ + public listMigrationSubtasks(request: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, callback: google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationSubtasksCallback): void; + + /** + * Calls ListMigrationSubtasks. + * @param request ListMigrationSubtasksRequest message or plain object + * @returns Promise + */ + public listMigrationSubtasks(request: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest): Promise; + } + + namespace MigrationService { + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|createMigrationWorkflow}. + * @param error Error, if any + * @param [response] MigrationWorkflow + */ + type CreateMigrationWorkflowCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2alpha.MigrationWorkflow) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|getMigrationWorkflow}. + * @param error Error, if any + * @param [response] MigrationWorkflow + */ + type GetMigrationWorkflowCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2alpha.MigrationWorkflow) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|listMigrationWorkflows}. + * @param error Error, if any + * @param [response] ListMigrationWorkflowsResponse + */ + type ListMigrationWorkflowsCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|deleteMigrationWorkflow}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteMigrationWorkflowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|startMigrationWorkflow}. + * @param error Error, if any + * @param [response] Empty + */ + type StartMigrationWorkflowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|getMigrationSubtask}. + * @param error Error, if any + * @param [response] MigrationSubtask + */ + type GetMigrationSubtaskCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2alpha.MigrationSubtask) => void; + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|listMigrationSubtasks}. + * @param error Error, if any + * @param [response] ListMigrationSubtasksResponse + */ + type ListMigrationSubtasksCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse) => void; + } + + /** Properties of a CreateMigrationWorkflowRequest. */ + interface ICreateMigrationWorkflowRequest { + + /** CreateMigrationWorkflowRequest parent */ + parent?: (string|null); + + /** CreateMigrationWorkflowRequest migrationWorkflow */ + migrationWorkflow?: (google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow|null); + } + + /** Represents a CreateMigrationWorkflowRequest. */ + class CreateMigrationWorkflowRequest implements ICreateMigrationWorkflowRequest { + + /** + * Constructs a new CreateMigrationWorkflowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest); + + /** CreateMigrationWorkflowRequest parent. */ + public parent: string; + + /** CreateMigrationWorkflowRequest migrationWorkflow. */ + public migrationWorkflow?: (google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow|null); + + /** + * Creates a new CreateMigrationWorkflowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateMigrationWorkflowRequest instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest): google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest; + + /** + * Encodes the specified CreateMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest.verify|verify} messages. + * @param message CreateMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest.verify|verify} messages. + * @param message CreateMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateMigrationWorkflowRequest + * @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.v2alpha.CreateMigrationWorkflowRequest; + + /** + * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateMigrationWorkflowRequest + * @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.v2alpha.CreateMigrationWorkflowRequest; + + /** + * Verifies a CreateMigrationWorkflowRequest 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 CreateMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateMigrationWorkflowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest; + + /** + * Creates a plain object from a CreateMigrationWorkflowRequest message. Also converts values to other types if specified. + * @param message CreateMigrationWorkflowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateMigrationWorkflowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateMigrationWorkflowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMigrationWorkflowRequest. */ + interface IGetMigrationWorkflowRequest { + + /** GetMigrationWorkflowRequest name */ + name?: (string|null); + + /** GetMigrationWorkflowRequest readMask */ + readMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a GetMigrationWorkflowRequest. */ + class GetMigrationWorkflowRequest implements IGetMigrationWorkflowRequest { + + /** + * Constructs a new GetMigrationWorkflowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest); + + /** GetMigrationWorkflowRequest name. */ + public name: string; + + /** GetMigrationWorkflowRequest readMask. */ + public readMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new GetMigrationWorkflowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMigrationWorkflowRequest instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest): google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest; + + /** + * Encodes the specified GetMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest.verify|verify} messages. + * @param message GetMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest.verify|verify} messages. + * @param message GetMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMigrationWorkflowRequest + * @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.v2alpha.GetMigrationWorkflowRequest; + + /** + * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMigrationWorkflowRequest + * @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.v2alpha.GetMigrationWorkflowRequest; + + /** + * Verifies a GetMigrationWorkflowRequest 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 GetMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMigrationWorkflowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest; + + /** + * Creates a plain object from a GetMigrationWorkflowRequest message. Also converts values to other types if specified. + * @param message GetMigrationWorkflowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMigrationWorkflowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMigrationWorkflowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMigrationWorkflowsRequest. */ + interface IListMigrationWorkflowsRequest { + + /** ListMigrationWorkflowsRequest parent */ + parent?: (string|null); + + /** ListMigrationWorkflowsRequest readMask */ + readMask?: (google.protobuf.IFieldMask|null); + + /** ListMigrationWorkflowsRequest pageSize */ + pageSize?: (number|null); + + /** ListMigrationWorkflowsRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListMigrationWorkflowsRequest. */ + class ListMigrationWorkflowsRequest implements IListMigrationWorkflowsRequest { + + /** + * Constructs a new ListMigrationWorkflowsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest); + + /** ListMigrationWorkflowsRequest parent. */ + public parent: string; + + /** ListMigrationWorkflowsRequest readMask. */ + public readMask?: (google.protobuf.IFieldMask|null); + + /** ListMigrationWorkflowsRequest pageSize. */ + public pageSize: number; + + /** ListMigrationWorkflowsRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListMigrationWorkflowsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMigrationWorkflowsRequest instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest): google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest; + + /** + * Encodes the specified ListMigrationWorkflowsRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest.verify|verify} messages. + * @param message ListMigrationWorkflowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMigrationWorkflowsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest.verify|verify} messages. + * @param message ListMigrationWorkflowsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMigrationWorkflowsRequest + * @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.v2alpha.ListMigrationWorkflowsRequest; + + /** + * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMigrationWorkflowsRequest + * @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.v2alpha.ListMigrationWorkflowsRequest; + + /** + * Verifies a ListMigrationWorkflowsRequest 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 ListMigrationWorkflowsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMigrationWorkflowsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest; + + /** + * Creates a plain object from a ListMigrationWorkflowsRequest message. Also converts values to other types if specified. + * @param message ListMigrationWorkflowsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMigrationWorkflowsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMigrationWorkflowsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMigrationWorkflowsResponse. */ + interface IListMigrationWorkflowsResponse { + + /** ListMigrationWorkflowsResponse migrationWorkflows */ + migrationWorkflows?: (google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[]|null); + + /** ListMigrationWorkflowsResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMigrationWorkflowsResponse. */ + class ListMigrationWorkflowsResponse implements IListMigrationWorkflowsResponse { + + /** + * Constructs a new ListMigrationWorkflowsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse); + + /** ListMigrationWorkflowsResponse migrationWorkflows. */ + public migrationWorkflows: google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[]; + + /** ListMigrationWorkflowsResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListMigrationWorkflowsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMigrationWorkflowsResponse instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse): google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse; + + /** + * Encodes the specified ListMigrationWorkflowsResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse.verify|verify} messages. + * @param message ListMigrationWorkflowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMigrationWorkflowsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse.verify|verify} messages. + * @param message ListMigrationWorkflowsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMigrationWorkflowsResponse + * @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.v2alpha.ListMigrationWorkflowsResponse; + + /** + * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMigrationWorkflowsResponse + * @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.v2alpha.ListMigrationWorkflowsResponse; + + /** + * Verifies a ListMigrationWorkflowsResponse 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 ListMigrationWorkflowsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMigrationWorkflowsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse; + + /** + * Creates a plain object from a ListMigrationWorkflowsResponse message. Also converts values to other types if specified. + * @param message ListMigrationWorkflowsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMigrationWorkflowsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMigrationWorkflowsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteMigrationWorkflowRequest. */ + interface IDeleteMigrationWorkflowRequest { + + /** DeleteMigrationWorkflowRequest name */ + name?: (string|null); + } + + /** Represents a DeleteMigrationWorkflowRequest. */ + class DeleteMigrationWorkflowRequest implements IDeleteMigrationWorkflowRequest { + + /** + * Constructs a new DeleteMigrationWorkflowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest); + + /** DeleteMigrationWorkflowRequest name. */ + public name: string; + + /** + * Creates a new DeleteMigrationWorkflowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteMigrationWorkflowRequest instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest): google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest; + + /** + * Encodes the specified DeleteMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest.verify|verify} messages. + * @param message DeleteMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest.verify|verify} messages. + * @param message DeleteMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteMigrationWorkflowRequest + * @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.v2alpha.DeleteMigrationWorkflowRequest; + + /** + * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteMigrationWorkflowRequest + * @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.v2alpha.DeleteMigrationWorkflowRequest; + + /** + * Verifies a DeleteMigrationWorkflowRequest 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 DeleteMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteMigrationWorkflowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest; + + /** + * Creates a plain object from a DeleteMigrationWorkflowRequest message. Also converts values to other types if specified. + * @param message DeleteMigrationWorkflowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteMigrationWorkflowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteMigrationWorkflowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a StartMigrationWorkflowRequest. */ + interface IStartMigrationWorkflowRequest { + + /** StartMigrationWorkflowRequest name */ + name?: (string|null); + } + + /** Represents a StartMigrationWorkflowRequest. */ + class StartMigrationWorkflowRequest implements IStartMigrationWorkflowRequest { + + /** + * Constructs a new StartMigrationWorkflowRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest); + + /** StartMigrationWorkflowRequest name. */ + public name: string; + + /** + * Creates a new StartMigrationWorkflowRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns StartMigrationWorkflowRequest instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest): google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest; + + /** + * Encodes the specified StartMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest.verify|verify} messages. + * @param message StartMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified StartMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest.verify|verify} messages. + * @param message StartMigrationWorkflowRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns StartMigrationWorkflowRequest + * @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.v2alpha.StartMigrationWorkflowRequest; + + /** + * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns StartMigrationWorkflowRequest + * @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.v2alpha.StartMigrationWorkflowRequest; + + /** + * Verifies a StartMigrationWorkflowRequest 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 StartMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns StartMigrationWorkflowRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest; + + /** + * Creates a plain object from a StartMigrationWorkflowRequest message. Also converts values to other types if specified. + * @param message StartMigrationWorkflowRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this StartMigrationWorkflowRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for StartMigrationWorkflowRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetMigrationSubtaskRequest. */ + interface IGetMigrationSubtaskRequest { + + /** GetMigrationSubtaskRequest name */ + name?: (string|null); + + /** GetMigrationSubtaskRequest readMask */ + readMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents a GetMigrationSubtaskRequest. */ + class GetMigrationSubtaskRequest implements IGetMigrationSubtaskRequest { + + /** + * Constructs a new GetMigrationSubtaskRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest); + + /** GetMigrationSubtaskRequest name. */ + public name: string; + + /** GetMigrationSubtaskRequest readMask. */ + public readMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new GetMigrationSubtaskRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetMigrationSubtaskRequest instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest): google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest; + + /** + * Encodes the specified GetMigrationSubtaskRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest.verify|verify} messages. + * @param message GetMigrationSubtaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetMigrationSubtaskRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest.verify|verify} messages. + * @param message GetMigrationSubtaskRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetMigrationSubtaskRequest + * @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.v2alpha.GetMigrationSubtaskRequest; + + /** + * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetMigrationSubtaskRequest + * @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.v2alpha.GetMigrationSubtaskRequest; + + /** + * Verifies a GetMigrationSubtaskRequest 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 GetMigrationSubtaskRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetMigrationSubtaskRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest; + + /** + * Creates a plain object from a GetMigrationSubtaskRequest message. Also converts values to other types if specified. + * @param message GetMigrationSubtaskRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetMigrationSubtaskRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetMigrationSubtaskRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMigrationSubtasksRequest. */ + interface IListMigrationSubtasksRequest { + + /** ListMigrationSubtasksRequest parent */ + parent?: (string|null); + + /** ListMigrationSubtasksRequest readMask */ + readMask?: (google.protobuf.IFieldMask|null); + + /** ListMigrationSubtasksRequest pageSize */ + pageSize?: (number|null); + + /** ListMigrationSubtasksRequest pageToken */ + pageToken?: (string|null); + + /** ListMigrationSubtasksRequest filter */ + filter?: (string|null); + } + + /** Represents a ListMigrationSubtasksRequest. */ + class ListMigrationSubtasksRequest implements IListMigrationSubtasksRequest { + + /** + * Constructs a new ListMigrationSubtasksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest); + + /** ListMigrationSubtasksRequest parent. */ + public parent: string; + + /** ListMigrationSubtasksRequest readMask. */ + public readMask?: (google.protobuf.IFieldMask|null); + + /** ListMigrationSubtasksRequest pageSize. */ + public pageSize: number; + + /** ListMigrationSubtasksRequest pageToken. */ + public pageToken: string; + + /** ListMigrationSubtasksRequest filter. */ + public filter: string; + + /** + * Creates a new ListMigrationSubtasksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMigrationSubtasksRequest instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest): google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest; + + /** + * Encodes the specified ListMigrationSubtasksRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest.verify|verify} messages. + * @param message ListMigrationSubtasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMigrationSubtasksRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest.verify|verify} messages. + * @param message ListMigrationSubtasksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMigrationSubtasksRequest + * @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.v2alpha.ListMigrationSubtasksRequest; + + /** + * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMigrationSubtasksRequest + * @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.v2alpha.ListMigrationSubtasksRequest; + + /** + * Verifies a ListMigrationSubtasksRequest 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 ListMigrationSubtasksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMigrationSubtasksRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest; + + /** + * Creates a plain object from a ListMigrationSubtasksRequest message. Also converts values to other types if specified. + * @param message ListMigrationSubtasksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMigrationSubtasksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMigrationSubtasksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListMigrationSubtasksResponse. */ + interface IListMigrationSubtasksResponse { + + /** ListMigrationSubtasksResponse migrationSubtasks */ + migrationSubtasks?: (google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[]|null); + + /** ListMigrationSubtasksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListMigrationSubtasksResponse. */ + class ListMigrationSubtasksResponse implements IListMigrationSubtasksResponse { + + /** + * Constructs a new ListMigrationSubtasksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse); + + /** ListMigrationSubtasksResponse migrationSubtasks. */ + public migrationSubtasks: google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[]; + + /** ListMigrationSubtasksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListMigrationSubtasksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListMigrationSubtasksResponse instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse): google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse; + + /** + * Encodes the specified ListMigrationSubtasksResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse.verify|verify} messages. + * @param message ListMigrationSubtasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListMigrationSubtasksResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse.verify|verify} messages. + * @param message ListMigrationSubtasksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListMigrationSubtasksResponse + * @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.v2alpha.ListMigrationSubtasksResponse; + + /** + * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListMigrationSubtasksResponse + * @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.v2alpha.ListMigrationSubtasksResponse; + + /** + * Verifies a ListMigrationSubtasksResponse 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 ListMigrationSubtasksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListMigrationSubtasksResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse; + + /** + * Creates a plain object from a ListMigrationSubtasksResponse message. Also converts values to other types if specified. + * @param message ListMigrationSubtasksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListMigrationSubtasksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListMigrationSubtasksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a SqlTranslationService */ + class SqlTranslationService extends $protobuf.rpc.Service { + + /** + * Constructs a new SqlTranslationService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + */ + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + + /** + * Creates new SqlTranslationService service using the specified rpc implementation. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited + * @returns RPC service. Useful where requests and/or responses are streamed. + */ + public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SqlTranslationService; + + /** + * Calls TranslateQuery. + * @param request TranslateQueryRequest message or plain object + * @param callback Node-style callback called with the error, if any, and TranslateQueryResponse + */ + public translateQuery(request: google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest, callback: google.cloud.bigquery.migration.v2alpha.SqlTranslationService.TranslateQueryCallback): void; + + /** + * Calls TranslateQuery. + * @param request TranslateQueryRequest message or plain object + * @returns Promise + */ + public translateQuery(request: google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest): Promise; + } + + namespace SqlTranslationService { + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationService|translateQuery}. + * @param error Error, if any + * @param [response] TranslateQueryResponse + */ + type TranslateQueryCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse) => void; + } + + /** Properties of a TranslateQueryRequest. */ + interface ITranslateQueryRequest { + + /** TranslateQueryRequest parent */ + parent?: (string|null); + + /** TranslateQueryRequest sourceDialect */ + sourceDialect?: (google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect|keyof typeof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect|null); + + /** TranslateQueryRequest query */ + query?: (string|null); + } + + /** Represents a TranslateQueryRequest. */ + class TranslateQueryRequest implements ITranslateQueryRequest { + + /** + * Constructs a new TranslateQueryRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest); + + /** TranslateQueryRequest parent. */ + public parent: string; + + /** TranslateQueryRequest sourceDialect. */ + public sourceDialect: (google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect|keyof typeof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect); + + /** TranslateQueryRequest query. */ + public query: string; + + /** + * Creates a new TranslateQueryRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns TranslateQueryRequest instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest): google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest; + + /** + * Encodes the specified TranslateQueryRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.verify|verify} messages. + * @param message TranslateQueryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TranslateQueryRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.verify|verify} messages. + * @param message TranslateQueryRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TranslateQueryRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TranslateQueryRequest + * @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.v2alpha.TranslateQueryRequest; + + /** + * Decodes a TranslateQueryRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TranslateQueryRequest + * @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.v2alpha.TranslateQueryRequest; + + /** + * Verifies a TranslateQueryRequest 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 TranslateQueryRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TranslateQueryRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest; + + /** + * Creates a plain object from a TranslateQueryRequest message. Also converts values to other types if specified. + * @param message TranslateQueryRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TranslateQueryRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TranslateQueryRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace TranslateQueryRequest { + + /** SqlTranslationSourceDialect enum. */ + enum SqlTranslationSourceDialect { + SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED = 0, + TERADATA = 1 + } + } + + /** Properties of a TranslateQueryResponse. */ + interface ITranslateQueryResponse { + + /** TranslateQueryResponse translationJob */ + translationJob?: (string|null); + + /** TranslateQueryResponse translatedQuery */ + translatedQuery?: (string|null); + + /** TranslateQueryResponse errors */ + errors?: (google.cloud.bigquery.migration.v2alpha.ISqlTranslationError[]|null); + + /** TranslateQueryResponse warnings */ + warnings?: (google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning[]|null); + } + + /** Represents a TranslateQueryResponse. */ + class TranslateQueryResponse implements ITranslateQueryResponse { + + /** + * Constructs a new TranslateQueryResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse); + + /** TranslateQueryResponse translationJob. */ + public translationJob: string; + + /** TranslateQueryResponse translatedQuery. */ + public translatedQuery: string; + + /** TranslateQueryResponse errors. */ + public errors: google.cloud.bigquery.migration.v2alpha.ISqlTranslationError[]; + + /** TranslateQueryResponse warnings. */ + public warnings: google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning[]; + + /** + * Creates a new TranslateQueryResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns TranslateQueryResponse instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse): google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse; + + /** + * Encodes the specified TranslateQueryResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.verify|verify} messages. + * @param message TranslateQueryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified TranslateQueryResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.verify|verify} messages. + * @param message TranslateQueryResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a TranslateQueryResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns TranslateQueryResponse + * @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.v2alpha.TranslateQueryResponse; + + /** + * Decodes a TranslateQueryResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns TranslateQueryResponse + * @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.v2alpha.TranslateQueryResponse; + + /** + * Verifies a TranslateQueryResponse 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 TranslateQueryResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns TranslateQueryResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse; + + /** + * Creates a plain object from a TranslateQueryResponse message. Also converts values to other types if specified. + * @param message TranslateQueryResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this TranslateQueryResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for TranslateQueryResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SqlTranslationErrorDetail. */ + interface ISqlTranslationErrorDetail { + + /** SqlTranslationErrorDetail row */ + row?: (number|Long|string|null); + + /** SqlTranslationErrorDetail column */ + column?: (number|Long|string|null); + + /** SqlTranslationErrorDetail message */ + message?: (string|null); + } + + /** Represents a SqlTranslationErrorDetail. */ + class SqlTranslationErrorDetail implements ISqlTranslationErrorDetail { + + /** + * Constructs a new SqlTranslationErrorDetail. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail); + + /** SqlTranslationErrorDetail row. */ + public row: (number|Long|string); + + /** SqlTranslationErrorDetail column. */ + public column: (number|Long|string); + + /** SqlTranslationErrorDetail message. */ + public message: string; + + /** + * Creates a new SqlTranslationErrorDetail instance using the specified properties. + * @param [properties] Properties to set + * @returns SqlTranslationErrorDetail instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail): google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail; + + /** + * Encodes the specified SqlTranslationErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.verify|verify} messages. + * @param message SqlTranslationErrorDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SqlTranslationErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.verify|verify} messages. + * @param message SqlTranslationErrorDetail message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SqlTranslationErrorDetail message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SqlTranslationErrorDetail + * @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.v2alpha.SqlTranslationErrorDetail; + + /** + * Decodes a SqlTranslationErrorDetail message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SqlTranslationErrorDetail + * @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.v2alpha.SqlTranslationErrorDetail; + + /** + * Verifies a SqlTranslationErrorDetail 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 SqlTranslationErrorDetail message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SqlTranslationErrorDetail + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail; + + /** + * Creates a plain object from a SqlTranslationErrorDetail message. Also converts values to other types if specified. + * @param message SqlTranslationErrorDetail + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SqlTranslationErrorDetail to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SqlTranslationErrorDetail + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SqlTranslationError. */ + interface ISqlTranslationError { + + /** SqlTranslationError errorType */ + errorType?: (google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType|keyof typeof google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType|null); + + /** SqlTranslationError errorDetail */ + errorDetail?: (google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null); + } + + /** Represents a SqlTranslationError. */ + class SqlTranslationError implements ISqlTranslationError { + + /** + * Constructs a new SqlTranslationError. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.ISqlTranslationError); + + /** SqlTranslationError errorType. */ + public errorType: (google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType|keyof typeof google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType); + + /** SqlTranslationError errorDetail. */ + public errorDetail?: (google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null); + + /** + * Creates a new SqlTranslationError instance using the specified properties. + * @param [properties] Properties to set + * @returns SqlTranslationError instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.ISqlTranslationError): google.cloud.bigquery.migration.v2alpha.SqlTranslationError; + + /** + * Encodes the specified SqlTranslationError message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationError.verify|verify} messages. + * @param message SqlTranslationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.ISqlTranslationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SqlTranslationError message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationError.verify|verify} messages. + * @param message SqlTranslationError message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ISqlTranslationError, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SqlTranslationError message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SqlTranslationError + * @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.v2alpha.SqlTranslationError; + + /** + * Decodes a SqlTranslationError message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SqlTranslationError + * @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.v2alpha.SqlTranslationError; + + /** + * Verifies a SqlTranslationError 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 SqlTranslationError message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SqlTranslationError + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.SqlTranslationError; + + /** + * Creates a plain object from a SqlTranslationError message. Also converts values to other types if specified. + * @param message SqlTranslationError + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.SqlTranslationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SqlTranslationError to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SqlTranslationError + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SqlTranslationError { + + /** SqlTranslationErrorType enum. */ + enum SqlTranslationErrorType { + SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED = 0, + SQL_PARSE_ERROR = 1, + UNSUPPORTED_SQL_FUNCTION = 2 + } + } + + /** Properties of a SqlTranslationWarning. */ + interface ISqlTranslationWarning { + + /** SqlTranslationWarning warningDetail */ + warningDetail?: (google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null); + } + + /** Represents a SqlTranslationWarning. */ + class SqlTranslationWarning implements ISqlTranslationWarning { + + /** + * Constructs a new SqlTranslationWarning. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning); + + /** SqlTranslationWarning warningDetail. */ + public warningDetail?: (google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null); + + /** + * Creates a new SqlTranslationWarning instance using the specified properties. + * @param [properties] Properties to set + * @returns SqlTranslationWarning instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning): google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning; + + /** + * Encodes the specified SqlTranslationWarning message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.verify|verify} messages. + * @param message SqlTranslationWarning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SqlTranslationWarning message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.verify|verify} messages. + * @param message SqlTranslationWarning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SqlTranslationWarning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SqlTranslationWarning + * @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.v2alpha.SqlTranslationWarning; + + /** + * Decodes a SqlTranslationWarning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SqlTranslationWarning + * @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.v2alpha.SqlTranslationWarning; + + /** + * Verifies a SqlTranslationWarning 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 SqlTranslationWarning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SqlTranslationWarning + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning; + + /** + * Creates a plain object from a SqlTranslationWarning message. Also converts values to other types if specified. + * @param message SqlTranslationWarning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SqlTranslationWarning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SqlTranslationWarning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @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.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @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.api.ResourceReference; + + /** + * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Distribution. */ + interface IDistribution { + + /** Distribution count */ + count?: (number|Long|string|null); + + /** Distribution mean */ + mean?: (number|null); + + /** Distribution sumOfSquaredDeviation */ + sumOfSquaredDeviation?: (number|null); + + /** Distribution range */ + range?: (google.api.Distribution.IRange|null); + + /** Distribution bucketOptions */ + bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** Distribution bucketCounts */ + bucketCounts?: ((number|Long|string)[]|null); + + /** Distribution exemplars */ + exemplars?: (google.api.Distribution.IExemplar[]|null); + } + + /** Represents a Distribution. */ + class Distribution implements IDistribution { + + /** + * Constructs a new Distribution. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDistribution); + + /** Distribution count. */ + public count: (number|Long|string); + + /** Distribution mean. */ + public mean: number; + + /** Distribution sumOfSquaredDeviation. */ + public sumOfSquaredDeviation: number; + + /** Distribution range. */ + public range?: (google.api.Distribution.IRange|null); + + /** Distribution bucketOptions. */ + public bucketOptions?: (google.api.Distribution.IBucketOptions|null); + + /** Distribution bucketCounts. */ + public bucketCounts: (number|Long|string)[]; + + /** Distribution exemplars. */ + public exemplars: google.api.Distribution.IExemplar[]; + + /** + * Creates a new Distribution instance using the specified properties. + * @param [properties] Properties to set + * @returns Distribution instance + */ + public static create(properties?: google.api.IDistribution): google.api.Distribution; + + /** + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @param message Distribution message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Distribution message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Distribution + * @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.api.Distribution; + + /** + * Decodes a Distribution message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Distribution + * @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.api.Distribution; + + /** + * Verifies a Distribution 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 Distribution message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Distribution + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution; + + /** + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @param message Distribution + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Distribution to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Distribution + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Distribution { + + /** Properties of a Range. */ + interface IRange { + + /** Range min */ + min?: (number|null); + + /** Range max */ + max?: (number|null); + } + + /** Represents a Range. */ + class Range implements IRange { + + /** + * Constructs a new Range. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IRange); + + /** Range min. */ + public min: number; + + /** Range max. */ + public max: number; + + /** + * Creates a new Range instance using the specified properties. + * @param [properties] Properties to set + * @returns Range instance + */ + public static create(properties?: google.api.Distribution.IRange): google.api.Distribution.Range; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @param message Range message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Range message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Range + * @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.api.Distribution.Range; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Range + * @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.api.Distribution.Range; + + /** + * Verifies a Range 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 Range message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Range + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Range; + + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @param message Range + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Range to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Range + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a BucketOptions. */ + interface IBucketOptions { + + /** BucketOptions linearBuckets */ + linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + + /** BucketOptions exponentialBuckets */ + exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + + /** BucketOptions explicitBuckets */ + explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + } + + /** Represents a BucketOptions. */ + class BucketOptions implements IBucketOptions { + + /** + * Constructs a new BucketOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IBucketOptions); + + /** BucketOptions linearBuckets. */ + public linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); + + /** BucketOptions exponentialBuckets. */ + public exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); + + /** BucketOptions explicitBuckets. */ + public explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); + + /** BucketOptions options. */ + public options?: ("linearBuckets"|"exponentialBuckets"|"explicitBuckets"); + + /** + * Creates a new BucketOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns BucketOptions instance + */ + public static create(properties?: google.api.Distribution.IBucketOptions): google.api.Distribution.BucketOptions; + + /** + * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @param message BucketOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @param message BucketOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BucketOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BucketOptions + * @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.api.Distribution.BucketOptions; + + /** + * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BucketOptions + * @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.api.Distribution.BucketOptions; + + /** + * Verifies a BucketOptions 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 BucketOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BucketOptions + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions; + + /** + * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * @param message BucketOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BucketOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BucketOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BucketOptions { + + /** Properties of a Linear. */ + interface ILinear { + + /** Linear numFiniteBuckets */ + numFiniteBuckets?: (number|null); + + /** Linear width */ + width?: (number|null); + + /** Linear offset */ + offset?: (number|null); + } + + /** Represents a Linear. */ + class Linear implements ILinear { + + /** + * Constructs a new Linear. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.ILinear); + + /** Linear numFiniteBuckets. */ + public numFiniteBuckets: number; + + /** Linear width. */ + public width: number; + + /** Linear offset. */ + public offset: number; + + /** + * Creates a new Linear instance using the specified properties. + * @param [properties] Properties to set + * @returns Linear instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.ILinear): google.api.Distribution.BucketOptions.Linear; + + /** + * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @param message Linear message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @param message Linear message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Linear message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Linear + * @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.api.Distribution.BucketOptions.Linear; + + /** + * Decodes a Linear message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Linear + * @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.api.Distribution.BucketOptions.Linear; + + /** + * Verifies a Linear 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 Linear message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Linear + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Linear; + + /** + * Creates a plain object from a Linear message. Also converts values to other types if specified. + * @param message Linear + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Linear, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Linear to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Linear + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Exponential. */ + interface IExponential { + + /** Exponential numFiniteBuckets */ + numFiniteBuckets?: (number|null); + + /** Exponential growthFactor */ + growthFactor?: (number|null); + + /** Exponential scale */ + scale?: (number|null); + } + + /** Represents an Exponential. */ + class Exponential implements IExponential { + + /** + * Constructs a new Exponential. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.IExponential); + + /** Exponential numFiniteBuckets. */ + public numFiniteBuckets: number; + + /** Exponential growthFactor. */ + public growthFactor: number; + + /** Exponential scale. */ + public scale: number; + + /** + * Creates a new Exponential instance using the specified properties. + * @param [properties] Properties to set + * @returns Exponential instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.IExponential): google.api.Distribution.BucketOptions.Exponential; + + /** + * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @param message Exponential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @param message Exponential message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Exponential message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exponential + * @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.api.Distribution.BucketOptions.Exponential; + + /** + * Decodes an Exponential message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exponential + * @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.api.Distribution.BucketOptions.Exponential; + + /** + * Verifies an Exponential 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 Exponential message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exponential + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Exponential; + + /** + * Creates a plain object from an Exponential message. Also converts values to other types if specified. + * @param message Exponential + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Exponential, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Exponential to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Exponential + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Explicit. */ + interface IExplicit { + + /** Explicit bounds */ + bounds?: (number[]|null); + } + + /** Represents an Explicit. */ + class Explicit implements IExplicit { + + /** + * Constructs a new Explicit. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.BucketOptions.IExplicit); + + /** Explicit bounds. */ + public bounds: number[]; + + /** + * Creates a new Explicit instance using the specified properties. + * @param [properties] Properties to set + * @returns Explicit instance + */ + public static create(properties?: google.api.Distribution.BucketOptions.IExplicit): google.api.Distribution.BucketOptions.Explicit; + + /** + * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @param message Explicit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @param message Explicit message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Explicit message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Explicit + * @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.api.Distribution.BucketOptions.Explicit; + + /** + * Decodes an Explicit message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Explicit + * @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.api.Distribution.BucketOptions.Explicit; + + /** + * Verifies an Explicit 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 Explicit message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Explicit + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Explicit; + + /** + * Creates a plain object from an Explicit message. Also converts values to other types if specified. + * @param message Explicit + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.BucketOptions.Explicit, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Explicit to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Explicit + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an Exemplar. */ + interface IExemplar { + + /** Exemplar value */ + value?: (number|null); + + /** Exemplar timestamp */ + timestamp?: (google.protobuf.ITimestamp|null); + + /** Exemplar attachments */ + attachments?: (google.protobuf.IAny[]|null); + } + + /** Represents an Exemplar. */ + class Exemplar implements IExemplar { + + /** + * Constructs a new Exemplar. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.Distribution.IExemplar); + + /** Exemplar value. */ + public value: number; + + /** Exemplar timestamp. */ + public timestamp?: (google.protobuf.ITimestamp|null); + + /** Exemplar attachments. */ + public attachments: google.protobuf.IAny[]; + + /** + * Creates a new Exemplar instance using the specified properties. + * @param [properties] Properties to set + * @returns Exemplar instance + */ + public static create(properties?: google.api.Distribution.IExemplar): google.api.Distribution.Exemplar; + + /** + * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @param message Exemplar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @param message Exemplar message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Exemplar message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Exemplar + * @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.api.Distribution.Exemplar; + + /** + * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Exemplar + * @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.api.Distribution.Exemplar; + + /** + * Verifies an Exemplar 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 Exemplar message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Exemplar + */ + public static fromObject(object: { [k: string]: any }): google.api.Distribution.Exemplar; + + /** + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * @param message Exemplar + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Distribution.Exemplar, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Exemplar to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Exemplar + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a MetricDescriptor. */ + interface IMetricDescriptor { + + /** MetricDescriptor name */ + name?: (string|null); + + /** MetricDescriptor type */ + type?: (string|null); + + /** MetricDescriptor labels */ + labels?: (google.api.ILabelDescriptor[]|null); + + /** MetricDescriptor metricKind */ + metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); + + /** MetricDescriptor valueType */ + valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); + + /** MetricDescriptor unit */ + unit?: (string|null); + + /** MetricDescriptor description */ + description?: (string|null); + + /** MetricDescriptor displayName */ + displayName?: (string|null); + + /** MetricDescriptor metadata */ + metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + + /** MetricDescriptor launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** MetricDescriptor monitoredResourceTypes */ + monitoredResourceTypes?: (string[]|null); + } + + /** Represents a MetricDescriptor. */ + class MetricDescriptor implements IMetricDescriptor { + + /** + * Constructs a new MetricDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMetricDescriptor); + + /** MetricDescriptor name. */ + public name: string; + + /** MetricDescriptor type. */ + public type: string; + + /** MetricDescriptor labels. */ + public labels: google.api.ILabelDescriptor[]; + + /** MetricDescriptor metricKind. */ + public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); + + /** MetricDescriptor valueType. */ + public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); + + /** MetricDescriptor unit. */ + public unit: string; + + /** MetricDescriptor description. */ + public description: string; + + /** MetricDescriptor displayName. */ + public displayName: string; + + /** MetricDescriptor metadata. */ + public metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); + + /** MetricDescriptor launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** MetricDescriptor monitoredResourceTypes. */ + public monitoredResourceTypes: string[]; + + /** + * Creates a new MetricDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricDescriptor instance + */ + public static create(properties?: google.api.IMetricDescriptor): google.api.MetricDescriptor; + + /** + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @param message MetricDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricDescriptor + * @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.api.MetricDescriptor; + + /** + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricDescriptor + * @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.api.MetricDescriptor; + + /** + * Verifies a MetricDescriptor 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 MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor; + + /** + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * @param message MetricDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MetricDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MetricDescriptor { + + /** MetricKind enum. */ + enum MetricKind { + METRIC_KIND_UNSPECIFIED = 0, + GAUGE = 1, + DELTA = 2, + CUMULATIVE = 3 + } + + /** ValueType enum. */ + enum ValueType { + VALUE_TYPE_UNSPECIFIED = 0, + BOOL = 1, + INT64 = 2, + DOUBLE = 3, + STRING = 4, + DISTRIBUTION = 5, + MONEY = 6 + } + + /** Properties of a MetricDescriptorMetadata. */ + interface IMetricDescriptorMetadata { + + /** MetricDescriptorMetadata launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** MetricDescriptorMetadata samplePeriod */ + samplePeriod?: (google.protobuf.IDuration|null); + + /** MetricDescriptorMetadata ingestDelay */ + ingestDelay?: (google.protobuf.IDuration|null); + + /** MetricDescriptorMetadata timeSeriesResourceHierarchyLevel */ + timeSeriesResourceHierarchyLevel?: (google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel[]|null); + } + + /** Represents a MetricDescriptorMetadata. */ + class MetricDescriptorMetadata implements IMetricDescriptorMetadata { + + /** + * Constructs a new MetricDescriptorMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata); + + /** MetricDescriptorMetadata launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** MetricDescriptorMetadata samplePeriod. */ + public samplePeriod?: (google.protobuf.IDuration|null); + + /** MetricDescriptorMetadata ingestDelay. */ + public ingestDelay?: (google.protobuf.IDuration|null); + + /** MetricDescriptorMetadata timeSeriesResourceHierarchyLevel. */ + public timeSeriesResourceHierarchyLevel: google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel[]; + + /** + * Creates a new MetricDescriptorMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns MetricDescriptorMetadata instance + */ + public static create(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata): google.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @param message MetricDescriptorMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MetricDescriptorMetadata + * @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.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MetricDescriptorMetadata + * @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.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Verifies a MetricDescriptorMetadata 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 MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MetricDescriptorMetadata + */ + public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor.MetricDescriptorMetadata; + + /** + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. + * @param message MetricDescriptorMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MetricDescriptor.MetricDescriptorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MetricDescriptorMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MetricDescriptorMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MetricDescriptorMetadata { + + /** TimeSeriesResourceHierarchyLevel enum. */ + enum TimeSeriesResourceHierarchyLevel { + TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0, + PROJECT = 1, + ORGANIZATION = 2, + FOLDER = 3 + } + } + } + + /** Properties of a Metric. */ + interface IMetric { + + /** Metric type */ + type?: (string|null); + + /** Metric labels */ + labels?: ({ [k: string]: string }|null); + } + + /** Represents a Metric. */ + class Metric implements IMetric { + + /** + * Constructs a new Metric. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMetric); + + /** Metric type. */ + public type: string; + + /** Metric labels. */ + public labels: { [k: string]: string }; + + /** + * Creates a new Metric instance using the specified properties. + * @param [properties] Properties to set + * @returns Metric instance + */ + public static create(properties?: google.api.IMetric): google.api.Metric; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @param message Metric message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Metric + * @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.api.Metric; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Metric + * @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.api.Metric; + + /** + * Verifies a Metric 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 Metric message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Metric + */ + public static fromObject(object: { [k: string]: any }): google.api.Metric; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @param message Metric + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Metric to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Metric + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LabelDescriptor. */ + interface ILabelDescriptor { + + /** LabelDescriptor key */ + key?: (string|null); + + /** LabelDescriptor valueType */ + valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); + + /** LabelDescriptor description */ + description?: (string|null); + } + + /** Represents a LabelDescriptor. */ + class LabelDescriptor implements ILabelDescriptor { + + /** + * Constructs a new LabelDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ILabelDescriptor); + + /** LabelDescriptor key. */ + public key: string; + + /** LabelDescriptor valueType. */ + public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); + + /** LabelDescriptor description. */ + public description: string; + + /** + * Creates a new LabelDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns LabelDescriptor instance + */ + public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; + + /** + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @param message LabelDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LabelDescriptor + * @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.api.LabelDescriptor; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LabelDescriptor + * @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.api.LabelDescriptor; + + /** + * Verifies a LabelDescriptor 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 LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LabelDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; + + /** + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @param message LabelDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LabelDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LabelDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace LabelDescriptor { + + /** ValueType enum. */ + enum ValueType { + STRING = 0, + BOOL = 1, + INT64 = 2 + } + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** Properties of a Http. */ + interface IHttp { + + /** Http rules */ + rules?: (google.api.IHttpRule[]|null); + + /** Http fullyDecodeReservedExpansion */ + fullyDecodeReservedExpansion?: (boolean|null); + } + + /** Represents a Http. */ + class Http implements IHttp { + + /** + * Constructs a new Http. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttp); + + /** Http rules. */ + public rules: google.api.IHttpRule[]; + + /** Http fullyDecodeReservedExpansion. */ + public fullyDecodeReservedExpansion: boolean; + + /** + * Creates a new Http instance using the specified properties. + * @param [properties] Properties to set + * @returns Http instance + */ + public static create(properties?: google.api.IHttp): google.api.Http; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @param message Http message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Http message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Http + * @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.api.Http; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Http + * @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.api.Http; + + /** + * Verifies a Http 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 Http message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Http + */ + public static fromObject(object: { [k: string]: any }): google.api.Http; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @param message Http + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Http to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Http + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a HttpRule. */ + interface IHttpRule { + + /** HttpRule selector */ + selector?: (string|null); + + /** HttpRule get */ + get?: (string|null); + + /** HttpRule put */ + put?: (string|null); + + /** HttpRule post */ + post?: (string|null); + + /** HttpRule delete */ + "delete"?: (string|null); + + /** HttpRule patch */ + patch?: (string|null); + + /** HttpRule custom */ + custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body */ + body?: (string|null); + + /** HttpRule responseBody */ + responseBody?: (string|null); + + /** HttpRule additionalBindings */ + additionalBindings?: (google.api.IHttpRule[]|null); + } + + /** Represents a HttpRule. */ + class HttpRule implements IHttpRule { + + /** + * Constructs a new HttpRule. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IHttpRule); + + /** HttpRule selector. */ + public selector: string; + + /** HttpRule get. */ + public get?: (string|null); + + /** HttpRule put. */ + public put?: (string|null); + + /** HttpRule post. */ + public post?: (string|null); + + /** HttpRule delete. */ + public delete?: (string|null); + + /** HttpRule patch. */ + public patch?: (string|null); + + /** HttpRule custom. */ + public custom?: (google.api.ICustomHttpPattern|null); + + /** HttpRule body. */ + public body: string; + + /** HttpRule responseBody. */ + public responseBody: string; + + /** HttpRule additionalBindings. */ + public additionalBindings: google.api.IHttpRule[]; + + /** HttpRule pattern. */ + public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); + + /** + * Creates a new HttpRule instance using the specified properties. + * @param [properties] Properties to set + * @returns HttpRule instance + */ + public static create(properties?: google.api.IHttpRule): google.api.HttpRule; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @param message HttpRule message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns HttpRule + * @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.api.HttpRule; + + /** + * Verifies a HttpRule 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns HttpRule + */ + public static fromObject(object: { [k: string]: any }): google.api.HttpRule; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @param message HttpRule + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this HttpRule to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for HttpRule + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CustomHttpPattern. */ + interface ICustomHttpPattern { + + /** CustomHttpPattern kind */ + kind?: (string|null); + + /** CustomHttpPattern path */ + path?: (string|null); + } + + /** Represents a CustomHttpPattern. */ + class CustomHttpPattern implements ICustomHttpPattern { + + /** + * Constructs a new CustomHttpPattern. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICustomHttpPattern); + + /** CustomHttpPattern kind. */ + public kind: string; + + /** CustomHttpPattern path. */ + public path: string; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @param [properties] Properties to set + * @returns CustomHttpPattern instance + */ + public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @param message CustomHttpPattern message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CustomHttpPattern + * @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.api.CustomHttpPattern; + + /** + * Verifies a CustomHttpPattern 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CustomHttpPattern + */ + public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @param message CustomHttpPattern + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CustomHttpPattern to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CustomHttpPattern + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CommonLanguageSettings. */ + interface ICommonLanguageSettings { + + /** CommonLanguageSettings referenceDocsUri */ + referenceDocsUri?: (string|null); + + /** CommonLanguageSettings destinations */ + destinations?: (google.api.ClientLibraryDestination[]|null); + + /** CommonLanguageSettings selectiveGapicGeneration */ + selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + } + + /** Represents a CommonLanguageSettings. */ + class CommonLanguageSettings implements ICommonLanguageSettings { + + /** + * Constructs a new CommonLanguageSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICommonLanguageSettings); + + /** CommonLanguageSettings referenceDocsUri. */ + public referenceDocsUri: string; + + /** CommonLanguageSettings destinations. */ + public destinations: google.api.ClientLibraryDestination[]; + + /** CommonLanguageSettings selectiveGapicGeneration. */ + public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CommonLanguageSettings instance + */ + public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @param message CommonLanguageSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CommonLanguageSettings + * @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.api.CommonLanguageSettings; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CommonLanguageSettings + * @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.api.CommonLanguageSettings; + + /** + * Verifies a CommonLanguageSettings 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 CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CommonLanguageSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @param message CommonLanguageSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CommonLanguageSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ClientLibrarySettings. */ + interface IClientLibrarySettings { + + /** ClientLibrarySettings version */ + version?: (string|null); + + /** ClientLibrarySettings launchStage */ + launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); + + /** ClientLibrarySettings restNumericEnums */ + restNumericEnums?: (boolean|null); + + /** ClientLibrarySettings javaSettings */ + javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings */ + cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings */ + phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings */ + pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings */ + nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings */ + dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings */ + rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings */ + goSettings?: (google.api.IGoSettings|null); + } + + /** Represents a ClientLibrarySettings. */ + class ClientLibrarySettings implements IClientLibrarySettings { + + /** + * Constructs a new ClientLibrarySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IClientLibrarySettings); + + /** ClientLibrarySettings version. */ + public version: string; + + /** ClientLibrarySettings launchStage. */ + public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); + + /** ClientLibrarySettings restNumericEnums. */ + public restNumericEnums: boolean; + + /** ClientLibrarySettings javaSettings. */ + public javaSettings?: (google.api.IJavaSettings|null); + + /** ClientLibrarySettings cppSettings. */ + public cppSettings?: (google.api.ICppSettings|null); + + /** ClientLibrarySettings phpSettings. */ + public phpSettings?: (google.api.IPhpSettings|null); + + /** ClientLibrarySettings pythonSettings. */ + public pythonSettings?: (google.api.IPythonSettings|null); + + /** ClientLibrarySettings nodeSettings. */ + public nodeSettings?: (google.api.INodeSettings|null); + + /** ClientLibrarySettings dotnetSettings. */ + public dotnetSettings?: (google.api.IDotnetSettings|null); + + /** ClientLibrarySettings rubySettings. */ + public rubySettings?: (google.api.IRubySettings|null); + + /** ClientLibrarySettings goSettings. */ + public goSettings?: (google.api.IGoSettings|null); + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns ClientLibrarySettings instance + */ + public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @param message ClientLibrarySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ClientLibrarySettings + * @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.api.ClientLibrarySettings; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ClientLibrarySettings + * @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.api.ClientLibrarySettings; + + /** + * Verifies a ClientLibrarySettings 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 ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ClientLibrarySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @param message ClientLibrarySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ClientLibrarySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Publishing. */ + interface IPublishing { + + /** Publishing methodSettings */ + methodSettings?: (google.api.IMethodSettings[]|null); + + /** Publishing newIssueUri */ + newIssueUri?: (string|null); + + /** Publishing documentationUri */ + documentationUri?: (string|null); + + /** Publishing apiShortName */ + apiShortName?: (string|null); + + /** Publishing githubLabel */ + githubLabel?: (string|null); + + /** Publishing codeownerGithubTeams */ + codeownerGithubTeams?: (string[]|null); + + /** Publishing docTagPrefix */ + docTagPrefix?: (string|null); + + /** Publishing organization */ + organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); + + /** Publishing librarySettings */ + librarySettings?: (google.api.IClientLibrarySettings[]|null); + + /** Publishing protoReferenceDocumentationUri */ + protoReferenceDocumentationUri?: (string|null); + + /** Publishing restReferenceDocumentationUri */ + restReferenceDocumentationUri?: (string|null); + } + + /** Represents a Publishing. */ + class Publishing implements IPublishing { + + /** + * Constructs a new Publishing. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPublishing); + + /** Publishing methodSettings. */ + public methodSettings: google.api.IMethodSettings[]; + + /** Publishing newIssueUri. */ + public newIssueUri: string; + + /** Publishing documentationUri. */ + public documentationUri: string; + + /** Publishing apiShortName. */ + public apiShortName: string; + + /** Publishing githubLabel. */ + public githubLabel: string; + + /** Publishing codeownerGithubTeams. */ + public codeownerGithubTeams: string[]; + + /** Publishing docTagPrefix. */ + public docTagPrefix: string; + + /** Publishing organization. */ + public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); + + /** Publishing librarySettings. */ + public librarySettings: google.api.IClientLibrarySettings[]; + + /** Publishing protoReferenceDocumentationUri. */ + public protoReferenceDocumentationUri: string; + + /** Publishing restReferenceDocumentationUri. */ + public restReferenceDocumentationUri: string; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @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.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @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.api.Publishing; + + /** + * Verifies a Publishing 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 Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @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.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @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.api.JavaSettings; + + /** + * Verifies a JavaSettings 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 JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @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.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @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.api.CppSettings; + + /** + * Verifies a CppSettings 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 CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @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.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @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.api.PhpSettings; + + /** + * Verifies a PhpSettings 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 PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures */ + experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** PythonSettings experimentalFeatures. */ + public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @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.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @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.api.PythonSettings; + + /** + * Verifies a PythonSettings 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 PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PythonSettings { + + /** Properties of an ExperimentalFeatures. */ + interface IExperimentalFeatures { + + /** ExperimentalFeatures restAsyncIoEnabled */ + restAsyncIoEnabled?: (boolean|null); + + /** ExperimentalFeatures protobufPythonicTypesEnabled */ + protobufPythonicTypesEnabled?: (boolean|null); + + /** ExperimentalFeatures unversionedPackageDisabled */ + unversionedPackageDisabled?: (boolean|null); + } + + /** Represents an ExperimentalFeatures. */ + class ExperimentalFeatures implements IExperimentalFeatures { + + /** + * Constructs a new ExperimentalFeatures. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); + + /** ExperimentalFeatures restAsyncIoEnabled. */ + public restAsyncIoEnabled: boolean; + + /** ExperimentalFeatures protobufPythonicTypesEnabled. */ + public protobufPythonicTypesEnabled: boolean; + + /** ExperimentalFeatures unversionedPackageDisabled. */ + public unversionedPackageDisabled: boolean; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @param [properties] Properties to set + * @returns ExperimentalFeatures instance + */ + public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @param message ExperimentalFeatures message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExperimentalFeatures + * @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.api.PythonSettings.ExperimentalFeatures; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExperimentalFeatures + * @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.api.PythonSettings.ExperimentalFeatures; + + /** + * Verifies an ExperimentalFeatures 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 ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExperimentalFeatures + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @param message ExperimentalFeatures + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExperimentalFeatures + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @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.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @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.api.NodeSettings; + + /** + * Verifies a NodeSettings 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 NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @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.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @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.api.DotnetSettings; + + /** + * Verifies a DotnetSettings 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 DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @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.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @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.api.RubySettings; + + /** + * Verifies a RubySettings 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 RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** GoSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** GoSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @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.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @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.api.GoSettings; + + /** + * Verifies a GoSettings 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 GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @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.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @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.api.MethodSettings; + + /** + * Verifies a MethodSettings 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 MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @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.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @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.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning 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 LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** Properties of a SelectiveGapicGeneration. */ + interface ISelectiveGapicGeneration { + + /** SelectiveGapicGeneration methods */ + methods?: (string[]|null); + + /** SelectiveGapicGeneration generateOmittedAsInternal */ + generateOmittedAsInternal?: (boolean|null); + } + + /** Represents a SelectiveGapicGeneration. */ + class SelectiveGapicGeneration implements ISelectiveGapicGeneration { + + /** + * Constructs a new SelectiveGapicGeneration. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ISelectiveGapicGeneration); + + /** SelectiveGapicGeneration methods. */ + public methods: string[]; + + /** SelectiveGapicGeneration generateOmittedAsInternal. */ + public generateOmittedAsInternal: boolean; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @param [properties] Properties to set + * @returns SelectiveGapicGeneration instance + */ + public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @param message SelectiveGapicGeneration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SelectiveGapicGeneration + * @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.api.SelectiveGapicGeneration; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SelectiveGapicGeneration + * @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.api.SelectiveGapicGeneration; + + /** + * Verifies a SelectiveGapicGeneration 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 SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SelectiveGapicGeneration + */ + public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @param message SelectiveGapicGeneration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @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.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_LEGACY = 900, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto optionDependency */ + optionDependency?: (string[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto optionDependency. */ + public optionDependency: string[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @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.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + + /** DescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** DescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @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.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @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.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange 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 ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @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.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange 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 ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @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.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions 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 ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @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.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @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.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration 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 Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @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.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @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.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto 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 OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + + /** EnumDescriptorProto visibility */ + visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** EnumDescriptorProto visibility. */ + public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @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.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto 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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @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.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange 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 EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @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.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto 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 EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @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.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @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.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @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.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @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.protobuf.FileOptions; + + /** + * Verifies a FileOptions 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 FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @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.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @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.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions 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 MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @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.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @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.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions 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 FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @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.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @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.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault 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 EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FeatureSupport. */ + interface IFeatureSupport { + + /** FeatureSupport editionIntroduced */ + editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport editionDeprecated */ + editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSupport deprecationWarning */ + deprecationWarning?: (string|null); + + /** FeatureSupport editionRemoved */ + editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSupport. */ + class FeatureSupport implements IFeatureSupport { + + /** + * Constructs a new FeatureSupport. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); + + /** FeatureSupport editionIntroduced. */ + public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport editionDeprecated. */ + public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSupport deprecationWarning. */ + public deprecationWarning: string; + + /** FeatureSupport editionRemoved. */ + public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSupport instance + */ + public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @param message FeatureSupport message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSupport + * @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.protobuf.FieldOptions.FeatureSupport; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSupport + * @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.protobuf.FieldOptions.FeatureSupport; + + /** + * Verifies a FeatureSupport 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 FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSupport + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @param message FeatureSupport + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSupport to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSupport + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @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.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @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.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions 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 OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @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.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @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.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions 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 EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions featureSupport */ + featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions featureSupport. */ + public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @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.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + + /** ServiceOptions .google.api.apiVersion */ + ".google.api.apiVersion"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @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.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @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.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @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.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @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.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions 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 MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|Buffer|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|Buffer|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @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.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @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.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption 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 UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @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.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart 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 NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + + /** FeatureSet enforceNamingStyle */ + enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); + + /** FeatureSet defaultSymbolVisibility */ + defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** FeatureSet enforceNamingStyle. */ + public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); + + /** FeatureSet defaultSymbolVisibility. */ + public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @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.protobuf.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @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.protobuf.FeatureSet; + + /** + * Verifies a FeatureSet 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 FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + + /** EnforceNamingStyle enum. */ + enum EnforceNamingStyle { + ENFORCE_NAMING_STYLE_UNKNOWN = 0, + STYLE2024 = 1, + STYLE_LEGACY = 2 + } + + /** Properties of a VisibilityFeature. */ + interface IVisibilityFeature { + } + + /** Represents a VisibilityFeature. */ + class VisibilityFeature implements IVisibilityFeature { + + /** + * Constructs a new VisibilityFeature. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); + + /** + * Creates a new VisibilityFeature instance using the specified properties. + * @param [properties] Properties to set + * @returns VisibilityFeature instance + */ + public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @param message VisibilityFeature message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns VisibilityFeature + * @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.protobuf.FeatureSet.VisibilityFeature; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns VisibilityFeature + * @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.protobuf.FeatureSet.VisibilityFeature; + + /** + * Verifies a VisibilityFeature 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 VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns VisibilityFeature + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @param message VisibilityFeature + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this VisibilityFeature to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for VisibilityFeature + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace VisibilityFeature { + + /** DefaultSymbolVisibility enum. */ + enum DefaultSymbolVisibility { + DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, + EXPORT_ALL = 1, + EXPORT_TOP_LEVEL = 2, + LOCAL_ALL = 3, + STRICT = 4 + } + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @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.protobuf.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @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.protobuf.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults 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 FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault overridableFeatures */ + overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures */ + fixedFeatures?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault overridableFeatures. */ + public overridableFeatures?: (google.protobuf.IFeatureSet|null); + + /** FeatureSetEditionDefault fixedFeatures. */ + public fixedFeatures?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @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.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @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.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault 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 FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @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.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @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.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location 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 Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @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.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @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.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation 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 Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** SymbolVisibility enum. */ + enum SymbolVisibility { + VISIBILITY_UNSET = 0, + VISIBILITY_LOCAL = 1, + VISIBILITY_EXPORT = 2 + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @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.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @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.protobuf.Duration; + + /** + * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Any. */ + interface IAny { + + /** Any type_url */ + type_url?: (string|null); + + /** Any value */ + value?: (Uint8Array|Buffer|string|null); + } + + /** Represents an Any. */ + class Any implements IAny { + + /** + * Constructs a new Any. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IAny); + + /** Any type_url. */ + public type_url: string; + + /** Any value. */ + public value: (Uint8Array|Buffer|string); + + /** + * Creates a new Any instance using the specified properties. + * @param [properties] Properties to set + * @returns Any instance + */ + public static create(properties?: google.protobuf.IAny): google.protobuf.Any; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @param message Any message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Any message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Any + * @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.protobuf.Any; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Any + * @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.protobuf.Any; + + /** + * Verifies an Any 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 Any message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Any + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Any; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @param message Any + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Any to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Any + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ + seconds?: (number|Long|string|null); + + /** Timestamp nanos */ + nanos?: (number|null); + } + + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { + + /** + * Constructs a new Timestamp. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ITimestamp); + + /** Timestamp seconds. */ + public seconds: (number|Long|string); + + /** Timestamp nanos. */ + public nanos: number; + + /** + * Creates a new Timestamp instance using the specified properties. + * @param [properties] Properties to set + * @returns Timestamp instance + */ + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @param message Timestamp message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Timestamp + * @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.protobuf.Timestamp; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Timestamp + * @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.protobuf.Timestamp; + + /** + * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Timestamp + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @param message Timestamp + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Timestamp to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Timestamp + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an Empty. */ + interface IEmpty { + } + + /** Represents an Empty. */ + class Empty implements IEmpty { + + /** + * Constructs a new Empty. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEmpty); + + /** + * Creates a new Empty instance using the specified properties. + * @param [properties] Properties to set + * @returns Empty instance + */ + public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @param message Empty message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Empty + * @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.protobuf.Empty; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Empty + * @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.protobuf.Empty; + + /** + * Verifies an Empty 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 Empty message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Empty + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @param message Empty + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Empty to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Empty + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldMask. */ + interface IFieldMask { + + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @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.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @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.protobuf.FieldMask; + + /** + * Verifies a FieldMask 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 FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace rpc. */ + namespace rpc { + + /** Properties of an ErrorInfo. */ + interface IErrorInfo { + + /** ErrorInfo reason */ + reason?: (string|null); + + /** ErrorInfo domain */ + domain?: (string|null); + + /** ErrorInfo metadata */ + metadata?: ({ [k: string]: string }|null); + } + + /** Represents an ErrorInfo. */ + class ErrorInfo implements IErrorInfo { + + /** + * Constructs a new ErrorInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IErrorInfo); + + /** ErrorInfo reason. */ + public reason: string; + + /** ErrorInfo domain. */ + public domain: string; + + /** ErrorInfo metadata. */ + public metadata: { [k: string]: string }; + + /** + * Creates a new ErrorInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ErrorInfo instance + */ + public static create(properties?: google.rpc.IErrorInfo): google.rpc.ErrorInfo; + + /** + * Encodes the specified ErrorInfo message. Does not implicitly {@link google.rpc.ErrorInfo.verify|verify} messages. + * @param message ErrorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ErrorInfo message, length delimited. Does not implicitly {@link google.rpc.ErrorInfo.verify|verify} messages. + * @param message ErrorInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ErrorInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ErrorInfo + * @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.rpc.ErrorInfo; + + /** + * Decodes an ErrorInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ErrorInfo + * @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.rpc.ErrorInfo; + + /** + * Verifies an ErrorInfo 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 ErrorInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ErrorInfo + */ + public static fromObject(object: { [k: string]: any }): google.rpc.ErrorInfo; + + /** + * Creates a plain object from an ErrorInfo message. Also converts values to other types if specified. + * @param message ErrorInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.ErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ErrorInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ErrorInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RetryInfo. */ + interface IRetryInfo { + + /** RetryInfo retryDelay */ + retryDelay?: (google.protobuf.IDuration|null); + } + + /** Represents a RetryInfo. */ + class RetryInfo implements IRetryInfo { + + /** + * Constructs a new RetryInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IRetryInfo); + + /** RetryInfo retryDelay. */ + public retryDelay?: (google.protobuf.IDuration|null); + + /** + * Creates a new RetryInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RetryInfo instance + */ + public static create(properties?: google.rpc.IRetryInfo): google.rpc.RetryInfo; + + /** + * Encodes the specified RetryInfo message. Does not implicitly {@link google.rpc.RetryInfo.verify|verify} messages. + * @param message RetryInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IRetryInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RetryInfo message, length delimited. Does not implicitly {@link google.rpc.RetryInfo.verify|verify} messages. + * @param message RetryInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IRetryInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RetryInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RetryInfo + * @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.rpc.RetryInfo; + + /** + * Decodes a RetryInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RetryInfo + * @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.rpc.RetryInfo; + + /** + * Verifies a RetryInfo 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 RetryInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RetryInfo + */ + public static fromObject(object: { [k: string]: any }): google.rpc.RetryInfo; + + /** + * Creates a plain object from a RetryInfo message. Also converts values to other types if specified. + * @param message RetryInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.RetryInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RetryInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RetryInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DebugInfo. */ + interface IDebugInfo { + + /** DebugInfo stackEntries */ + stackEntries?: (string[]|null); + + /** DebugInfo detail */ + detail?: (string|null); + } + + /** Represents a DebugInfo. */ + class DebugInfo implements IDebugInfo { + + /** + * Constructs a new DebugInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IDebugInfo); + + /** DebugInfo stackEntries. */ + public stackEntries: string[]; + + /** DebugInfo detail. */ + public detail: string; + + /** + * Creates a new DebugInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns DebugInfo instance + */ + public static create(properties?: google.rpc.IDebugInfo): google.rpc.DebugInfo; + + /** + * Encodes the specified DebugInfo message. Does not implicitly {@link google.rpc.DebugInfo.verify|verify} messages. + * @param message DebugInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IDebugInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DebugInfo message, length delimited. Does not implicitly {@link google.rpc.DebugInfo.verify|verify} messages. + * @param message DebugInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IDebugInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DebugInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DebugInfo + * @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.rpc.DebugInfo; + + /** + * Decodes a DebugInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DebugInfo + * @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.rpc.DebugInfo; + + /** + * Verifies a DebugInfo 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 DebugInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DebugInfo + */ + public static fromObject(object: { [k: string]: any }): google.rpc.DebugInfo; + + /** + * Creates a plain object from a DebugInfo message. Also converts values to other types if specified. + * @param message DebugInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.DebugInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DebugInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DebugInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a QuotaFailure. */ + interface IQuotaFailure { + + /** QuotaFailure violations */ + violations?: (google.rpc.QuotaFailure.IViolation[]|null); + } + + /** Represents a QuotaFailure. */ + class QuotaFailure implements IQuotaFailure { + + /** + * Constructs a new QuotaFailure. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IQuotaFailure); + + /** QuotaFailure violations. */ + public violations: google.rpc.QuotaFailure.IViolation[]; + + /** + * Creates a new QuotaFailure instance using the specified properties. + * @param [properties] Properties to set + * @returns QuotaFailure instance + */ + public static create(properties?: google.rpc.IQuotaFailure): google.rpc.QuotaFailure; + + /** + * Encodes the specified QuotaFailure message. Does not implicitly {@link google.rpc.QuotaFailure.verify|verify} messages. + * @param message QuotaFailure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IQuotaFailure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified QuotaFailure message, length delimited. Does not implicitly {@link google.rpc.QuotaFailure.verify|verify} messages. + * @param message QuotaFailure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IQuotaFailure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a QuotaFailure message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns QuotaFailure + * @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.rpc.QuotaFailure; + + /** + * Decodes a QuotaFailure message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns QuotaFailure + * @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.rpc.QuotaFailure; + + /** + * Verifies a QuotaFailure 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 QuotaFailure message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns QuotaFailure + */ + public static fromObject(object: { [k: string]: any }): google.rpc.QuotaFailure; + + /** + * Creates a plain object from a QuotaFailure message. Also converts values to other types if specified. + * @param message QuotaFailure + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.QuotaFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this QuotaFailure to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for QuotaFailure + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace QuotaFailure { + + /** Properties of a Violation. */ + interface IViolation { + + /** Violation subject */ + subject?: (string|null); + + /** Violation description */ + description?: (string|null); + + /** Violation apiService */ + apiService?: (string|null); + + /** Violation quotaMetric */ + quotaMetric?: (string|null); + + /** Violation quotaId */ + quotaId?: (string|null); + + /** Violation quotaDimensions */ + quotaDimensions?: ({ [k: string]: string }|null); + + /** Violation quotaValue */ + quotaValue?: (number|Long|string|null); + + /** Violation futureQuotaValue */ + futureQuotaValue?: (number|Long|string|null); + } + + /** Represents a Violation. */ + class Violation implements IViolation { + + /** + * Constructs a new Violation. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.QuotaFailure.IViolation); + + /** Violation subject. */ + public subject: string; + + /** Violation description. */ + public description: string; + + /** Violation apiService. */ + public apiService: string; + + /** Violation quotaMetric. */ + public quotaMetric: string; + + /** Violation quotaId. */ + public quotaId: string; + + /** Violation quotaDimensions. */ + public quotaDimensions: { [k: string]: string }; + + /** Violation quotaValue. */ + public quotaValue: (number|Long|string); + + /** Violation futureQuotaValue. */ + public futureQuotaValue?: (number|Long|string|null); + + /** + * Creates a new Violation instance using the specified properties. + * @param [properties] Properties to set + * @returns Violation instance + */ + public static create(properties?: google.rpc.QuotaFailure.IViolation): google.rpc.QuotaFailure.Violation; + + /** + * Encodes the specified Violation message. Does not implicitly {@link google.rpc.QuotaFailure.Violation.verify|verify} messages. + * @param message Violation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.QuotaFailure.IViolation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Violation message, length delimited. Does not implicitly {@link google.rpc.QuotaFailure.Violation.verify|verify} messages. + * @param message Violation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.QuotaFailure.IViolation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Violation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Violation + * @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.rpc.QuotaFailure.Violation; + + /** + * Decodes a Violation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Violation + * @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.rpc.QuotaFailure.Violation; + + /** + * Verifies a Violation 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 Violation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Violation + */ + public static fromObject(object: { [k: string]: any }): google.rpc.QuotaFailure.Violation; + + /** + * Creates a plain object from a Violation message. Also converts values to other types if specified. + * @param message Violation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.QuotaFailure.Violation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Violation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Violation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a PreconditionFailure. */ + interface IPreconditionFailure { + + /** PreconditionFailure violations */ + violations?: (google.rpc.PreconditionFailure.IViolation[]|null); + } + + /** Represents a PreconditionFailure. */ + class PreconditionFailure implements IPreconditionFailure { + + /** + * Constructs a new PreconditionFailure. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IPreconditionFailure); + + /** PreconditionFailure violations. */ + public violations: google.rpc.PreconditionFailure.IViolation[]; + + /** + * Creates a new PreconditionFailure instance using the specified properties. + * @param [properties] Properties to set + * @returns PreconditionFailure instance + */ + public static create(properties?: google.rpc.IPreconditionFailure): google.rpc.PreconditionFailure; + + /** + * Encodes the specified PreconditionFailure message. Does not implicitly {@link google.rpc.PreconditionFailure.verify|verify} messages. + * @param message PreconditionFailure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IPreconditionFailure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PreconditionFailure message, length delimited. Does not implicitly {@link google.rpc.PreconditionFailure.verify|verify} messages. + * @param message PreconditionFailure message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IPreconditionFailure, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PreconditionFailure message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PreconditionFailure + * @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.rpc.PreconditionFailure; + + /** + * Decodes a PreconditionFailure message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PreconditionFailure + * @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.rpc.PreconditionFailure; + + /** + * Verifies a PreconditionFailure 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 PreconditionFailure message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PreconditionFailure + */ + public static fromObject(object: { [k: string]: any }): google.rpc.PreconditionFailure; + + /** + * Creates a plain object from a PreconditionFailure message. Also converts values to other types if specified. + * @param message PreconditionFailure + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.PreconditionFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PreconditionFailure to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PreconditionFailure + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace PreconditionFailure { + + /** Properties of a Violation. */ + interface IViolation { + + /** Violation type */ + type?: (string|null); + + /** Violation subject */ + subject?: (string|null); + + /** Violation description */ + description?: (string|null); + } + + /** Represents a Violation. */ + class Violation implements IViolation { + + /** + * Constructs a new Violation. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.PreconditionFailure.IViolation); + + /** Violation type. */ + public type: string; + + /** Violation subject. */ + public subject: string; + + /** Violation description. */ + public description: string; + + /** + * Creates a new Violation instance using the specified properties. + * @param [properties] Properties to set + * @returns Violation instance + */ + public static create(properties?: google.rpc.PreconditionFailure.IViolation): google.rpc.PreconditionFailure.Violation; + + /** + * Encodes the specified Violation message. Does not implicitly {@link google.rpc.PreconditionFailure.Violation.verify|verify} messages. + * @param message Violation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.PreconditionFailure.IViolation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Violation message, length delimited. Does not implicitly {@link google.rpc.PreconditionFailure.Violation.verify|verify} messages. + * @param message Violation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.PreconditionFailure.IViolation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Violation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Violation + * @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.rpc.PreconditionFailure.Violation; + + /** + * Decodes a Violation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Violation + * @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.rpc.PreconditionFailure.Violation; + + /** + * Verifies a Violation 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 Violation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Violation + */ + public static fromObject(object: { [k: string]: any }): google.rpc.PreconditionFailure.Violation; + + /** + * Creates a plain object from a Violation message. Also converts values to other types if specified. + * @param message Violation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.PreconditionFailure.Violation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Violation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Violation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a BadRequest. */ + interface IBadRequest { + + /** BadRequest fieldViolations */ + fieldViolations?: (google.rpc.BadRequest.IFieldViolation[]|null); + } + + /** Represents a BadRequest. */ + class BadRequest implements IBadRequest { + + /** + * Constructs a new BadRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IBadRequest); + + /** BadRequest fieldViolations. */ + public fieldViolations: google.rpc.BadRequest.IFieldViolation[]; + + /** + * Creates a new BadRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns BadRequest instance + */ + public static create(properties?: google.rpc.IBadRequest): google.rpc.BadRequest; + + /** + * Encodes the specified BadRequest message. Does not implicitly {@link google.rpc.BadRequest.verify|verify} messages. + * @param message BadRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IBadRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified BadRequest message, length delimited. Does not implicitly {@link google.rpc.BadRequest.verify|verify} messages. + * @param message BadRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IBadRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a BadRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns BadRequest + * @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.rpc.BadRequest; + + /** + * Decodes a BadRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns BadRequest + * @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.rpc.BadRequest; + + /** + * Verifies a BadRequest 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 BadRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns BadRequest + */ + public static fromObject(object: { [k: string]: any }): google.rpc.BadRequest; + + /** + * Creates a plain object from a BadRequest message. Also converts values to other types if specified. + * @param message BadRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.BadRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this BadRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for BadRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace BadRequest { + + /** Properties of a FieldViolation. */ + interface IFieldViolation { + + /** FieldViolation field */ + field?: (string|null); + + /** FieldViolation description */ + description?: (string|null); + + /** FieldViolation reason */ + reason?: (string|null); + + /** FieldViolation localizedMessage */ + localizedMessage?: (google.rpc.ILocalizedMessage|null); + } + + /** Represents a FieldViolation. */ + class FieldViolation implements IFieldViolation { + + /** + * Constructs a new FieldViolation. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.BadRequest.IFieldViolation); + + /** FieldViolation field. */ + public field: string; + + /** FieldViolation description. */ + public description: string; + + /** FieldViolation reason. */ + public reason: string; + + /** FieldViolation localizedMessage. */ + public localizedMessage?: (google.rpc.ILocalizedMessage|null); + + /** + * Creates a new FieldViolation instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldViolation instance + */ + public static create(properties?: google.rpc.BadRequest.IFieldViolation): google.rpc.BadRequest.FieldViolation; + + /** + * Encodes the specified FieldViolation message. Does not implicitly {@link google.rpc.BadRequest.FieldViolation.verify|verify} messages. + * @param message FieldViolation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.BadRequest.IFieldViolation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldViolation message, length delimited. Does not implicitly {@link google.rpc.BadRequest.FieldViolation.verify|verify} messages. + * @param message FieldViolation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.BadRequest.IFieldViolation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldViolation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldViolation + * @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.rpc.BadRequest.FieldViolation; + + /** + * Decodes a FieldViolation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldViolation + * @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.rpc.BadRequest.FieldViolation; + + /** + * Verifies a FieldViolation 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 FieldViolation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldViolation + */ + public static fromObject(object: { [k: string]: any }): google.rpc.BadRequest.FieldViolation; + + /** + * Creates a plain object from a FieldViolation message. Also converts values to other types if specified. + * @param message FieldViolation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.BadRequest.FieldViolation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldViolation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldViolation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a RequestInfo. */ + interface IRequestInfo { + + /** RequestInfo requestId */ + requestId?: (string|null); + + /** RequestInfo servingData */ + servingData?: (string|null); + } + + /** Represents a RequestInfo. */ + class RequestInfo implements IRequestInfo { + + /** + * Constructs a new RequestInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IRequestInfo); + + /** RequestInfo requestId. */ + public requestId: string; + + /** RequestInfo servingData. */ + public servingData: string; + + /** + * Creates a new RequestInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns RequestInfo instance + */ + public static create(properties?: google.rpc.IRequestInfo): google.rpc.RequestInfo; + + /** + * Encodes the specified RequestInfo message. Does not implicitly {@link google.rpc.RequestInfo.verify|verify} messages. + * @param message RequestInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IRequestInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link google.rpc.RequestInfo.verify|verify} messages. + * @param message RequestInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IRequestInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RequestInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RequestInfo + * @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.rpc.RequestInfo; + + /** + * Decodes a RequestInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RequestInfo + * @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.rpc.RequestInfo; + + /** + * Verifies a RequestInfo 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 RequestInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RequestInfo + */ + public static fromObject(object: { [k: string]: any }): google.rpc.RequestInfo; + + /** + * Creates a plain object from a RequestInfo message. Also converts values to other types if specified. + * @param message RequestInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.RequestInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RequestInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RequestInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResourceInfo. */ + interface IResourceInfo { + + /** ResourceInfo resourceType */ + resourceType?: (string|null); + + /** ResourceInfo resourceName */ + resourceName?: (string|null); + + /** ResourceInfo owner */ + owner?: (string|null); + + /** ResourceInfo description */ + description?: (string|null); + } + + /** Represents a ResourceInfo. */ + class ResourceInfo implements IResourceInfo { + + /** + * Constructs a new ResourceInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IResourceInfo); + + /** ResourceInfo resourceType. */ + public resourceType: string; + + /** ResourceInfo resourceName. */ + public resourceName: string; + + /** ResourceInfo owner. */ + public owner: string; + + /** ResourceInfo description. */ + public description: string; + + /** + * Creates a new ResourceInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceInfo instance + */ + public static create(properties?: google.rpc.IResourceInfo): google.rpc.ResourceInfo; + + /** + * Encodes the specified ResourceInfo message. Does not implicitly {@link google.rpc.ResourceInfo.verify|verify} messages. + * @param message ResourceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IResourceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceInfo message, length delimited. Does not implicitly {@link google.rpc.ResourceInfo.verify|verify} messages. + * @param message ResourceInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IResourceInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceInfo + * @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.rpc.ResourceInfo; + + /** + * Decodes a ResourceInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceInfo + * @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.rpc.ResourceInfo; + + /** + * Verifies a ResourceInfo 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 ResourceInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceInfo + */ + public static fromObject(object: { [k: string]: any }): google.rpc.ResourceInfo; + + /** + * Creates a plain object from a ResourceInfo message. Also converts values to other types if specified. + * @param message ResourceInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.ResourceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Help. */ + interface IHelp { + + /** Help links */ + links?: (google.rpc.Help.ILink[]|null); + } + + /** Represents a Help. */ + class Help implements IHelp { + + /** + * Constructs a new Help. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.IHelp); + + /** Help links. */ + public links: google.rpc.Help.ILink[]; + + /** + * Creates a new Help instance using the specified properties. + * @param [properties] Properties to set + * @returns Help instance + */ + public static create(properties?: google.rpc.IHelp): google.rpc.Help; + + /** + * Encodes the specified Help message. Does not implicitly {@link google.rpc.Help.verify|verify} messages. + * @param message Help message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.IHelp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Help message, length delimited. Does not implicitly {@link google.rpc.Help.verify|verify} messages. + * @param message Help message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.IHelp, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Help message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Help + * @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.rpc.Help; + + /** + * Decodes a Help message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Help + * @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.rpc.Help; + + /** + * Verifies a Help 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 Help message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Help + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Help; + + /** + * Creates a plain object from a Help message. Also converts values to other types if specified. + * @param message Help + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Help, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Help to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Help + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Help { + + /** Properties of a Link. */ + interface ILink { + + /** Link description */ + description?: (string|null); + + /** Link url */ + url?: (string|null); + } + + /** Represents a Link. */ + class Link implements ILink { + + /** + * Constructs a new Link. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.Help.ILink); + + /** Link description. */ + public description: string; + + /** Link url. */ + public url: string; + + /** + * Creates a new Link instance using the specified properties. + * @param [properties] Properties to set + * @returns Link instance + */ + public static create(properties?: google.rpc.Help.ILink): google.rpc.Help.Link; + + /** + * Encodes the specified Link message. Does not implicitly {@link google.rpc.Help.Link.verify|verify} messages. + * @param message Link message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.Help.ILink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Link message, length delimited. Does not implicitly {@link google.rpc.Help.Link.verify|verify} messages. + * @param message Link message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.Help.ILink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Link message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Link + * @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.rpc.Help.Link; + + /** + * Decodes a Link message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Link + * @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.rpc.Help.Link; + + /** + * Verifies a Link 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 Link message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Link + */ + public static fromObject(object: { [k: string]: any }): google.rpc.Help.Link; + + /** + * Creates a plain object from a Link message. Also converts values to other types if specified. + * @param message Link + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.Help.Link, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Link to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Link + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LocalizedMessage. */ + interface ILocalizedMessage { + + /** LocalizedMessage locale */ + locale?: (string|null); + + /** LocalizedMessage message */ + message?: (string|null); + } + + /** Represents a LocalizedMessage. */ + class LocalizedMessage implements ILocalizedMessage { + + /** + * Constructs a new LocalizedMessage. + * @param [properties] Properties to set + */ + constructor(properties?: google.rpc.ILocalizedMessage); + + /** LocalizedMessage locale. */ + public locale: string; + + /** LocalizedMessage message. */ + public message: string; + + /** + * Creates a new LocalizedMessage instance using the specified properties. + * @param [properties] Properties to set + * @returns LocalizedMessage instance + */ + public static create(properties?: google.rpc.ILocalizedMessage): google.rpc.LocalizedMessage; + + /** + * Encodes the specified LocalizedMessage message. Does not implicitly {@link google.rpc.LocalizedMessage.verify|verify} messages. + * @param message LocalizedMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.rpc.ILocalizedMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LocalizedMessage message, length delimited. Does not implicitly {@link google.rpc.LocalizedMessage.verify|verify} messages. + * @param message LocalizedMessage message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.rpc.ILocalizedMessage, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LocalizedMessage message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LocalizedMessage + * @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.rpc.LocalizedMessage; + + /** + * Decodes a LocalizedMessage message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LocalizedMessage + * @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.rpc.LocalizedMessage; + + /** + * Verifies a LocalizedMessage 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 LocalizedMessage message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LocalizedMessage + */ + public static fromObject(object: { [k: string]: any }): google.rpc.LocalizedMessage; + + /** + * Creates a plain object from a LocalizedMessage message. Also converts values to other types if specified. + * @param message LocalizedMessage + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.rpc.LocalizedMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LocalizedMessage to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LocalizedMessage + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.js b/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.js new file mode 100644 index 000000000000..2a2bf8e377b6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.js @@ -0,0 +1,53890 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_cloud_bigquery_migration_protos || ($protobuf.roots._google_cloud_bigquery_migration_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.cloud = (function() { + + /** + * Namespace cloud. + * @memberof google + * @namespace + */ + var cloud = {}; + + cloud.bigquery = (function() { + + /** + * Namespace bigquery. + * @memberof google.cloud + * @namespace + */ + var bigquery = {}; + + bigquery.migration = (function() { + + /** + * Namespace migration. + * @memberof google.cloud.bigquery + * @namespace + */ + var migration = {}; + + migration.v2 = (function() { + + /** + * Namespace v2. + * @memberof google.cloud.bigquery.migration + * @namespace + */ + var v2 = {}; + + v2.AssessmentTaskDetails = (function() { + + /** + * Properties of an AssessmentTaskDetails. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IAssessmentTaskDetails + * @property {string|null} [inputPath] AssessmentTaskDetails inputPath + * @property {string|null} [outputDataset] AssessmentTaskDetails outputDataset + * @property {string|null} [querylogsPath] AssessmentTaskDetails querylogsPath + * @property {string|null} [dataSource] AssessmentTaskDetails dataSource + * @property {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null} [featureHandle] AssessmentTaskDetails featureHandle + */ + + /** + * Constructs a new AssessmentTaskDetails. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents an AssessmentTaskDetails. + * @implements IAssessmentTaskDetails + * @constructor + * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails=} [properties] Properties to set + */ + function AssessmentTaskDetails(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]]; + } + + /** + * AssessmentTaskDetails inputPath. + * @member {string} inputPath + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails + * @instance + */ + AssessmentTaskDetails.prototype.inputPath = ""; + + /** + * AssessmentTaskDetails outputDataset. + * @member {string} outputDataset + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails + * @instance + */ + AssessmentTaskDetails.prototype.outputDataset = ""; + + /** + * AssessmentTaskDetails querylogsPath. + * @member {string} querylogsPath + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails + * @instance + */ + AssessmentTaskDetails.prototype.querylogsPath = ""; + + /** + * AssessmentTaskDetails dataSource. + * @member {string} dataSource + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails + * @instance + */ + AssessmentTaskDetails.prototype.dataSource = ""; + + /** + * AssessmentTaskDetails featureHandle. + * @member {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null|undefined} featureHandle + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails + * @instance + */ + AssessmentTaskDetails.prototype.featureHandle = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AssessmentTaskDetails.prototype, "_featureHandle", { + get: $util.oneOfGetter($oneOfFields = ["featureHandle"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AssessmentTaskDetails instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails + * @static + * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails instance + */ + AssessmentTaskDetails.create = function create(properties) { + return new AssessmentTaskDetails(properties); + }; + + /** + * Encodes the specified AssessmentTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails + * @static + * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails} message AssessmentTaskDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssessmentTaskDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputPath != null && Object.hasOwnProperty.call(message, "inputPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputPath); + if (message.outputDataset != null && Object.hasOwnProperty.call(message, "outputDataset")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.outputDataset); + if (message.querylogsPath != null && Object.hasOwnProperty.call(message, "querylogsPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.querylogsPath); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dataSource); + if (message.featureHandle != null && Object.hasOwnProperty.call(message, "featureHandle")) + $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.encode(message.featureHandle, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AssessmentTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails + * @static + * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails} message AssessmentTaskDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssessmentTaskDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AssessmentTaskDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssessmentTaskDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inputPath = reader.string(); + break; + } + case 2: { + message.outputDataset = reader.string(); + break; + } + case 3: { + message.querylogsPath = reader.string(); + break; + } + case 4: { + message.dataSource = reader.string(); + break; + } + case 6: { + message.featureHandle = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AssessmentTaskDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssessmentTaskDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AssessmentTaskDetails message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AssessmentTaskDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.inputPath != null && message.hasOwnProperty("inputPath")) + if (!$util.isString(message.inputPath)) + return "inputPath: string expected"; + if (message.outputDataset != null && message.hasOwnProperty("outputDataset")) + if (!$util.isString(message.outputDataset)) + return "outputDataset: string expected"; + if (message.querylogsPath != null && message.hasOwnProperty("querylogsPath")) + if (!$util.isString(message.querylogsPath)) + return "querylogsPath: string expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.featureHandle != null && message.hasOwnProperty("featureHandle")) { + properties._featureHandle = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify(message.featureHandle); + if (error) + return "featureHandle." + error; + } + } + return null; + }; + + /** + * Creates an AssessmentTaskDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails + */ + AssessmentTaskDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails(); + if (object.inputPath != null) + message.inputPath = String(object.inputPath); + if (object.outputDataset != null) + message.outputDataset = String(object.outputDataset); + if (object.querylogsPath != null) + message.querylogsPath = String(object.querylogsPath); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.featureHandle != null) { + if (typeof object.featureHandle !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.AssessmentTaskDetails.featureHandle: object expected"); + message.featureHandle = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.fromObject(object.featureHandle); + } + return message; + }; + + /** + * Creates a plain object from an AssessmentTaskDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails + * @static + * @param {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} message AssessmentTaskDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AssessmentTaskDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.inputPath = ""; + object.outputDataset = ""; + object.querylogsPath = ""; + object.dataSource = ""; + } + if (message.inputPath != null && message.hasOwnProperty("inputPath")) + object.inputPath = message.inputPath; + if (message.outputDataset != null && message.hasOwnProperty("outputDataset")) + object.outputDataset = message.outputDataset; + if (message.querylogsPath != null && message.hasOwnProperty("querylogsPath")) + object.querylogsPath = message.querylogsPath; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.featureHandle != null && message.hasOwnProperty("featureHandle")) { + object.featureHandle = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.toObject(message.featureHandle, options); + if (options.oneofs) + object._featureHandle = "featureHandle"; + } + return object; + }; + + /** + * Converts this AssessmentTaskDetails to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails + * @instance + * @returns {Object.} JSON object + */ + AssessmentTaskDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AssessmentTaskDetails + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AssessmentTaskDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.AssessmentTaskDetails"; + }; + + return AssessmentTaskDetails; + })(); + + v2.AssessmentFeatureHandle = (function() { + + /** + * Properties of an AssessmentFeatureHandle. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IAssessmentFeatureHandle + * @property {boolean|null} [addShareableDataset] AssessmentFeatureHandle addShareableDataset + */ + + /** + * Constructs a new AssessmentFeatureHandle. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents an AssessmentFeatureHandle. + * @implements IAssessmentFeatureHandle + * @constructor + * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle=} [properties] Properties to set + */ + function AssessmentFeatureHandle(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]]; + } + + /** + * AssessmentFeatureHandle addShareableDataset. + * @member {boolean|null|undefined} addShareableDataset + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @instance + */ + AssessmentFeatureHandle.prototype.addShareableDataset = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AssessmentFeatureHandle.prototype, "_addShareableDataset", { + get: $util.oneOfGetter($oneOfFields = ["addShareableDataset"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AssessmentFeatureHandle instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle instance + */ + AssessmentFeatureHandle.create = function create(properties) { + return new AssessmentFeatureHandle(properties); + }; + + /** + * Encodes the specified AssessmentFeatureHandle message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle} message AssessmentFeatureHandle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssessmentFeatureHandle.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.addShareableDataset != null && Object.hasOwnProperty.call(message, "addShareableDataset")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.addShareableDataset); + return writer; + }; + + /** + * Encodes the specified AssessmentFeatureHandle message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle} message AssessmentFeatureHandle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssessmentFeatureHandle.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AssessmentFeatureHandle message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssessmentFeatureHandle.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.addShareableDataset = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AssessmentFeatureHandle message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssessmentFeatureHandle.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AssessmentFeatureHandle message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AssessmentFeatureHandle.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.addShareableDataset != null && message.hasOwnProperty("addShareableDataset")) { + properties._addShareableDataset = 1; + if (typeof message.addShareableDataset !== "boolean") + return "addShareableDataset: boolean expected"; + } + return null; + }; + + /** + * Creates an AssessmentFeatureHandle message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle + */ + AssessmentFeatureHandle.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle(); + if (object.addShareableDataset != null) + message.addShareableDataset = Boolean(object.addShareableDataset); + return message; + }; + + /** + * Creates a plain object from an AssessmentFeatureHandle message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} message AssessmentFeatureHandle + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AssessmentFeatureHandle.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.addShareableDataset != null && message.hasOwnProperty("addShareableDataset")) { + object.addShareableDataset = message.addShareableDataset; + if (options.oneofs) + object._addShareableDataset = "addShareableDataset"; + } + return object; + }; + + /** + * Converts this AssessmentFeatureHandle to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @instance + * @returns {Object.} JSON object + */ + AssessmentFeatureHandle.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AssessmentFeatureHandle + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AssessmentFeatureHandle.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.AssessmentFeatureHandle"; + }; + + return AssessmentFeatureHandle; + })(); + + v2.MigrationWorkflow = (function() { + + /** + * Properties of a MigrationWorkflow. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IMigrationWorkflow + * @property {string|null} [name] MigrationWorkflow name + * @property {string|null} [displayName] MigrationWorkflow displayName + * @property {Object.|null} [tasks] MigrationWorkflow tasks + * @property {google.cloud.bigquery.migration.v2.MigrationWorkflow.State|null} [state] MigrationWorkflow state + * @property {google.protobuf.ITimestamp|null} [createTime] MigrationWorkflow createTime + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationWorkflow lastUpdateTime + */ + + /** + * Constructs a new MigrationWorkflow. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a MigrationWorkflow. + * @implements IMigrationWorkflow + * @constructor + * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow=} [properties] Properties to set + */ + function MigrationWorkflow(properties) { + this.tasks = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MigrationWorkflow name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @instance + */ + MigrationWorkflow.prototype.name = ""; + + /** + * MigrationWorkflow displayName. + * @member {string} displayName + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @instance + */ + MigrationWorkflow.prototype.displayName = ""; + + /** + * MigrationWorkflow tasks. + * @member {Object.} tasks + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @instance + */ + MigrationWorkflow.prototype.tasks = $util.emptyObject; + + /** + * MigrationWorkflow state. + * @member {google.cloud.bigquery.migration.v2.MigrationWorkflow.State} state + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @instance + */ + MigrationWorkflow.prototype.state = 0; + + /** + * MigrationWorkflow createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @instance + */ + MigrationWorkflow.prototype.createTime = null; + + /** + * MigrationWorkflow lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @instance + */ + MigrationWorkflow.prototype.lastUpdateTime = null; + + /** + * Creates a new MigrationWorkflow instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @static + * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow instance + */ + MigrationWorkflow.create = function create(properties) { + return new MigrationWorkflow(properties); + }; + + /** + * Encodes the specified MigrationWorkflow message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @static + * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationWorkflow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.tasks != null && Object.hasOwnProperty.call(message, "tasks")) + for (var keys = Object.keys(message.tasks), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.bigquery.migration.v2.MigrationTask.encode(message.tasks[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified MigrationWorkflow message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @static + * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationWorkflow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MigrationWorkflow message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationWorkflow.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationWorkflow(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 2: { + if (message.tasks === $util.emptyObject) + message.tasks = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.bigquery.migration.v2.MigrationTask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.tasks[key] = value; + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MigrationWorkflow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationWorkflow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MigrationWorkflow message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MigrationWorkflow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.tasks != null && message.hasOwnProperty("tasks")) { + if (!$util.isObject(message.tasks)) + return "tasks: object expected"; + var key = Object.keys(message.tasks); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.MigrationTask.verify(message.tasks[key[i]]); + if (error) + return "tasks." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } + return null; + }; + + /** + * Creates a MigrationWorkflow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow + */ + MigrationWorkflow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationWorkflow) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.MigrationWorkflow(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.tasks) { + if (typeof object.tasks !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.tasks: object expected"); + message.tasks = {}; + for (var keys = Object.keys(object.tasks), i = 0; i < keys.length; ++i) { + if (typeof object.tasks[keys[i]] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.tasks: object expected"); + message.tasks[keys[i]] = $root.google.cloud.bigquery.migration.v2.MigrationTask.fromObject(object.tasks[keys[i]]); + } + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "DRAFT": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "PAUSED": + case 3: + message.state = 3; + break; + case "COMPLETED": + case 4: + message.state = 4; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } + return message; + }; + + /** + * Creates a plain object from a MigrationWorkflow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @static + * @param {google.cloud.bigquery.migration.v2.MigrationWorkflow} message MigrationWorkflow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MigrationWorkflow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.tasks = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.lastUpdateTime = null; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + var keys2; + if (message.tasks && (keys2 = Object.keys(message.tasks)).length) { + object.tasks = {}; + for (var j = 0; j < keys2.length; ++j) + object.tasks[keys2[j]] = $root.google.cloud.bigquery.migration.v2.MigrationTask.toObject(message.tasks[keys2[j]], options); + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.State[message.state] : message.state; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this MigrationWorkflow to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @instance + * @returns {Object.} JSON object + */ + MigrationWorkflow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MigrationWorkflow + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MigrationWorkflow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationWorkflow"; + }; + + /** + * State enum. + * @name google.cloud.bigquery.migration.v2.MigrationWorkflow.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} DRAFT=1 DRAFT value + * @property {number} RUNNING=2 RUNNING value + * @property {number} PAUSED=3 PAUSED value + * @property {number} COMPLETED=4 COMPLETED value + */ + MigrationWorkflow.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DRAFT"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "PAUSED"] = 3; + values[valuesById[4] = "COMPLETED"] = 4; + return values; + })(); + + return MigrationWorkflow; + })(); + + v2.MigrationTask = (function() { + + /** + * Properties of a MigrationTask. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IMigrationTask + * @property {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null} [assessmentTaskDetails] MigrationTask assessmentTaskDetails + * @property {google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null} [translationConfigDetails] MigrationTask translationConfigDetails + * @property {google.cloud.bigquery.migration.v2.ITranslationDetails|null} [translationDetails] MigrationTask translationDetails + * @property {string|null} [id] MigrationTask id + * @property {string|null} [type] MigrationTask type + * @property {google.cloud.bigquery.migration.v2.MigrationTask.State|null} [state] MigrationTask state + * @property {google.rpc.IErrorInfo|null} [processingError] MigrationTask processingError + * @property {google.protobuf.ITimestamp|null} [createTime] MigrationTask createTime + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationTask lastUpdateTime + * @property {Array.|null} [resourceErrorDetails] MigrationTask resourceErrorDetails + * @property {number|null} [resourceErrorCount] MigrationTask resourceErrorCount + * @property {Array.|null} [metrics] MigrationTask metrics + * @property {google.cloud.bigquery.migration.v2.IMigrationTaskResult|null} [taskResult] MigrationTask taskResult + * @property {number|null} [totalProcessingErrorCount] MigrationTask totalProcessingErrorCount + * @property {number|null} [totalResourceErrorCount] MigrationTask totalResourceErrorCount + */ + + /** + * Constructs a new MigrationTask. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a MigrationTask. + * @implements IMigrationTask + * @constructor + * @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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MigrationTask assessmentTaskDetails. + * @member {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null|undefined} assessmentTaskDetails + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.assessmentTaskDetails = null; + + /** + * MigrationTask translationConfigDetails. + * @member {google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null|undefined} translationConfigDetails + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + 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 + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.id = ""; + + /** + * MigrationTask type. + * @member {string} type + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.type = ""; + + /** + * MigrationTask state. + * @member {google.cloud.bigquery.migration.v2.MigrationTask.State} state + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.state = 0; + + /** + * MigrationTask processingError. + * @member {google.rpc.IErrorInfo|null|undefined} processingError + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.processingError = null; + + /** + * MigrationTask createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.createTime = null; + + /** + * MigrationTask lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.lastUpdateTime = null; + + /** + * MigrationTask resourceErrorDetails. + * @member {Array.} resourceErrorDetails + * @memberof google.cloud.bigquery.migration.v2.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 {"assessmentTaskDetails"|"translationConfigDetails"|"translationDetails"|undefined} taskDetails + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + Object.defineProperty(MigrationTask.prototype, "taskDetails", { + get: $util.oneOfGetter($oneOfFields = ["assessmentTaskDetails", "translationConfigDetails", "translationDetails"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MigrationTask instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @static + * @param {google.cloud.bigquery.migration.v2.IMigrationTask=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask instance + */ + MigrationTask.create = function create(properties) { + return new MigrationTask(properties); + }; + + /** + * Encodes the specified MigrationTask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @static + * @param {google.cloud.bigquery.migration.v2.IMigrationTask} message MigrationTask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationTask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.processingError != null && Object.hasOwnProperty.call(message, "processingError")) + $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.assessmentTaskDetails != null && Object.hasOwnProperty.call(message, "assessmentTaskDetails")) + $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.encode(message.assessmentTaskDetails, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.translationConfigDetails != null && Object.hasOwnProperty.call(message, "translationConfigDetails")) + $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.encode(message.translationConfigDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.translationDetails != null && Object.hasOwnProperty.call(message, "translationDetails")) + $root.google.cloud.bigquery.migration.v2.TranslationDetails.encode(message.translationDetails, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); + if (message.resourceErrorDetails != null && message.resourceErrorDetails.length) + for (var i = 0; i < message.resourceErrorDetails.length; ++i) + $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.encode(message.resourceErrorDetails[i], writer.uint32(/* id 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; + }; + + /** + * Encodes the specified MigrationTask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @static + * @param {google.cloud.bigquery.migration.v2.IMigrationTask} message MigrationTask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationTask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MigrationTask message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationTask.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationTask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 12: { + message.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.decode(reader, reader.uint32()); + break; + } + case 14: { + message.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.decode(reader, reader.uint32()); + break; + } + case 16: { + message.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.decode(reader, reader.uint32()); + break; + } + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 17: { + if (!(message.resourceErrorDetails && message.resourceErrorDetails.length)) + message.resourceErrorDetails = []; + message.resourceErrorDetails.push($root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.decode(reader, reader.uint32())); + break; + } + case 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; + } + } + return message; + }; + + /** + * Decodes a MigrationTask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationTask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MigrationTask message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MigrationTask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.assessmentTaskDetails != null && message.hasOwnProperty("assessmentTaskDetails")) { + properties.taskDetails = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify(message.assessmentTaskDetails); + if (error) + return "assessmentTaskDetails." + error; + } + } + if (message.translationConfigDetails != null && message.hasOwnProperty("translationConfigDetails")) { + if (properties.taskDetails === 1) + return "taskDetails: multiple values"; + properties.taskDetails = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.verify(message.translationConfigDetails); + if (error) + return "translationConfigDetails." + error; + } + } + if (message.translationDetails != null && message.hasOwnProperty("translationDetails")) { + if (properties.taskDetails === 1) + return "taskDetails: multiple values"; + properties.taskDetails = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.TranslationDetails.verify(message.translationDetails); + if (error) + return "translationDetails." + error; + } + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.processingError != null && message.hasOwnProperty("processingError")) { + var error = $root.google.rpc.ErrorInfo.verify(message.processingError); + if (error) + return "processingError." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } + if (message.resourceErrorDetails != null && message.hasOwnProperty("resourceErrorDetails")) { + if (!Array.isArray(message.resourceErrorDetails)) + return "resourceErrorDetails: array expected"; + for (var i = 0; i < message.resourceErrorDetails.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify(message.resourceErrorDetails[i]); + if (error) + return "resourceErrorDetails." + error; + } + } + if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) + if (!$util.isInteger(message.resourceErrorCount)) + return "resourceErrorCount: integer expected"; + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.TimeSeries.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + if (message.taskResult != null && message.hasOwnProperty("taskResult")) { + var error = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.verify(message.taskResult); + if (error) + return "taskResult." + error; + } + if (message.totalProcessingErrorCount != null && message.hasOwnProperty("totalProcessingErrorCount")) + if (!$util.isInteger(message.totalProcessingErrorCount)) + return "totalProcessingErrorCount: integer expected"; + if (message.totalResourceErrorCount != null && message.hasOwnProperty("totalResourceErrorCount")) + if (!$util.isInteger(message.totalResourceErrorCount)) + return "totalResourceErrorCount: integer expected"; + return null; + }; + + /** + * Creates a MigrationTask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask + */ + MigrationTask.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationTask) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.MigrationTask(); + if (object.assessmentTaskDetails != null) { + if (typeof object.assessmentTaskDetails !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.assessmentTaskDetails: object expected"); + message.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.fromObject(object.assessmentTaskDetails); + } + if (object.translationConfigDetails != null) { + if (typeof object.translationConfigDetails !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.translationConfigDetails: object expected"); + message.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.fromObject(object.translationConfigDetails); + } + if (object.translationDetails != null) { + if (typeof object.translationDetails !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.translationDetails: object expected"); + message.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.fromObject(object.translationDetails); + } + if (object.id != null) + message.id = String(object.id); + if (object.type != null) + message.type = String(object.type); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "ORCHESTRATING": + case 2: + message.state = 2; + break; + case "RUNNING": + case 3: + message.state = 3; + break; + case "PAUSED": + case 4: + message.state = 4; + break; + case "SUCCEEDED": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + } + if (object.processingError != null) { + if (typeof object.processingError !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.processingError: object expected"); + message.processingError = $root.google.rpc.ErrorInfo.fromObject(object.processingError); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } + if (object.resourceErrorDetails) { + if (!Array.isArray(object.resourceErrorDetails)) + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.resourceErrorDetails: array expected"); + message.resourceErrorDetails = []; + for (var i = 0; i < object.resourceErrorDetails.length; ++i) { + if (typeof object.resourceErrorDetails[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.resourceErrorDetails: object expected"); + message.resourceErrorDetails[i] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.fromObject(object.resourceErrorDetails[i]); + } + } + if (object.resourceErrorCount != null) + message.resourceErrorCount = object.resourceErrorCount | 0; + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.metrics: object expected"); + message.metrics[i] = $root.google.cloud.bigquery.migration.v2.TimeSeries.fromObject(object.metrics[i]); + } + } + if (object.taskResult != null) { + if (typeof object.taskResult !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.taskResult: object expected"); + message.taskResult = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.fromObject(object.taskResult); + } + if (object.totalProcessingErrorCount != null) + message.totalProcessingErrorCount = object.totalProcessingErrorCount | 0; + if (object.totalResourceErrorCount != null) + message.totalResourceErrorCount = object.totalResourceErrorCount | 0; + return message; + }; + + /** + * Creates a plain object from a MigrationTask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @static + * @param {google.cloud.bigquery.migration.v2.MigrationTask} message MigrationTask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MigrationTask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.resourceErrorDetails = []; + object.metrics = []; + } + if (options.defaults) { + object.id = ""; + object.type = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.processingError = null; + object.createTime = null; + object.lastUpdateTime = null; + object.resourceErrorCount = 0; + object.taskResult = null; + object.totalProcessingErrorCount = 0; + object.totalResourceErrorCount = 0; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationTask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationTask.State[message.state] : message.state; + if (message.processingError != null && message.hasOwnProperty("processingError")) + object.processingError = $root.google.rpc.ErrorInfo.toObject(message.processingError, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + if (message.assessmentTaskDetails != null && message.hasOwnProperty("assessmentTaskDetails")) { + object.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.toObject(message.assessmentTaskDetails, options); + if (options.oneofs) + object.taskDetails = "assessmentTaskDetails"; + } + if (message.translationConfigDetails != null && message.hasOwnProperty("translationConfigDetails")) { + object.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.toObject(message.translationConfigDetails, options); + if (options.oneofs) + object.taskDetails = "translationConfigDetails"; + } + if (message.translationDetails != null && message.hasOwnProperty("translationDetails")) { + object.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.toObject(message.translationDetails, options); + if (options.oneofs) + object.taskDetails = "translationDetails"; + } + if (message.resourceErrorDetails && message.resourceErrorDetails.length) { + object.resourceErrorDetails = []; + 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; + }; + + /** + * Converts this MigrationTask to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + * @returns {Object.} JSON object + */ + MigrationTask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MigrationTask + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MigrationTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationTask"; + }; + + /** + * State enum. + * @name google.cloud.bigquery.migration.v2.MigrationTask.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} ORCHESTRATING=2 ORCHESTRATING value + * @property {number} RUNNING=3 RUNNING value + * @property {number} PAUSED=4 PAUSED value + * @property {number} SUCCEEDED=5 SUCCEEDED value + * @property {number} FAILED=6 FAILED value + */ + MigrationTask.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "ORCHESTRATING"] = 2; + values[valuesById[3] = "RUNNING"] = 3; + values[valuesById[4] = "PAUSED"] = 4; + values[valuesById[5] = "SUCCEEDED"] = 5; + values[valuesById[6] = "FAILED"] = 6; + return values; + })(); + + return MigrationTask; + })(); + + v2.MigrationSubtask = (function() { + + /** + * Properties of a MigrationSubtask. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IMigrationSubtask + * @property {string|null} [name] MigrationSubtask name + * @property {string|null} [taskId] MigrationSubtask taskId + * @property {string|null} [type] MigrationSubtask type + * @property {google.cloud.bigquery.migration.v2.MigrationSubtask.State|null} [state] MigrationSubtask state + * @property {google.rpc.IErrorInfo|null} [processingError] MigrationSubtask processingError + * @property {Array.|null} [resourceErrorDetails] MigrationSubtask resourceErrorDetails + * @property {number|null} [resourceErrorCount] MigrationSubtask resourceErrorCount + * @property {google.protobuf.ITimestamp|null} [createTime] MigrationSubtask createTime + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationSubtask lastUpdateTime + * @property {Array.|null} [metrics] MigrationSubtask metrics + */ + + /** + * Constructs a new MigrationSubtask. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a MigrationSubtask. + * @implements IMigrationSubtask + * @constructor + * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask=} [properties] Properties to set + */ + function MigrationSubtask(properties) { + this.resourceErrorDetails = []; + this.metrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MigrationSubtask name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.name = ""; + + /** + * MigrationSubtask taskId. + * @member {string} taskId + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.taskId = ""; + + /** + * MigrationSubtask type. + * @member {string} type + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.type = ""; + + /** + * MigrationSubtask state. + * @member {google.cloud.bigquery.migration.v2.MigrationSubtask.State} state + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.state = 0; + + /** + * MigrationSubtask processingError. + * @member {google.rpc.IErrorInfo|null|undefined} processingError + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.processingError = null; + + /** + * MigrationSubtask resourceErrorDetails. + * @member {Array.} resourceErrorDetails + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.resourceErrorDetails = $util.emptyArray; + + /** + * MigrationSubtask resourceErrorCount. + * @member {number} resourceErrorCount + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.resourceErrorCount = 0; + + /** + * MigrationSubtask createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.createTime = null; + + /** + * MigrationSubtask lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.lastUpdateTime = null; + + /** + * MigrationSubtask metrics. + * @member {Array.} metrics + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.metrics = $util.emptyArray; + + /** + * Creates a new MigrationSubtask instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @static + * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask instance + */ + MigrationSubtask.create = function create(properties) { + return new MigrationSubtask(properties); + }; + + /** + * Encodes the specified MigrationSubtask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @static + * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask} message MigrationSubtask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationSubtask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.taskId != null && Object.hasOwnProperty.call(message, "taskId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.processingError != null && Object.hasOwnProperty.call(message, "processingError")) + $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.cloud.bigquery.migration.v2.TimeSeries.encode(message.metrics[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.resourceErrorDetails != null && message.resourceErrorDetails.length) + for (var i = 0; i < message.resourceErrorDetails.length; ++i) + $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.encode(message.resourceErrorDetails[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.resourceErrorCount != null && Object.hasOwnProperty.call(message, "resourceErrorCount")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.resourceErrorCount); + return writer; + }; + + /** + * Encodes the specified MigrationSubtask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @static + * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask} message MigrationSubtask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationSubtask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MigrationSubtask message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationSubtask.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationSubtask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.taskId = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + if (!(message.resourceErrorDetails && message.resourceErrorDetails.length)) + message.resourceErrorDetails = []; + message.resourceErrorDetails.push($root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.decode(reader, reader.uint32())); + break; + } + case 13: { + message.resourceErrorCount = reader.int32(); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.cloud.bigquery.migration.v2.TimeSeries.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MigrationSubtask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationSubtask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MigrationSubtask message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MigrationSubtask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.taskId != null && message.hasOwnProperty("taskId")) + if (!$util.isString(message.taskId)) + return "taskId: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.processingError != null && message.hasOwnProperty("processingError")) { + var error = $root.google.rpc.ErrorInfo.verify(message.processingError); + if (error) + return "processingError." + error; + } + if (message.resourceErrorDetails != null && message.hasOwnProperty("resourceErrorDetails")) { + if (!Array.isArray(message.resourceErrorDetails)) + return "resourceErrorDetails: array expected"; + for (var i = 0; i < message.resourceErrorDetails.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify(message.resourceErrorDetails[i]); + if (error) + return "resourceErrorDetails." + error; + } + } + if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) + if (!$util.isInteger(message.resourceErrorCount)) + return "resourceErrorCount: integer expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.TimeSeries.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + return null; + }; + + /** + * Creates a MigrationSubtask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask + */ + MigrationSubtask.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationSubtask) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.MigrationSubtask(); + if (object.name != null) + message.name = String(object.name); + if (object.taskId != null) + message.taskId = String(object.taskId); + if (object.type != null) + message.type = String(object.type); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "SUCCEEDED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "PAUSED": + case 5: + message.state = 5; + break; + case "PENDING_DEPENDENCY": + case 6: + message.state = 6; + break; + } + if (object.processingError != null) { + if (typeof object.processingError !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.processingError: object expected"); + message.processingError = $root.google.rpc.ErrorInfo.fromObject(object.processingError); + } + if (object.resourceErrorDetails) { + if (!Array.isArray(object.resourceErrorDetails)) + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.resourceErrorDetails: array expected"); + message.resourceErrorDetails = []; + for (var i = 0; i < object.resourceErrorDetails.length; ++i) { + if (typeof object.resourceErrorDetails[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.resourceErrorDetails: object expected"); + message.resourceErrorDetails[i] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.fromObject(object.resourceErrorDetails[i]); + } + } + if (object.resourceErrorCount != null) + message.resourceErrorCount = object.resourceErrorCount | 0; + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.metrics: object expected"); + message.metrics[i] = $root.google.cloud.bigquery.migration.v2.TimeSeries.fromObject(object.metrics[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MigrationSubtask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @static + * @param {google.cloud.bigquery.migration.v2.MigrationSubtask} message MigrationSubtask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MigrationSubtask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.metrics = []; + object.resourceErrorDetails = []; + } + if (options.defaults) { + object.name = ""; + object.taskId = ""; + object.type = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.processingError = null; + object.createTime = null; + object.lastUpdateTime = null; + object.resourceErrorCount = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.taskId != null && message.hasOwnProperty("taskId")) + object.taskId = message.taskId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationSubtask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationSubtask.State[message.state] : message.state; + if (message.processingError != null && message.hasOwnProperty("processingError")) + object.processingError = $root.google.rpc.ErrorInfo.toObject(message.processingError, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.cloud.bigquery.migration.v2.TimeSeries.toObject(message.metrics[j], options); + } + if (message.resourceErrorDetails && message.resourceErrorDetails.length) { + object.resourceErrorDetails = []; + for (var j = 0; j < message.resourceErrorDetails.length; ++j) + object.resourceErrorDetails[j] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.toObject(message.resourceErrorDetails[j], options); + } + if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) + object.resourceErrorCount = message.resourceErrorCount; + return object; + }; + + /** + * Converts this MigrationSubtask to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + * @returns {Object.} JSON object + */ + MigrationSubtask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MigrationSubtask + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MigrationSubtask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationSubtask"; + }; + + /** + * State enum. + * @name google.cloud.bigquery.migration.v2.MigrationSubtask.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} RUNNING=2 RUNNING value + * @property {number} SUCCEEDED=3 SUCCEEDED value + * @property {number} FAILED=4 FAILED value + * @property {number} PAUSED=5 PAUSED value + * @property {number} PENDING_DEPENDENCY=6 PENDING_DEPENDENCY value + */ + MigrationSubtask.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "SUCCEEDED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "PAUSED"] = 5; + values[valuesById[6] = "PENDING_DEPENDENCY"] = 6; + return values; + })(); + + return MigrationSubtask; + })(); + + v2.MigrationTaskResult = (function() { + + /** + * Properties of a MigrationTaskResult. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IMigrationTaskResult + * @property {google.cloud.bigquery.migration.v2.ITranslationTaskResult|null} [translationTaskResult] MigrationTaskResult translationTaskResult + */ + + /** + * Constructs a new MigrationTaskResult. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a MigrationTaskResult. + * @implements IMigrationTaskResult + * @constructor + * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult=} [properties] Properties to set + */ + function MigrationTaskResult(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]]; + } + + /** + * MigrationTaskResult translationTaskResult. + * @member {google.cloud.bigquery.migration.v2.ITranslationTaskResult|null|undefined} translationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @instance + */ + MigrationTaskResult.prototype.translationTaskResult = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MigrationTaskResult details. + * @member {"translationTaskResult"|undefined} details + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @instance + */ + Object.defineProperty(MigrationTaskResult.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["translationTaskResult"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MigrationTaskResult instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @static + * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult instance + */ + MigrationTaskResult.create = function create(properties) { + return new MigrationTaskResult(properties); + }; + + /** + * 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.MigrationTaskResult + * @static + * @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 + */ + MigrationTaskResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.translationTaskResult != null && Object.hasOwnProperty.call(message, "translationTaskResult")) + $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.encode(message.translationTaskResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * 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.MigrationTaskResult + * @static + * @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 + */ + MigrationTaskResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MigrationTaskResult message from the specified reader or buffer. + * @function decode + * @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.MigrationTaskResult} MigrationTaskResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationTaskResult.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationTaskResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MigrationTaskResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationTaskResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MigrationTaskResult message. + * @function verify + * @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 + */ + MigrationTaskResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.translationTaskResult != null && message.hasOwnProperty("translationTaskResult")) { + properties.details = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.verify(message.translationTaskResult); + if (error) + return "translationTaskResult." + error; + } + } + return null; + }; + + /** + * Creates a MigrationTaskResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult + */ + 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.MigrationTaskResult(); + if (object.translationTaskResult != null) { + if (typeof object.translationTaskResult !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTaskResult.translationTaskResult: object expected"); + message.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.fromObject(object.translationTaskResult); + } + return message; + }; + + /** + * Creates a plain object from a MigrationTaskResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @static + * @param {google.cloud.bigquery.migration.v2.MigrationTaskResult} message MigrationTaskResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MigrationTaskResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.translationTaskResult != null && message.hasOwnProperty("translationTaskResult")) { + object.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.toObject(message.translationTaskResult, options); + if (options.oneofs) + object.details = "translationTaskResult"; + } + return object; + }; + + /** + * Converts this MigrationTaskResult to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @instance + * @returns {Object.} JSON object + */ + MigrationTaskResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MigrationTaskResult + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MigrationTaskResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationTaskResult"; + }; + + return MigrationTaskResult; + })(); + + v2.TranslationTaskResult = (function() { + + /** + * Properties of a TranslationTaskResult. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ITranslationTaskResult + * @property {Array.|null} [translatedLiterals] TranslationTaskResult translatedLiterals + * @property {Array.|null} [reportLogMessages] TranslationTaskResult reportLogMessages + * @property {string|null} [consoleUri] TranslationTaskResult consoleUri + */ + + /** + * Constructs a new TranslationTaskResult. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a TranslationTaskResult. + * @implements ITranslationTaskResult + * @constructor + * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult=} [properties] Properties to set + */ + 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) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TranslationTaskResult translatedLiterals. + * @member {Array.} translatedLiterals + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @instance + */ + TranslationTaskResult.prototype.translatedLiterals = $util.emptyArray; + + /** + * TranslationTaskResult reportLogMessages. + * @member {Array.} reportLogMessages + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @instance + */ + TranslationTaskResult.prototype.reportLogMessages = $util.emptyArray; + + /** + * TranslationTaskResult consoleUri. + * @member {string} consoleUri + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @instance + */ + TranslationTaskResult.prototype.consoleUri = ""; + + /** + * Creates a new TranslationTaskResult instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @static + * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult instance + */ + TranslationTaskResult.create = function create(properties) { + return new TranslationTaskResult(properties); + }; + + /** + * 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.TranslationTaskResult + * @static + * @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 + */ + TranslationTaskResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.translatedLiterals != null && message.translatedLiterals.length) + for (var i = 0; i < message.translatedLiterals.length; ++i) + $root.google.cloud.bigquery.migration.v2.Literal.encode(message.translatedLiterals[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.reportLogMessages != null && message.reportLogMessages.length) + for (var i = 0; i < message.reportLogMessages.length; ++i) + $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.encode(message.reportLogMessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.consoleUri != null && Object.hasOwnProperty.call(message, "consoleUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.consoleUri); + return writer; + }; + + /** + * 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.TranslationTaskResult + * @static + * @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 + */ + TranslationTaskResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TranslationTaskResult message from the specified reader or buffer. + * @function decode + * @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.TranslationTaskResult} TranslationTaskResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationTaskResult.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationTaskResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.translatedLiterals && message.translatedLiterals.length)) + message.translatedLiterals = []; + message.translatedLiterals.push($root.google.cloud.bigquery.migration.v2.Literal.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.reportLogMessages && message.reportLogMessages.length)) + message.reportLogMessages = []; + message.reportLogMessages.push($root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.decode(reader, reader.uint32())); + break; + } + case 3: { + message.consoleUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TranslationTaskResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.TranslationTaskResult} TranslationTaskResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationTaskResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TranslationTaskResult message. + * @function verify + * @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 + */ + TranslationTaskResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.translatedLiterals != null && message.hasOwnProperty("translatedLiterals")) { + if (!Array.isArray(message.translatedLiterals)) + return "translatedLiterals: array expected"; + for (var i = 0; i < message.translatedLiterals.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.Literal.verify(message.translatedLiterals[i]); + if (error) + return "translatedLiterals." + error; + } + } + if (message.reportLogMessages != null && message.hasOwnProperty("reportLogMessages")) { + if (!Array.isArray(message.reportLogMessages)) + return "reportLogMessages: array expected"; + for (var i = 0; i < message.reportLogMessages.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.verify(message.reportLogMessages[i]); + if (error) + return "reportLogMessages." + error; + } + } + if (message.consoleUri != null && message.hasOwnProperty("consoleUri")) + if (!$util.isString(message.consoleUri)) + return "consoleUri: string expected"; + return null; + }; + + /** + * Creates a TranslationTaskResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult + */ + 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.TranslationTaskResult(); + if (object.translatedLiterals) { + if (!Array.isArray(object.translatedLiterals)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.translatedLiterals: array expected"); + message.translatedLiterals = []; + for (var i = 0; i < object.translatedLiterals.length; ++i) { + if (typeof object.translatedLiterals[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.translatedLiterals: object expected"); + message.translatedLiterals[i] = $root.google.cloud.bigquery.migration.v2.Literal.fromObject(object.translatedLiterals[i]); + } + } + if (object.reportLogMessages) { + if (!Array.isArray(object.reportLogMessages)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.reportLogMessages: array expected"); + message.reportLogMessages = []; + for (var i = 0; i < object.reportLogMessages.length; ++i) { + if (typeof object.reportLogMessages[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.reportLogMessages: object expected"); + message.reportLogMessages[i] = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.fromObject(object.reportLogMessages[i]); + } + } + if (object.consoleUri != null) + message.consoleUri = String(object.consoleUri); + return message; + }; + + /** + * Creates a plain object from a TranslationTaskResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @static + * @param {google.cloud.bigquery.migration.v2.TranslationTaskResult} message TranslationTaskResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TranslationTaskResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.translatedLiterals = []; + object.reportLogMessages = []; + } + if (options.defaults) + object.consoleUri = ""; + if (message.translatedLiterals && message.translatedLiterals.length) { + object.translatedLiterals = []; + for (var j = 0; j < message.translatedLiterals.length; ++j) + object.translatedLiterals[j] = $root.google.cloud.bigquery.migration.v2.Literal.toObject(message.translatedLiterals[j], options); + } + if (message.reportLogMessages && message.reportLogMessages.length) { + object.reportLogMessages = []; + for (var j = 0; j < message.reportLogMessages.length; ++j) + object.reportLogMessages[j] = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.toObject(message.reportLogMessages[j], options); + } + if (message.consoleUri != null && message.hasOwnProperty("consoleUri")) + object.consoleUri = message.consoleUri; + return object; + }; + + /** + * Converts this TranslationTaskResult to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @instance + * @returns {Object.} JSON object + */ + TranslationTaskResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TranslationTaskResult + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TranslationTaskResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TranslationTaskResult"; + }; + + return TranslationTaskResult; + })(); + + v2.ResourceErrorDetail = (function() { + + /** + * Properties of a ResourceErrorDetail. + * @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 + */ + + /** + * Constructs a new ResourceErrorDetail. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a ResourceErrorDetail. + * @implements IResourceErrorDetail + * @constructor + * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail=} [properties] Properties to set + */ + function ResourceErrorDetail(properties) { + this.errorDetails = []; + 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]]; + } + + /** + * ResourceErrorDetail resourceInfo. + * @member {google.rpc.IResourceInfo|null|undefined} resourceInfo + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @instance + */ + ResourceErrorDetail.prototype.resourceInfo = null; + + /** + * ResourceErrorDetail errorDetails. + * @member {Array.} errorDetails + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @instance + */ + ResourceErrorDetail.prototype.errorDetails = $util.emptyArray; + + /** + * 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.ResourceErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail instance + */ + ResourceErrorDetail.create = function create(properties) { + return new ResourceErrorDetail(properties); + }; + + /** + * 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.ResourceErrorDetail + * @static + * @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 + */ + ResourceErrorDetail.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); + return writer; + }; + + /** + * 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.ResourceErrorDetail + * @static + * @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 + */ + ResourceErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceErrorDetail message from the specified reader or buffer. + * @function decode + * @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.ResourceErrorDetail} ResourceErrorDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceErrorDetail.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resourceInfo = $root.google.rpc.ResourceInfo.decode(reader, reader.uint32()); + 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(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceErrorDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.ResourceErrorDetail} ResourceErrorDetail + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceErrorDetail message. + * @function verify + * @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 + */ + ResourceErrorDetail.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]); + 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.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 a ResourceErrorDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2.ResourceErrorDetail} message ResourceErrorDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceErrorDetail.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.errorCount != null && message.hasOwnProperty("errorCount")) + object.errorCount = message.errorCount; + return object; + }; + + /** + * Converts this ResourceErrorDetail to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @instance + * @returns {Object.} JSON object + */ + ResourceErrorDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceErrorDetail + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ResourceErrorDetail"; + }; + + return ResourceErrorDetail; + })(); + + v2.ErrorDetail = (function() { + + /** + * Properties of an ErrorDetail. + * @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 + */ + + /** + * Constructs a new ErrorDetail. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents an ErrorDetail. + * @implements IErrorDetail + * @constructor + * @param {google.cloud.bigquery.migration.v2.IErrorDetail=} [properties] Properties to set + */ + function ErrorDetail(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorDetail location. + * @member {google.cloud.bigquery.migration.v2.IErrorLocation|null|undefined} location + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @instance + */ + ErrorDetail.prototype.location = null; + + /** + * ErrorDetail errorInfo. + * @member {google.rpc.IErrorInfo|null|undefined} errorInfo + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @instance + */ + ErrorDetail.prototype.errorInfo = null; + + /** + * Creates a new ErrorDetail instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2.IErrorDetail=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail instance + */ + ErrorDetail.create = function create(properties) { + return new ErrorDetail(properties); + }; + + /** + * Encodes the specified ErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2.IErrorDetail} message ErrorDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorDetail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.google.cloud.bigquery.migration.v2.ErrorLocation.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errorInfo != null && Object.hasOwnProperty.call(message, "errorInfo")) + $root.google.rpc.ErrorInfo.encode(message.errorInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2.IErrorDetail} message ErrorDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorDetail.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ErrorDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.decode(reader, reader.uint32()); + break; + } + case 2: { + message.errorInfo = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorDetail message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorDetail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.google.cloud.bigquery.migration.v2.ErrorLocation.verify(message.location); + if (error) + return "location." + error; + } + if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) { + var error = $root.google.rpc.ErrorInfo.verify(message.errorInfo); + if (error) + return "errorInfo." + error; + } + return null; + }; + + /** + * Creates an ErrorDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + */ + ErrorDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ErrorDetail) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.ErrorDetail(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ErrorDetail.location: object expected"); + message.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.fromObject(object.location); + } + if (object.errorInfo != null) { + if (typeof object.errorInfo !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ErrorDetail.errorInfo: object expected"); + message.errorInfo = $root.google.rpc.ErrorInfo.fromObject(object.errorInfo); + } + return message; + }; + + /** + * Creates a plain object from an ErrorDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2.ErrorDetail} message ErrorDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = null; + object.errorInfo = null; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.toObject(message.location, options); + if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) + object.errorInfo = $root.google.rpc.ErrorInfo.toObject(message.errorInfo, options); + return object; + }; + + /** + * Converts this ErrorDetail to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @instance + * @returns {Object.} JSON object + */ + ErrorDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorDetail + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ErrorDetail"; + }; + + return ErrorDetail; + })(); + + v2.ErrorLocation = (function() { + + /** + * Properties of an ErrorLocation. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IErrorLocation + * @property {number|null} [line] ErrorLocation line + * @property {number|null} [column] ErrorLocation column + */ + + /** + * Constructs a new ErrorLocation. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents an ErrorLocation. + * @implements IErrorLocation + * @constructor + * @param {google.cloud.bigquery.migration.v2.IErrorLocation=} [properties] Properties to set + */ + function ErrorLocation(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]]; + } + + /** + * ErrorLocation line. + * @member {number} line + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation + * @instance + */ + ErrorLocation.prototype.line = 0; + + /** + * ErrorLocation column. + * @member {number} column + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation + * @instance + */ + ErrorLocation.prototype.column = 0; + + /** + * Creates a new ErrorLocation instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation + * @static + * @param {google.cloud.bigquery.migration.v2.IErrorLocation=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ErrorLocation} ErrorLocation instance + */ + ErrorLocation.create = function create(properties) { + return new ErrorLocation(properties); + }; + + /** + * 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.ErrorLocation + * @static + * @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 + */ + ErrorLocation.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); + return writer; + }; + + /** + * 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.ErrorLocation + * @static + * @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 + */ + ErrorLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorLocation message from the specified reader or buffer. + * @function decode + * @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.ErrorLocation} ErrorLocation + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ErrorLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.line = reader.int32(); + break; + } + case 2: { + message.column = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.ErrorLocation} ErrorLocation + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorLocation message. + * @function verify + * @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 + */ + ErrorLocation.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) + 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; + return message; + }; + + /** + * Creates a plain object from an ErrorLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation + * @static + * @param {google.cloud.bigquery.migration.v2.ErrorLocation} message ErrorLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.line = 0; + object.column = 0; + } + 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 ErrorLocation to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation + * @instance + * @returns {Object.} JSON object + */ + ErrorLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorLocation + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.ErrorLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ErrorLocation"; + }; + + return ErrorLocation; + })(); + + v2.TimeSeries = (function() { + + /** + * Properties of a TimeSeries. + * @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 + */ + + /** + * Constructs a new TimeSeries. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a TimeSeries. + * @implements ITimeSeries + * @constructor + * @param {google.cloud.bigquery.migration.v2.ITimeSeries=} [properties] Properties to set + */ + function TimeSeries(properties) { + this.points = []; + 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]]; + } + + /** + * 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 + * @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.TimeSeries + * @static + * @param {google.cloud.bigquery.migration.v2.ITimeSeries=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TimeSeries} TimeSeries instance + */ + TimeSeries.create = function create(properties) { + return new TimeSeries(properties); + }; + + /** + * 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.TimeSeries + * @static + * @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 + */ + TimeSeries.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(); + return writer; + }; + + /** + * 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.TimeSeries + * @static + * @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 + */ + TimeSeries.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeSeries message from the specified reader or buffer. + * @function decode + * @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.TimeSeries} TimeSeries + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TimeSeries(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metric = reader.string(); + 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())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeSeries message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.TimeSeries} TimeSeries + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSeries message. + * @function verify + * @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 + */ + TimeSeries.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; + } + } + return null; + }; + + /** + * Creates a TimeSeries message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.TimeSeries} TimeSeries + */ + 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.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; + } + 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 TimeSeries message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * @static + * @param {google.cloud.bigquery.migration.v2.TimeSeries} message TimeSeries + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeries.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); + } + return object; + }; + + /** + * Converts this TimeSeries to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * @instance + * @returns {Object.} JSON object + */ + TimeSeries.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeSeries + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.TimeSeries + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeSeries.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TimeSeries"; + }; + + return TimeSeries; + })(); + + v2.Point = (function() { + + /** + * Properties of a Point. + * @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 + */ + + /** + * Constructs a new Point. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a Point. + * @implements IPoint + * @constructor + * @param {google.cloud.bigquery.migration.v2.IPoint=} [properties] Properties to set + */ + function Point(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]]; + } + + /** + * Point interval. + * @member {google.cloud.bigquery.migration.v2.ITimeInterval|null|undefined} interval + * @memberof google.cloud.bigquery.migration.v2.Point + * @instance + */ + Point.prototype.interval = null; + + /** + * Point value. + * @member {google.cloud.bigquery.migration.v2.ITypedValue|null|undefined} value + * @memberof google.cloud.bigquery.migration.v2.Point + * @instance + */ + Point.prototype.value = null; + + /** + * Creates a new Point instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.Point + * @static + * @param {google.cloud.bigquery.migration.v2.IPoint=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.Point} Point instance + */ + Point.create = function create(properties) { + return new Point(properties); + }; + + /** + * 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.Point + * @static + * @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 + */ + Point.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(); + return writer; + }; + + /** + * 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.Point + * @static + * @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 + */ + Point.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Point message from the specified reader or buffer. + * @function decode + * @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.Point} Point + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.Point(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.interval = $root.google.cloud.bigquery.migration.v2.TimeInterval.decode(reader, reader.uint32()); + break; + } + case 2: { + message.value = $root.google.cloud.bigquery.migration.v2.TypedValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Point message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.Point} Point + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Point message. + * @function verify + * @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 + */ + Point.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; + } + return null; + }; + + /** + * Creates a Point message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.Point + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.Point} Point + */ + 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.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 Point message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.Point + * @static + * @param {google.cloud.bigquery.migration.v2.Point} message Point + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Point.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 Point to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.Point + * @instance + * @returns {Object.} JSON object + */ + Point.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Point + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.Point + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Point.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.Point"; + }; + + return Point; + })(); + + v2.TimeInterval = (function() { + + /** + * Properties of a TimeInterval. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ITimeInterval + * @property {google.protobuf.ITimestamp|null} [startTime] TimeInterval startTime + * @property {google.protobuf.ITimestamp|null} [endTime] TimeInterval endTime + */ + + /** + * Constructs a new TimeInterval. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a TimeInterval. + * @implements ITimeInterval + * @constructor + * @param {google.cloud.bigquery.migration.v2.ITimeInterval=} [properties] Properties to set + */ + function TimeInterval(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]]; + } + + /** + * TimeInterval startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @instance + */ + TimeInterval.prototype.startTime = null; + + /** + * TimeInterval endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @instance + */ + TimeInterval.prototype.endTime = null; + + /** + * 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 + */ + TimeInterval.create = function create(properties) { + return new TimeInterval(properties); + }; + + /** + * 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 + */ + 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; + }; + + /** + * 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.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 + */ + TimeInterval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeInterval message from the specified reader or buffer. + * @function decode + * @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.TimeInterval} TimeInterval + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TimeInterval(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeInterval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.TimeInterval} TimeInterval + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeInterval message. + * @function verify + * @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 + */ + TimeInterval.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; + } + return null; + }; + + /** + * Creates a TimeInterval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.TimeInterval} TimeInterval + */ + 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.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.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); + } + return message; + }; + + /** + * Creates a plain object from a TimeInterval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @static + * @param {google.cloud.bigquery.migration.v2.TimeInterval} message TimeInterval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeInterval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + } + 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. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @instance + * @returns {Object.} JSON object + */ + TimeInterval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeInterval + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.TimeInterval + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeInterval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TimeInterval"; + }; + + return TimeInterval; + })(); + + v2.TypedValue = (function() { + + /** + * Properties of a TypedValue. + * @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 + */ + + /** + * Constructs a new TypedValue. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a TypedValue. + * @implements ITypedValue + * @constructor + * @param {google.cloud.bigquery.migration.v2.ITypedValue=} [properties] Properties to set + */ + function TypedValue(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]]; + } + + /** + * 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 + * @instance + */ + TypedValue.prototype.distributionValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TypedValue value. + * @member {"boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"|undefined} value + * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @instance + */ + Object.defineProperty(TypedValue.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["boolValue", "int64Value", "doubleValue", "stringValue", "distributionValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TypedValue instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.TypedValue + * @static + * @param {google.cloud.bigquery.migration.v2.ITypedValue=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TypedValue} TypedValue instance + */ + TypedValue.create = function create(properties) { + return new TypedValue(properties); + }; + + /** + * 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.TypedValue + * @static + * @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 + */ + TypedValue.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(); + return writer; + }; + + /** + * 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.TypedValue + * @static + * @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 + */ + TypedValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TypedValue message from the specified reader or buffer. + * @function decode + * @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.TypedValue} TypedValue + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TypedValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.boolValue = reader.bool(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TypedValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.TypedValue} TypedValue + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TypedValue message. + * @function verify + * @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 + */ + TypedValue.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.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; + } + } + 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); + } + 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.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"; + } + 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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.Dialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + { + var error = $root.google.cloud.bigquery.migration.v2.SQLServerDialect.verify(message.sqlServerDialect); + if (error) + 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.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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.BigQueryDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDialect.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryDialect message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryDialect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BigQueryDialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect + */ + BigQueryDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.BigQueryDialect) + return object; + return new $root.google.cloud.bigquery.migration.v2.BigQueryDialect(); + }; + + /** + * Creates a plain object from a BigQueryDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {google.cloud.bigquery.migration.v2.BigQueryDialect} message BigQueryDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this BigQueryDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @instance + * @returns {Object.} JSON object + */ + BigQueryDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.BigQueryDialect"; + }; + + return BigQueryDialect; + })(); + + v2.HiveQLDialect = (function() { + + /** + * Properties of a HiveQLDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IHiveQLDialect + */ + + /** + * Constructs a new HiveQLDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a HiveQLDialect. + * @implements IHiveQLDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect=} [properties] Properties to set + */ + function HiveQLDialect(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new HiveQLDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect instance + */ + HiveQLDialect.create = function create(properties) { + return new HiveQLDialect(properties); + }; + + /** + * Encodes the specified HiveQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect} message HiveQLDialect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HiveQLDialect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified HiveQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect} message HiveQLDialect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HiveQLDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HiveQLDialect message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HiveQLDialect.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.HiveQLDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HiveQLDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HiveQLDialect.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HiveQLDialect message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HiveQLDialect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a HiveQLDialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + */ + HiveQLDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.HiveQLDialect) + return object; + return new $root.google.cloud.bigquery.migration.v2.HiveQLDialect(); + }; + + /** + * Creates a plain object from a HiveQLDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.RedshiftDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a 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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TeradataDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.mode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + 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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.OracleDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SparkSQLDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a 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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SnowflakeDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a 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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.NetezzaDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a 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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + 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"; + } + 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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.VerticaDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a 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 VerticaDialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect + */ + VerticaDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.VerticaDialect) + return object; + return new $root.google.cloud.bigquery.migration.v2.VerticaDialect(); + }; + + /** + * Creates a plain object from a VerticaDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @static + * @param {google.cloud.bigquery.migration.v2.VerticaDialect} message VerticaDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VerticaDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VerticaDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @instance + * @returns {Object.} JSON object + */ + VerticaDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VerticaDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VerticaDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.VerticaDialect"; + }; + + return VerticaDialect; + })(); + + v2.SQLServerDialect = (function() { + + /** + * Properties of a SQLServerDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ISQLServerDialect + */ + + /** + * Constructs a new SQLServerDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a SQLServerDialect. + * @implements ISQLServerDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect=} [properties] Properties to set + */ + function SQLServerDialect(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 SQLServerDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @static + * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect instance + */ + SQLServerDialect.create = function create(properties) { + return new SQLServerDialect(properties); + }; + + /** + * 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.SQLServerDialect + * @static + * @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 + */ + SQLServerDialect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SQLServerDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLServerDialect.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @static + * @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 + */ + SQLServerDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SQLServerDialect message from the specified reader or buffer. + * @function decode + * @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.SQLServerDialect} SQLServerDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SQLServerDialect.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SQLServerDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.SQLServerDialect} SQLServerDialect + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SQLServerDialect message. + * @function verify + * @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 + */ + SQLServerDialect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SQLServerDialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect + */ + 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.SQLServerDialect(); + }; + + /** + * Creates a plain object from a SQLServerDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @static + * @param {google.cloud.bigquery.migration.v2.SQLServerDialect} message SQLServerDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SQLServerDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SQLServerDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @instance + * @returns {Object.} JSON object + */ + SQLServerDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SQLServerDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SQLServerDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SQLServerDialect"; + }; + + return SQLServerDialect; + })(); + + v2.PostgresqlDialect = (function() { + + /** + * Properties of a PostgresqlDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IPostgresqlDialect + */ + + /** + * Constructs a new PostgresqlDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a PostgresqlDialect. + * @implements IPostgresqlDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect=} [properties] Properties to set + */ + function PostgresqlDialect(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 PostgresqlDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect instance + */ + PostgresqlDialect.create = function create(properties) { + return new PostgresqlDialect(properties); + }; + + /** + * 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.PostgresqlDialect + * @static + * @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 + */ + PostgresqlDialect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PostgresqlDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PostgresqlDialect.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @static + * @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 + */ + PostgresqlDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PostgresqlDialect message from the specified reader or buffer. + * @function decode + * @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.PostgresqlDialect} PostgresqlDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PostgresqlDialect.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PostgresqlDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.PostgresqlDialect} PostgresqlDialect + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PostgresqlDialect message. + * @function verify + * @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 + */ + PostgresqlDialect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a PostgresqlDialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect + */ + 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.PostgresqlDialect(); + }; + + /** + * Creates a plain object from a PostgresqlDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @static + * @param {google.cloud.bigquery.migration.v2.PostgresqlDialect} message PostgresqlDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PostgresqlDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PostgresqlDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @instance + * @returns {Object.} JSON object + */ + PostgresqlDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PostgresqlDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PostgresqlDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.PostgresqlDialect"; + }; + + return PostgresqlDialect; + })(); + + v2.PrestoDialect = (function() { + + /** + * Properties of a PrestoDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IPrestoDialect + */ + + /** + * Constructs a new PrestoDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a PrestoDialect. + * @implements IPrestoDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.IPrestoDialect=} [properties] Properties to set + */ + function PrestoDialect(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 PrestoDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IPrestoDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect instance + */ + PrestoDialect.create = function create(properties) { + return new PrestoDialect(properties); + }; + + /** + * 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.PrestoDialect + * @static + * @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 + */ + PrestoDialect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PrestoDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PrestoDialect.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @static + * @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 + */ + PrestoDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PrestoDialect message from the specified reader or buffer. + * @function decode + * @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.PrestoDialect} PrestoDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PrestoDialect.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PrestoDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.PrestoDialect} PrestoDialect + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PrestoDialect message. + * @function verify + * @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 + */ + PrestoDialect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a PrestoDialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect + */ + 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.PrestoDialect(); + }; + + /** + * Creates a plain object from a PrestoDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @static + * @param {google.cloud.bigquery.migration.v2.PrestoDialect} message PrestoDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PrestoDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PrestoDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @instance + * @returns {Object.} JSON object + */ + PrestoDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PrestoDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PrestoDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.PrestoDialect"; + }; + + return PrestoDialect; + })(); + + v2.MySQLDialect = (function() { + + /** + * Properties of a MySQLDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IMySQLDialect + */ + + /** + * Constructs a new MySQLDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a MySQLDialect. + * @implements IMySQLDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.IMySQLDialect=} [properties] Properties to set + */ + function MySQLDialect(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 MySQLDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IMySQLDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect instance + */ + MySQLDialect.create = function create(properties) { + return new MySQLDialect(properties); + }; + + /** + * 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.MySQLDialect + * @static + * @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 + */ + MySQLDialect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified MySQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MySQLDialect.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @static + * @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 + */ + MySQLDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MySQLDialect message from the specified reader or buffer. + * @function decode + * @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.MySQLDialect} MySQLDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MySQLDialect.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MySQLDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.MySQLDialect} MySQLDialect + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MySQLDialect message. + * @function verify + * @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 + */ + MySQLDialect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a MySQLDialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect + */ + MySQLDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.MySQLDialect) + return object; + return new $root.google.cloud.bigquery.migration.v2.MySQLDialect(); + }; + + /** + * Creates a plain object from a MySQLDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @static + * @param {google.cloud.bigquery.migration.v2.MySQLDialect} message MySQLDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MySQLDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this MySQLDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @instance + * @returns {Object.} JSON object + */ + MySQLDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MySQLDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MySQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MySQLDialect"; + }; + + return MySQLDialect; + })(); + + v2.DB2Dialect = (function() { + + /** + * Properties of a DB2Dialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IDB2Dialect + */ + + /** + * Constructs a new DB2Dialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a DB2Dialect. + * @implements IDB2Dialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.IDB2Dialect=} [properties] Properties to set + */ + function DB2Dialect(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 DB2Dialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @static + * @param {google.cloud.bigquery.migration.v2.IDB2Dialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect instance + */ + DB2Dialect.create = function create(properties) { + return new DB2Dialect(properties); + }; + + /** + * 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.DB2Dialect + * @static + * @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 + */ + DB2Dialect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified DB2Dialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.DB2Dialect.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @static + * @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 + */ + DB2Dialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DB2Dialect message from the specified reader or buffer. + * @function decode + * @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.DB2Dialect} DB2Dialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DB2Dialect.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.DB2Dialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DB2Dialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.DB2Dialect} DB2Dialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DB2Dialect.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DB2Dialect message. + * @function verify + * @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 + */ + DB2Dialect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a DB2Dialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect + */ + 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.DB2Dialect(); + }; + + /** + * Creates a plain object from a DB2Dialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @static + * @param {google.cloud.bigquery.migration.v2.DB2Dialect} message DB2Dialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DB2Dialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this DB2Dialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @instance + * @returns {Object.} JSON object + */ + DB2Dialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DB2Dialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DB2Dialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.DB2Dialect"; + }; + + return DB2Dialect; + })(); + + v2.SQLiteDialect = (function() { + + /** + * Properties of a SQLiteDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ISQLiteDialect + */ + + /** + * Constructs a new SQLiteDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a SQLiteDialect. + * @implements ISQLiteDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect=} [properties] Properties to set + */ + function SQLiteDialect(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 SQLiteDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @static + * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect instance + */ + SQLiteDialect.create = function create(properties) { + return new SQLiteDialect(properties); + }; + + /** + * 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.SQLiteDialect + * @static + * @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 + */ + SQLiteDialect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * 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.SQLiteDialect + * @static + * @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 + */ + SQLiteDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SQLiteDialect message from the specified reader or buffer. + * @function decode + * @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.SQLiteDialect} SQLiteDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SQLiteDialect.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SQLiteDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SQLiteDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.SQLiteDialect} SQLiteDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SQLiteDialect.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SQLiteDialect message. + * @function verify + * @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 + */ + SQLiteDialect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SQLiteDialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect + */ + 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.SQLiteDialect(); + }; + + /** + * Creates a plain object from a SQLiteDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @static + * @param {google.cloud.bigquery.migration.v2.SQLiteDialect} message SQLiteDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SQLiteDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SQLiteDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @instance + * @returns {Object.} JSON object + */ + SQLiteDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SQLiteDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SQLiteDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SQLiteDialect"; + }; + + return SQLiteDialect; + })(); + + v2.GreenplumDialect = (function() { + + /** + * Properties of a GreenplumDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IGreenplumDialect + */ + + /** + * Constructs a new GreenplumDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a GreenplumDialect. + * @implements IGreenplumDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect=} [properties] Properties to set + */ + function GreenplumDialect(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new GreenplumDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect instance + */ + GreenplumDialect.create = function create(properties) { + return new GreenplumDialect(properties); + }; + + /** + * 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.GreenplumDialect + * @static + * @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 + */ + GreenplumDialect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * 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.GreenplumDialect + * @static + * @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 + */ + GreenplumDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GreenplumDialect message from the specified reader or buffer. + * @function decode + * @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.GreenplumDialect} GreenplumDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GreenplumDialect.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.GreenplumDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GreenplumDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.GreenplumDialect} GreenplumDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GreenplumDialect.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GreenplumDialect message. + * @function verify + * @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 + */ + GreenplumDialect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a GreenplumDialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect + */ + 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.GreenplumDialect(); + }; + + /** + * Creates a plain object from a GreenplumDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @static + * @param {google.cloud.bigquery.migration.v2.GreenplumDialect} message GreenplumDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GreenplumDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this GreenplumDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @instance + * @returns {Object.} JSON object + */ + GreenplumDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GreenplumDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GreenplumDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.GreenplumDialect"; + }; + + return GreenplumDialect; + })(); + + v2.ObjectNameMappingList = (function() { + + /** + * Properties of an ObjectNameMappingList. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IObjectNameMappingList + * @property {Array.|null} [nameMap] ObjectNameMappingList nameMap + */ + + /** + * Constructs a new ObjectNameMappingList. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents an ObjectNameMappingList. + * @implements IObjectNameMappingList + * @constructor + * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList=} [properties] Properties to set + */ + function ObjectNameMappingList(properties) { + this.nameMap = []; + 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]]; + } + + /** + * 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.ObjectNameMappingList + * @static + * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList instance + */ + ObjectNameMappingList.create = function create(properties) { + return new ObjectNameMappingList(properties); + }; + + /** + * 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.ObjectNameMappingList + * @static + * @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 + */ + 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 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.ObjectNameMappingList + * @static + * @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 + */ + ObjectNameMappingList.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ObjectNameMappingList message from the specified reader or buffer. + * @function decode + * @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.ObjectNameMappingList} ObjectNameMappingList + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ObjectNameMappingList.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.nameMap && message.nameMap.length)) + message.nameMap = []; + message.nameMap.push($root.google.cloud.bigquery.migration.v2.ObjectNameMapping.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ObjectNameMappingList message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.ObjectNameMappingList} ObjectNameMappingList + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ObjectNameMappingList message. + * @function verify + * @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 + */ + 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 an ObjectNameMappingList message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList + */ + ObjectNameMappingList.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList) + 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]); + } + } + return message; + }; + + /** + * Creates a plain object from an ObjectNameMappingList message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @static + * @param {google.cloud.bigquery.migration.v2.ObjectNameMappingList} message ObjectNameMappingList + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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 ObjectNameMappingList to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @instance + * @returns {Object.} JSON object + */ + ObjectNameMappingList.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ObjectNameMappingList + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ObjectNameMappingList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ObjectNameMappingList"; + }; + + return ObjectNameMappingList; + })(); + + v2.ObjectNameMapping = (function() { + + /** + * Properties of an ObjectNameMapping. + * @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 + */ + + /** + * Constructs a new ObjectNameMapping. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents an ObjectNameMapping. + * @implements IObjectNameMapping + * @constructor + * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping=} [properties] Properties to set + */ + function ObjectNameMapping(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ObjectNameMapping source. + * @member {google.cloud.bigquery.migration.v2.INameMappingKey|null|undefined} source + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @instance + */ + ObjectNameMapping.prototype.source = null; + + /** + * ObjectNameMapping target. + * @member {google.cloud.bigquery.migration.v2.INameMappingValue|null|undefined} target + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @instance + */ + ObjectNameMapping.prototype.target = null; + + /** + * Creates a new ObjectNameMapping instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @static + * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping instance + */ + ObjectNameMapping.create = function create(properties) { + return new ObjectNameMapping(properties); + }; + + /** + * 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.ObjectNameMapping + * @static + * @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 + */ + 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 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.ObjectNameMapping + * @static + * @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 + */ + ObjectNameMapping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ObjectNameMapping message from the specified reader or buffer. + * @function decode + * @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.ObjectNameMapping} ObjectNameMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ObjectNameMapping.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.source = $root.google.cloud.bigquery.migration.v2.NameMappingKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.target = $root.google.cloud.bigquery.migration.v2.NameMappingValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ObjectNameMapping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.ObjectNameMapping} ObjectNameMapping + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ObjectNameMapping message. + * @function verify + * @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 + */ + 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 ObjectNameMapping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping + */ + ObjectNameMapping.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ObjectNameMapping) + 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); + } + return message; + }; + + /** + * Creates a plain object from an ObjectNameMapping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @static + * @param {google.cloud.bigquery.migration.v2.ObjectNameMapping} message ObjectNameMapping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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 ObjectNameMapping to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @instance + * @returns {Object.} JSON object + */ + ObjectNameMapping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ObjectNameMapping + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ObjectNameMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ObjectNameMapping"; + }; + + return ObjectNameMapping; + })(); + + v2.NameMappingKey = (function() { + + /** + * Properties of a NameMappingKey. + * @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 + */ + + /** + * Constructs a new NameMappingKey. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a NameMappingKey. + * @implements INameMappingKey + * @constructor + * @param {google.cloud.bigquery.migration.v2.INameMappingKey=} [properties] Properties to set + */ + function NameMappingKey(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]]; + } + + /** + * 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.NameMappingKey + * @static + * @param {google.cloud.bigquery.migration.v2.INameMappingKey=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey instance + */ + NameMappingKey.create = function create(properties) { + return new NameMappingKey(properties); + }; + + /** + * 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.NameMappingKey + * @static + * @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 + */ + 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 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.NameMappingKey + * @static + * @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 + */ + NameMappingKey.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NameMappingKey message from the specified reader or buffer. + * @function decode + * @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.NameMappingKey} NameMappingKey + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NameMappingKey.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + } + return message; + }; + + /** + * Decodes a NameMappingKey message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.NameMappingKey} NameMappingKey + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NameMappingKey message. + * @function verify + * @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 + */ + 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 NameMappingKey message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey + */ + NameMappingKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingKey) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.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 NameMappingKey message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @static + * @param {google.cloud.bigquery.migration.v2.NameMappingKey} message NameMappingKey + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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 NameMappingKey to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @instance + * @returns {Object.} JSON object + */ + NameMappingKey.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NameMappingKey + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NameMappingKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NameMappingKey"; + }; + + /** + * Type enum. + * @name google.cloud.bigquery.migration.v2.NameMappingKey.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} DATABASE=1 DATABASE value + * @property {number} SCHEMA=2 SCHEMA value + * @property {number} RELATION=3 RELATION value + * @property {number} ATTRIBUTE=4 ATTRIBUTE value + * @property {number} RELATION_ALIAS=5 RELATION_ALIAS value + * @property {number} ATTRIBUTE_ALIAS=6 ATTRIBUTE_ALIAS value + * @property {number} FUNCTION=7 FUNCTION value + */ + NameMappingKey.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATABASE"] = 1; + values[valuesById[2] = "SCHEMA"] = 2; + values[valuesById[3] = "RELATION"] = 3; + values[valuesById[4] = "ATTRIBUTE"] = 4; + values[valuesById[5] = "RELATION_ALIAS"] = 5; + values[valuesById[6] = "ATTRIBUTE_ALIAS"] = 6; + values[valuesById[7] = "FUNCTION"] = 7; + return values; + })(); + + return NameMappingKey; + })(); + + v2.NameMappingValue = (function() { + + /** + * Properties of a NameMappingValue. + * @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 + */ + + /** + * Constructs a new NameMappingValue. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a NameMappingValue. + * @implements INameMappingValue + * @constructor + * @param {google.cloud.bigquery.migration.v2.INameMappingValue=} [properties] Properties to set + */ + function NameMappingValue(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]]; + } + + /** + * 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.NameMappingValue + * @static + * @param {google.cloud.bigquery.migration.v2.INameMappingValue=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue instance + */ + NameMappingValue.create = function create(properties) { + return new NameMappingValue(properties); + }; + + /** + * 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.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); + return writer; + }; + + /** + * 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.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.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NameMappingValue message from the specified reader or buffer. + * @function decode + * @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.NameMappingValue} NameMappingValue + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NameMappingValue.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + } + return message; + }; + + /** + * Decodes a NameMappingValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.NameMappingValue} NameMappingValue + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NameMappingValue message. + * @function verify + * @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 + */ + 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 NameMappingValue message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue + */ + NameMappingValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingValue) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.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 NameMappingValue message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @static + * @param {google.cloud.bigquery.migration.v2.NameMappingValue} message NameMappingValue + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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 NameMappingValue to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @instance + * @returns {Object.} JSON object + */ + NameMappingValue.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NameMappingValue + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NameMappingValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NameMappingValue"; + }; + + return NameMappingValue; + })(); + + v2.SourceEnv = (function() { + + /** + * Properties of a SourceEnv. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ISourceEnv + * @property {string|null} [defaultDatabase] SourceEnv defaultDatabase + * @property {Array.|null} [schemaSearchPath] SourceEnv schemaSearchPath + * @property {string|null} [metadataStoreDataset] SourceEnv metadataStoreDataset + */ + + /** + * Constructs a new SourceEnv. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a SourceEnv. + * @implements ISourceEnv + * @constructor + * @param {google.cloud.bigquery.migration.v2.ISourceEnv=} [properties] Properties to set + */ + function SourceEnv(properties) { + this.schemaSearchPath = []; + 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]]; + } + + /** + * 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.SourceEnv + * @static + * @param {google.cloud.bigquery.migration.v2.ISourceEnv=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv instance + */ + SourceEnv.create = function create(properties) { + return new SourceEnv(properties); + }; + + /** + * 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.SourceEnv + * @static + * @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 + */ + 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 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.SourceEnv + * @static + * @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 + */ + SourceEnv.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceEnv message from the specified reader or buffer. + * @function decode + * @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.SourceEnv} SourceEnv + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceEnv.decode = function decode(reader, length, error) { + 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(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.defaultDatabase = reader.string(); + break; + } + case 2: { + if (!(message.schemaSearchPath && message.schemaSearchPath.length)) + message.schemaSearchPath = []; + message.schemaSearchPath.push(reader.string()); + break; + } + case 3: { + message.metadataStoreDataset = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceEnv message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.SourceEnv} SourceEnv + * @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) { + 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"; + } + if (message.metadataStoreDataset != null && message.hasOwnProperty("metadataStoreDataset")) + if (!$util.isString(message.metadataStoreDataset)) + return "metadataStoreDataset: string expected"; + return null; + }; + + /** + * Creates a SourceEnv message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv + */ + SourceEnv.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SourceEnv) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.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 SourceEnv message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @static + * @param {google.cloud.bigquery.migration.v2.SourceEnv} message SourceEnv + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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 SourceEnv to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @instance + * @returns {Object.} JSON object + */ + SourceEnv.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceEnv + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceEnv.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SourceEnv"; + }; + + return SourceEnv; + })(); + + v2.TranslationDetails = (function() { + + /** + * Properties of a TranslationDetails. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ITranslationDetails + * @property {Array.|null} [sourceTargetMapping] TranslationDetails sourceTargetMapping + * @property {string|null} [targetBaseUri] TranslationDetails targetBaseUri + * @property {google.cloud.bigquery.migration.v2.ISourceEnvironment|null} [sourceEnvironment] TranslationDetails sourceEnvironment + * @property {Array.|null} [targetReturnLiterals] TranslationDetails targetReturnLiterals + * @property {Array.|null} [targetTypes] TranslationDetails targetTypes + * @property {google.cloud.bigquery.migration.v2.ISuggestionConfig|null} [suggestionConfig] TranslationDetails suggestionConfig + */ + + /** + * Constructs a new TranslationDetails. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a TranslationDetails. + * @implements ITranslationDetails + * @constructor + * @param {google.cloud.bigquery.migration.v2.ITranslationDetails=} [properties] Properties to set + */ + function TranslationDetails(properties) { + this.sourceTargetMapping = []; + this.targetReturnLiterals = []; + this.targetTypes = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * TranslationDetails sourceTargetMapping. + * @member {Array.} sourceTargetMapping + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @instance + */ + 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; + + /** + * TranslationDetails suggestionConfig. + * @member {google.cloud.bigquery.migration.v2.ISuggestionConfig|null|undefined} suggestionConfig + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @instance + */ + TranslationDetails.prototype.suggestionConfig = null; + + /** + * Creates a new TranslationDetails instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @static + * @param {google.cloud.bigquery.migration.v2.ITranslationDetails=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails instance + */ + TranslationDetails.create = function create(properties) { + return new TranslationDetails(properties); + }; + + /** + * 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.TranslationDetails + * @static + * @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 + */ + 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]); + if (message.suggestionConfig != null && Object.hasOwnProperty.call(message, "suggestionConfig")) + $root.google.cloud.bigquery.migration.v2.SuggestionConfig.encode(message.suggestionConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified 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.TranslationDetails + * @static + * @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 + */ + TranslationDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TranslationDetails message from the specified reader or buffer. + * @function decode + * @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.TranslationDetails} TranslationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.sourceTargetMapping && message.sourceTargetMapping.length)) + message.sourceTargetMapping = []; + message.sourceTargetMapping.push($root.google.cloud.bigquery.migration.v2.SourceTargetMapping.decode(reader, reader.uint32())); + 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; + } + case 6: { + message.suggestionConfig = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TranslationDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.TranslationDetails} TranslationDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TranslationDetails message. + * @function verify + * @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 + */ + 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"; + } + if (message.suggestionConfig != null && message.hasOwnProperty("suggestionConfig")) { + var error = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.verify(message.suggestionConfig); + if (error) + return "suggestionConfig." + error; + } + return null; + }; + + /** + * Creates a TranslationDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails + */ + TranslationDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.TranslationDetails) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.TranslationDetails(); + if (object.sourceTargetMapping) { + if (!Array.isArray(object.sourceTargetMapping)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceTargetMapping: array expected"); + message.sourceTargetMapping = []; + for (var i = 0; i < object.sourceTargetMapping.length; ++i) { + if (typeof object.sourceTargetMapping[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceTargetMapping: object expected"); + message.sourceTargetMapping[i] = $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.fromObject(object.sourceTargetMapping[i]); + } + } + if (object.targetBaseUri != null) + message.targetBaseUri = String(object.targetBaseUri); + if (object.sourceEnvironment != null) { + if (typeof object.sourceEnvironment !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceEnvironment: object expected"); + message.sourceEnvironment = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.fromObject(object.sourceEnvironment); + } + if (object.targetReturnLiterals) { + if (!Array.isArray(object.targetReturnLiterals)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.targetReturnLiterals: array expected"); + message.targetReturnLiterals = []; + for (var i = 0; i < object.targetReturnLiterals.length; ++i) + message.targetReturnLiterals[i] = String(object.targetReturnLiterals[i]); + } + if (object.targetTypes) { + if (!Array.isArray(object.targetTypes)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.targetTypes: array expected"); + message.targetTypes = []; + for (var i = 0; i < object.targetTypes.length; ++i) + message.targetTypes[i] = String(object.targetTypes[i]); + } + if (object.suggestionConfig != null) { + if (typeof object.suggestionConfig !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.suggestionConfig: object expected"); + message.suggestionConfig = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.fromObject(object.suggestionConfig); + } + return message; + }; + + /** + * Creates a plain object from a TranslationDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @static + * @param {google.cloud.bigquery.migration.v2.TranslationDetails} message TranslationDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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; + object.suggestionConfig = 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]; + } + if (message.suggestionConfig != null && message.hasOwnProperty("suggestionConfig")) + object.suggestionConfig = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.toObject(message.suggestionConfig, options); + return object; + }; + + /** + * Converts this TranslationDetails to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @instance + * @returns {Object.} JSON object + */ + TranslationDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TranslationDetails + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TranslationDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TranslationDetails"; + }; + + return TranslationDetails; + })(); + + v2.SuggestionConfig = (function() { + + /** + * Properties of a SuggestionConfig. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ISuggestionConfig + * @property {Array.|null} [skipSuggestionSteps] SuggestionConfig skipSuggestionSteps + */ + + /** + * Constructs a new SuggestionConfig. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a SuggestionConfig. + * @implements ISuggestionConfig + * @constructor + * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig=} [properties] Properties to set + */ + function SuggestionConfig(properties) { + this.skipSuggestionSteps = []; + 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]]; + } + + /** + * SuggestionConfig skipSuggestionSteps. + * @member {Array.} skipSuggestionSteps + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig + * @instance + */ + SuggestionConfig.prototype.skipSuggestionSteps = $util.emptyArray; + + /** + * Creates a new SuggestionConfig instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig + * @static + * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig instance + */ + SuggestionConfig.create = function create(properties) { + return new SuggestionConfig(properties); + }; + + /** + * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig + * @static + * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig} message SuggestionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.skipSuggestionSteps != null && message.skipSuggestionSteps.length) + for (var i = 0; i < message.skipSuggestionSteps.length; ++i) + $root.google.cloud.bigquery.migration.v2.SuggestionStep.encode(message.skipSuggestionSteps[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig + * @static + * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig} message SuggestionConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SuggestionConfig message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionConfig.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SuggestionConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.skipSuggestionSteps && message.skipSuggestionSteps.length)) + message.skipSuggestionSteps = []; + message.skipSuggestionSteps.push($root.google.cloud.bigquery.migration.v2.SuggestionStep.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SuggestionConfig message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SuggestionConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.skipSuggestionSteps != null && message.hasOwnProperty("skipSuggestionSteps")) { + if (!Array.isArray(message.skipSuggestionSteps)) + return "skipSuggestionSteps: array expected"; + for (var i = 0; i < message.skipSuggestionSteps.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.SuggestionStep.verify(message.skipSuggestionSteps[i]); + if (error) + return "skipSuggestionSteps." + error; + } + } + return null; + }; + + /** + * Creates a SuggestionConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig + */ + SuggestionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SuggestionConfig) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.SuggestionConfig(); + if (object.skipSuggestionSteps) { + if (!Array.isArray(object.skipSuggestionSteps)) + throw TypeError(".google.cloud.bigquery.migration.v2.SuggestionConfig.skipSuggestionSteps: array expected"); + message.skipSuggestionSteps = []; + for (var i = 0; i < object.skipSuggestionSteps.length; ++i) { + if (typeof object.skipSuggestionSteps[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.SuggestionConfig.skipSuggestionSteps: object expected"); + message.skipSuggestionSteps[i] = $root.google.cloud.bigquery.migration.v2.SuggestionStep.fromObject(object.skipSuggestionSteps[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig + * @static + * @param {google.cloud.bigquery.migration.v2.SuggestionConfig} message SuggestionConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SuggestionConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.skipSuggestionSteps = []; + if (message.skipSuggestionSteps && message.skipSuggestionSteps.length) { + object.skipSuggestionSteps = []; + for (var j = 0; j < message.skipSuggestionSteps.length; ++j) + object.skipSuggestionSteps[j] = $root.google.cloud.bigquery.migration.v2.SuggestionStep.toObject(message.skipSuggestionSteps[j], options); + } + return object; + }; + + /** + * Converts this SuggestionConfig to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig + * @instance + * @returns {Object.} JSON object + */ + SuggestionConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SuggestionConfig + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SuggestionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SuggestionConfig"; + }; + + return SuggestionConfig; + })(); + + v2.SuggestionStep = (function() { + + /** + * Properties of a SuggestionStep. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ISuggestionStep + * @property {google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|null} [suggestionType] SuggestionStep suggestionType + * @property {google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|null} [rewriteTarget] SuggestionStep rewriteTarget + */ + + /** + * Constructs a new SuggestionStep. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a SuggestionStep. + * @implements ISuggestionStep + * @constructor + * @param {google.cloud.bigquery.migration.v2.ISuggestionStep=} [properties] Properties to set + */ + function SuggestionStep(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SuggestionStep suggestionType. + * @member {google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType} suggestionType + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep + * @instance + */ + SuggestionStep.prototype.suggestionType = 0; + + /** + * SuggestionStep rewriteTarget. + * @member {google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget} rewriteTarget + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep + * @instance + */ + SuggestionStep.prototype.rewriteTarget = 0; + + /** + * Creates a new SuggestionStep instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep + * @static + * @param {google.cloud.bigquery.migration.v2.ISuggestionStep=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep instance + */ + SuggestionStep.create = function create(properties) { + return new SuggestionStep(properties); + }; + + /** + * Encodes the specified SuggestionStep message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep + * @static + * @param {google.cloud.bigquery.migration.v2.ISuggestionStep} message SuggestionStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionStep.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.suggestionType != null && Object.hasOwnProperty.call(message, "suggestionType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.suggestionType); + if (message.rewriteTarget != null && Object.hasOwnProperty.call(message, "rewriteTarget")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rewriteTarget); + return writer; + }; + + /** + * Encodes the specified SuggestionStep message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep + * @static + * @param {google.cloud.bigquery.migration.v2.ISuggestionStep} message SuggestionStep message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SuggestionStep.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SuggestionStep message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionStep.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SuggestionStep(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.suggestionType = reader.int32(); + break; + } + case 2: { + message.rewriteTarget = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SuggestionStep message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SuggestionStep.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SuggestionStep message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SuggestionStep.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.suggestionType != null && message.hasOwnProperty("suggestionType")) + switch (message.suggestionType) { + default: + return "suggestionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.rewriteTarget != null && message.hasOwnProperty("rewriteTarget")) + switch (message.rewriteTarget) { + default: + return "rewriteTarget: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a SuggestionStep message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep + */ + SuggestionStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SuggestionStep) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.SuggestionStep(); + switch (object.suggestionType) { + default: + if (typeof object.suggestionType === "number") { + message.suggestionType = object.suggestionType; + break; + } + break; + case "SUGGESTION_TYPE_UNSPECIFIED": + case 0: + message.suggestionType = 0; + break; + case "QUERY_CUSTOMIZATION": + case 1: + message.suggestionType = 1; + break; + case "TRANSLATION_EXPLANATION": + case 2: + message.suggestionType = 2; + break; + } + switch (object.rewriteTarget) { + default: + if (typeof object.rewriteTarget === "number") { + message.rewriteTarget = object.rewriteTarget; + break; + } + break; + case "REWRITE_TARGET_UNSPECIFIED": + case 0: + message.rewriteTarget = 0; + break; + case "SOURCE_SQL": + case 1: + message.rewriteTarget = 1; + break; + case "TARGET_SQL": + case 2: + message.rewriteTarget = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a SuggestionStep message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep + * @static + * @param {google.cloud.bigquery.migration.v2.SuggestionStep} message SuggestionStep + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SuggestionStep.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.suggestionType = options.enums === String ? "SUGGESTION_TYPE_UNSPECIFIED" : 0; + object.rewriteTarget = options.enums === String ? "REWRITE_TARGET_UNSPECIFIED" : 0; + } + if (message.suggestionType != null && message.hasOwnProperty("suggestionType")) + object.suggestionType = options.enums === String ? $root.google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType[message.suggestionType] === undefined ? message.suggestionType : $root.google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType[message.suggestionType] : message.suggestionType; + if (message.rewriteTarget != null && message.hasOwnProperty("rewriteTarget")) + object.rewriteTarget = options.enums === String ? $root.google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget[message.rewriteTarget] === undefined ? message.rewriteTarget : $root.google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget[message.rewriteTarget] : message.rewriteTarget; + return object; + }; + + /** + * Converts this SuggestionStep to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep + * @instance + * @returns {Object.} JSON object + */ + SuggestionStep.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SuggestionStep + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SuggestionStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SuggestionStep"; + }; + + /** + * SuggestionType enum. + * @name google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType + * @enum {number} + * @property {number} SUGGESTION_TYPE_UNSPECIFIED=0 SUGGESTION_TYPE_UNSPECIFIED value + * @property {number} QUERY_CUSTOMIZATION=1 QUERY_CUSTOMIZATION value + * @property {number} TRANSLATION_EXPLANATION=2 TRANSLATION_EXPLANATION value + */ + SuggestionStep.SuggestionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SUGGESTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "QUERY_CUSTOMIZATION"] = 1; + values[valuesById[2] = "TRANSLATION_EXPLANATION"] = 2; + return values; + })(); + + /** + * RewriteTarget enum. + * @name google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget + * @enum {number} + * @property {number} REWRITE_TARGET_UNSPECIFIED=0 REWRITE_TARGET_UNSPECIFIED value + * @property {number} SOURCE_SQL=1 SOURCE_SQL value + * @property {number} TARGET_SQL=2 TARGET_SQL value + */ + SuggestionStep.RewriteTarget = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REWRITE_TARGET_UNSPECIFIED"] = 0; + values[valuesById[1] = "SOURCE_SQL"] = 1; + values[valuesById[2] = "TARGET_SQL"] = 2; + return values; + })(); + + return SuggestionStep; + })(); + + v2.SourceTargetMapping = (function() { + + /** + * Properties of a SourceTargetMapping. + * @memberof google.cloud.bigquery.migration.v2 + * @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 SourceTargetMapping. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a SourceTargetMapping. + * @implements ISourceTargetMapping + * @constructor + * @param {google.cloud.bigquery.migration.v2.ISourceTargetMapping=} [properties] Properties to set + */ + function SourceTargetMapping(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]]; + } + + /** + * 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.SourceTargetMapping + * @static + * @param {google.cloud.bigquery.migration.v2.ISourceTargetMapping=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SourceTargetMapping} SourceTargetMapping instance + */ + SourceTargetMapping.create = function create(properties) { + return new SourceTargetMapping(properties); + }; + + /** + * 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.SourceTargetMapping + * @static + * @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 + */ + 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 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.SourceTargetMapping + * @static + * @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 + */ + SourceTargetMapping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceTargetMapping message from the specified reader or buffer. + * @function decode + * @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.SourceTargetMapping} SourceTargetMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceTargetMapping.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SourceTargetMapping(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + } + } + return message; + }; + + /** + * Decodes a SourceTargetMapping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.SourceTargetMapping} SourceTargetMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceTargetMapping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceTargetMapping message. + * @function verify + * @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 + */ + 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 SourceTargetMapping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.SourceTargetMapping} SourceTargetMapping + */ + SourceTargetMapping.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SourceTargetMapping) + return object; + 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 SourceTargetMapping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping + * @static + * @param {google.cloud.bigquery.migration.v2.SourceTargetMapping} message SourceTargetMapping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + 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 SourceTargetMapping to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping + * @instance + * @returns {Object.} JSON object + */ + SourceTargetMapping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceTargetMapping + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceTargetMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SourceTargetMapping"; + }; + + return SourceTargetMapping; + })(); + + v2.SourceSpec = (function() { + + /** + * Properties of a SourceSpec. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ISourceSpec + * @property {string|null} [baseUri] SourceSpec baseUri + * @property {google.cloud.bigquery.migration.v2.ILiteral|null} [literal] SourceSpec literal + * @property {string|null} [gcsFilePath] SourceSpec gcsFilePath + * @property {string|null} [encoding] SourceSpec encoding + */ + + /** + * Constructs a new SourceSpec. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a SourceSpec. + * @implements ISourceSpec + * @constructor + * @param {google.cloud.bigquery.migration.v2.ISourceSpec=} [properties] Properties to set + */ + function SourceSpec(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]]; + } + + /** + * SourceSpec baseUri. + * @member {string|null|undefined} baseUri + * @memberof google.cloud.bigquery.migration.v2.SourceSpec + * @instance + */ + SourceSpec.prototype.baseUri = null; + + /** + * 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 gcsFilePath. + * @member {string|null|undefined} gcsFilePath + * @memberof google.cloud.bigquery.migration.v2.SourceSpec + * @instance + */ + SourceSpec.prototype.gcsFilePath = 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"|"gcsFilePath"|undefined} source + * @memberof google.cloud.bigquery.migration.v2.SourceSpec + * @instance + */ + Object.defineProperty(SourceSpec.prototype, "source", { + get: $util.oneOfGetter($oneOfFields = ["baseUri", "literal", "gcsFilePath"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SourceSpec instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.SourceSpec + * @static + * @param {google.cloud.bigquery.migration.v2.ISourceSpec=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SourceSpec} SourceSpec instance + */ + SourceSpec.create = function create(properties) { + return new SourceSpec(properties); + }; + + /** + * 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.SourceSpec + * @static + * @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 + */ + SourceSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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); + if (message.gcsFilePath != null && Object.hasOwnProperty.call(message, "gcsFilePath")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcsFilePath); + return writer; + }; + + /** + * 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.SourceSpec + * @static + * @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 + */ + SourceSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceSpec message from the specified reader or buffer. + * @function decode + * @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.SourceSpec} SourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SourceSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.baseUri = reader.string(); + break; + } + case 2: { + message.literal = $root.google.cloud.bigquery.migration.v2.Literal.decode(reader, reader.uint32()); + break; + } + case 4: { + message.gcsFilePath = reader.string(); + break; + } + case 3: { + message.encoding = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.SourceSpec} SourceSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceSpec message. + * @function verify + * @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 + */ + SourceSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + 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 "literal." + error; + } + } + if (message.gcsFilePath != null && message.hasOwnProperty("gcsFilePath")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.gcsFilePath)) + return "gcsFilePath: string expected"; + } + if (message.encoding != null && message.hasOwnProperty("encoding")) + if (!$util.isString(message.encoding)) + return "encoding: string expected"; + return null; + }; + + /** + * Creates a SourceSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.SourceSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.SourceSpec} SourceSpec + */ + 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.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.gcsFilePath != null) + message.gcsFilePath = String(object.gcsFilePath); + if (object.encoding != null) + message.encoding = String(object.encoding); + return message; + }; + + /** + * Creates a plain object from a SourceSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.SourceSpec + * @static + * @param {google.cloud.bigquery.migration.v2.SourceSpec} message SourceSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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; + if (message.gcsFilePath != null && message.hasOwnProperty("gcsFilePath")) { + object.gcsFilePath = message.gcsFilePath; + if (options.oneofs) + object.source = "gcsFilePath"; + } + return object; + }; + + /** + * Converts this SourceSpec to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.SourceSpec + * @instance + * @returns {Object.} JSON object + */ + SourceSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceSpec + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.SourceSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SourceSpec"; + }; + + return SourceSpec; + })(); + + v2.TargetSpec = (function() { + + /** + * Properties of a TargetSpec. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ITargetSpec + * @property {string|null} [relativePath] TargetSpec relativePath + */ + + /** + * Constructs a new TargetSpec. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a TargetSpec. + * @implements ITargetSpec + * @constructor + * @param {google.cloud.bigquery.migration.v2.ITargetSpec=} [properties] Properties to set + */ + function TargetSpec(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]]; + } + + /** + * TargetSpec relativePath. + * @member {string} relativePath + * @memberof google.cloud.bigquery.migration.v2.TargetSpec + * @instance + */ + TargetSpec.prototype.relativePath = ""; + + /** + * Creates a new TargetSpec instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.TargetSpec + * @static + * @param {google.cloud.bigquery.migration.v2.ITargetSpec=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TargetSpec} TargetSpec instance + */ + TargetSpec.create = function create(properties) { + return new TargetSpec(properties); + }; + + /** + * 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.TargetSpec + * @static + * @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 + */ + TargetSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.relativePath != null && Object.hasOwnProperty.call(message, "relativePath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.relativePath); + return writer; + }; + + /** + * 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.TargetSpec + * @static + * @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 + */ + TargetSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TargetSpec message from the specified reader or buffer. + * @function decode + * @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.TargetSpec} TargetSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetSpec.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TargetSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.relativePath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TargetSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.TargetSpec} TargetSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TargetSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TargetSpec message. + * @function verify + * @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 + */ + TargetSpec.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.relativePath != null && message.hasOwnProperty("relativePath")) + if (!$util.isString(message.relativePath)) + return "relativePath: string expected"; + return null; + }; + + /** + * Creates a TargetSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.TargetSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.TargetSpec} TargetSpec + */ + 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.TargetSpec(); + if (object.relativePath != null) + message.relativePath = String(object.relativePath); + return message; + }; + + /** + * Creates a plain object from a TargetSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.TargetSpec + * @static + * @param {google.cloud.bigquery.migration.v2.TargetSpec} message TargetSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TargetSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.relativePath = ""; + if (message.relativePath != null && message.hasOwnProperty("relativePath")) + object.relativePath = message.relativePath; + return object; + }; + + /** + * Converts this TargetSpec to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.TargetSpec + * @instance + * @returns {Object.} JSON object + */ + TargetSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TargetSpec + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.TargetSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TargetSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TargetSpec"; + }; + + return TargetSpec; + })(); + + v2.Literal = (function() { + + /** + * Properties of a Literal. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ILiteral + * @property {string|null} [literalString] Literal literalString + * @property {Uint8Array|null} [literalBytes] Literal literalBytes + * @property {string|null} [relativePath] Literal relativePath + */ + + /** + * Constructs a new Literal. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a Literal. + * @implements ILiteral + * @constructor + * @param {google.cloud.bigquery.migration.v2.ILiteral=} [properties] Properties to set + */ + function Literal(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]]; + } + + /** + * Literal literalString. + * @member {string|null|undefined} literalString + * @memberof google.cloud.bigquery.migration.v2.Literal + * @instance + */ + Literal.prototype.literalString = null; + + /** + * Literal literalBytes. + * @member {Uint8Array|null|undefined} literalBytes + * @memberof google.cloud.bigquery.migration.v2.Literal + * @instance + */ + Literal.prototype.literalBytes = null; + + /** + * Literal relativePath. + * @member {string} relativePath + * @memberof google.cloud.bigquery.migration.v2.Literal + * @instance + */ + Literal.prototype.relativePath = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Literal literalData. + * @member {"literalString"|"literalBytes"|undefined} literalData + * @memberof google.cloud.bigquery.migration.v2.Literal + * @instance + */ + Object.defineProperty(Literal.prototype, "literalData", { + get: $util.oneOfGetter($oneOfFields = ["literalString", "literalBytes"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Literal instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.Literal + * @static + * @param {google.cloud.bigquery.migration.v2.ILiteral=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.Literal} Literal instance + */ + Literal.create = function create(properties) { + return new Literal(properties); + }; + + /** + * 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.Literal + * @static + * @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 + */ + Literal.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 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.Literal + * @static + * @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 + */ + Literal.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Literal message from the specified reader or buffer. + * @function decode + * @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.Literal} Literal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Literal.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.Literal(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.literalString = reader.string(); + break; + } + case 3: { + message.literalBytes = reader.bytes(); + break; + } + case 1: { + message.relativePath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Literal message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.Literal} Literal + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Literal.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Literal message. + * @function verify + * @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 + */ + Literal.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object 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 Literal message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.Literal + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.Literal} Literal + */ + 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.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 Literal message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.Literal + * @static + * @param {google.cloud.bigquery.migration.v2.Literal} message Literal + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Literal.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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"; + } + return object; + }; + + /** + * Converts this Literal to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.Literal + * @instance + * @returns {Object.} JSON object + */ + Literal.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Literal + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.Literal + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Literal.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.Literal"; + }; + + return Literal; + })(); + + v2.SourceEnvironment = (function() { + + /** + * Properties of a SourceEnvironment. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ISourceEnvironment + * @property {string|null} [defaultDatabase] SourceEnvironment defaultDatabase + * @property {Array.|null} [schemaSearchPath] SourceEnvironment schemaSearchPath + * @property {string|null} [metadataStoreDataset] SourceEnvironment metadataStoreDataset + */ + + /** + * Constructs a new SourceEnvironment. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a SourceEnvironment. + * @implements ISourceEnvironment + * @constructor + * @param {google.cloud.bigquery.migration.v2.ISourceEnvironment=} [properties] Properties to set + */ + function SourceEnvironment(properties) { + this.schemaSearchPath = []; + 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]]; + } + + /** + * SourceEnvironment defaultDatabase. + * @member {string} defaultDatabase + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment + * @instance + */ + SourceEnvironment.prototype.defaultDatabase = ""; + + /** + * SourceEnvironment schemaSearchPath. + * @member {Array.} schemaSearchPath + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment + * @instance + */ + SourceEnvironment.prototype.schemaSearchPath = $util.emptyArray; + + /** + * SourceEnvironment metadataStoreDataset. + * @member {string} metadataStoreDataset + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment + * @instance + */ + SourceEnvironment.prototype.metadataStoreDataset = ""; + + /** + * Creates a new SourceEnvironment instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment + * @static + * @param {google.cloud.bigquery.migration.v2.ISourceEnvironment=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SourceEnvironment} SourceEnvironment instance + */ + SourceEnvironment.create = function create(properties) { + return new SourceEnvironment(properties); + }; + + /** + * 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.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 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.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.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceEnvironment message from the specified reader or buffer. + * @function decode + * @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.SourceEnvironment} SourceEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceEnvironment.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SourceEnvironment(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.defaultDatabase = reader.string(); + break; + } + case 2: { + if (!(message.schemaSearchPath && message.schemaSearchPath.length)) + message.schemaSearchPath = []; + message.schemaSearchPath.push(reader.string()); + break; + } + case 3: { + message.metadataStoreDataset = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceEnvironment message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.SourceEnvironment} SourceEnvironment + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceEnvironment.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceEnvironment message. + * @function verify + * @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 + */ + SourceEnvironment.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 SourceEnvironment message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.SourceEnvironment} SourceEnvironment + */ + 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.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 SourceEnvironment message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment + * @static + * @param {google.cloud.bigquery.migration.v2.SourceEnvironment} message SourceEnvironment + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceEnvironment.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 SourceEnvironment to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment + * @instance + * @returns {Object.} JSON object + */ + SourceEnvironment.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceEnvironment + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceEnvironment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SourceEnvironment"; + }; + + return SourceEnvironment; + })(); + + v2.GcsReportLogMessage = (function() { + + /** + * Properties of a GcsReportLogMessage. + * @memberof google.cloud.bigquery.migration.v2 + * @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 GcsReportLogMessage. + * @implements IGcsReportLogMessage + * @constructor + * @param {google.cloud.bigquery.migration.v2.IGcsReportLogMessage=} [properties] Properties to set + */ + function GcsReportLogMessage(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]]; + } + + /** + * GcsReportLogMessage severity. + * @member {string} severity + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @instance + */ + GcsReportLogMessage.prototype.severity = ""; + + /** + * GcsReportLogMessage category. + * @member {string} category + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @instance + */ + GcsReportLogMessage.prototype.category = ""; + + /** + * 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.GcsReportLogMessage + * @static + * @param {google.cloud.bigquery.migration.v2.IGcsReportLogMessage=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.GcsReportLogMessage} GcsReportLogMessage instance + */ + GcsReportLogMessage.create = function create(properties) { + return new GcsReportLogMessage(properties); + }; + + /** + * 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.GcsReportLogMessage + * @static + * @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 + */ + GcsReportLogMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + 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 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.GcsReportLogMessage + * @static + * @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 + */ + GcsReportLogMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsReportLogMessage message from the specified reader or buffer. + * @function decode + * @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.GcsReportLogMessage} GcsReportLogMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsReportLogMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.severity = reader.string(); + break; + } + case 2: { + 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: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsReportLogMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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.GcsReportLogMessage} GcsReportLogMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsReportLogMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * 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 GcsReportLogMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.GcsReportLogMessage} GcsReportLogMessage + */ + 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.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 GcsReportLogMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @static + * @param {google.cloud.bigquery.migration.v2.GcsReportLogMessage} message GcsReportLogMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsReportLogMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + 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 GcsReportLogMessage to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @instance + * @returns {Object.} JSON object + */ + GcsReportLogMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsReportLogMessage + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsReportLogMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.GcsReportLogMessage"; + }; + + return GcsReportLogMessage; + })(); + + v2.MigrationService = (function() { + + /** + * Constructs a new MigrationService service. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a MigrationService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function MigrationService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MigrationService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MigrationService; + + /** + * Creates new MigrationService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {MigrationService} RPC service. Useful where requests and/or responses are streamed. + */ + MigrationService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|createMigrationWorkflow}. + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @typedef CreateMigrationWorkflowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.migration.v2.MigrationWorkflow} [response] MigrationWorkflow + */ + + /** + * Calls CreateMigrationWorkflow. + * @function createMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest} request CreateMigrationWorkflowRequest message or plain object + * @param {google.cloud.bigquery.migration.v2.MigrationService.CreateMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and MigrationWorkflow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MigrationService.prototype.createMigrationWorkflow = function createMigrationWorkflow(request, callback) { + return this.rpcCall(createMigrationWorkflow, $root.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest, $root.google.cloud.bigquery.migration.v2.MigrationWorkflow, request, callback); + }, "name", { value: "CreateMigrationWorkflow" }); + + /** + * Calls CreateMigrationWorkflow. + * @function createMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest} request CreateMigrationWorkflowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|getMigrationWorkflow}. + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @typedef GetMigrationWorkflowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.migration.v2.MigrationWorkflow} [response] MigrationWorkflow + */ + + /** + * Calls GetMigrationWorkflow. + * @function getMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest} request GetMigrationWorkflowRequest message or plain object + * @param {google.cloud.bigquery.migration.v2.MigrationService.GetMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and MigrationWorkflow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MigrationService.prototype.getMigrationWorkflow = function getMigrationWorkflow(request, callback) { + return this.rpcCall(getMigrationWorkflow, $root.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest, $root.google.cloud.bigquery.migration.v2.MigrationWorkflow, request, callback); + }, "name", { value: "GetMigrationWorkflow" }); + + /** + * Calls GetMigrationWorkflow. + * @function getMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest} request GetMigrationWorkflowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|listMigrationWorkflows}. + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @typedef ListMigrationWorkflowsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse} [response] ListMigrationWorkflowsResponse + */ + + /** + * Calls ListMigrationWorkflows. + * @function listMigrationWorkflows + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest} request ListMigrationWorkflowsRequest message or plain object + * @param {google.cloud.bigquery.migration.v2.MigrationService.ListMigrationWorkflowsCallback} callback Node-style callback called with the error, if any, and ListMigrationWorkflowsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MigrationService.prototype.listMigrationWorkflows = function listMigrationWorkflows(request, callback) { + return this.rpcCall(listMigrationWorkflows, $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest, $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse, request, callback); + }, "name", { value: "ListMigrationWorkflows" }); + + /** + * Calls ListMigrationWorkflows. + * @function listMigrationWorkflows + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest} request ListMigrationWorkflowsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|deleteMigrationWorkflow}. + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @typedef DeleteMigrationWorkflowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteMigrationWorkflow. + * @function deleteMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest} request DeleteMigrationWorkflowRequest message or plain object + * @param {google.cloud.bigquery.migration.v2.MigrationService.DeleteMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MigrationService.prototype.deleteMigrationWorkflow = function deleteMigrationWorkflow(request, callback) { + return this.rpcCall(deleteMigrationWorkflow, $root.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteMigrationWorkflow" }); + + /** + * Calls DeleteMigrationWorkflow. + * @function deleteMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest} request DeleteMigrationWorkflowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|startMigrationWorkflow}. + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @typedef StartMigrationWorkflowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls StartMigrationWorkflow. + * @function startMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest} request StartMigrationWorkflowRequest message or plain object + * @param {google.cloud.bigquery.migration.v2.MigrationService.StartMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MigrationService.prototype.startMigrationWorkflow = function startMigrationWorkflow(request, callback) { + return this.rpcCall(startMigrationWorkflow, $root.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "StartMigrationWorkflow" }); + + /** + * Calls StartMigrationWorkflow. + * @function startMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest} request StartMigrationWorkflowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|getMigrationSubtask}. + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @typedef GetMigrationSubtaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.migration.v2.MigrationSubtask} [response] MigrationSubtask + */ + + /** + * Calls GetMigrationSubtask. + * @function getMigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest} request GetMigrationSubtaskRequest message or plain object + * @param {google.cloud.bigquery.migration.v2.MigrationService.GetMigrationSubtaskCallback} callback Node-style callback called with the error, if any, and MigrationSubtask + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MigrationService.prototype.getMigrationSubtask = function getMigrationSubtask(request, callback) { + return this.rpcCall(getMigrationSubtask, $root.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest, $root.google.cloud.bigquery.migration.v2.MigrationSubtask, request, callback); + }, "name", { value: "GetMigrationSubtask" }); + + /** + * Calls GetMigrationSubtask. + * @function getMigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest} request GetMigrationSubtaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|listMigrationSubtasks}. + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @typedef ListMigrationSubtasksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse} [response] ListMigrationSubtasksResponse + */ + + /** + * Calls ListMigrationSubtasks. + * @function listMigrationSubtasks + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest} request ListMigrationSubtasksRequest message or plain object + * @param {google.cloud.bigquery.migration.v2.MigrationService.ListMigrationSubtasksCallback} callback Node-style callback called with the error, if any, and ListMigrationSubtasksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MigrationService.prototype.listMigrationSubtasks = function listMigrationSubtasks(request, callback) { + return this.rpcCall(listMigrationSubtasks, $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest, $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse, request, callback); + }, "name", { value: "ListMigrationSubtasks" }); + + /** + * Calls ListMigrationSubtasks. + * @function listMigrationSubtasks + * @memberof google.cloud.bigquery.migration.v2.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest} request ListMigrationSubtasksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MigrationService; + })(); + + v2.CreateMigrationWorkflowRequest = (function() { + + /** + * Properties of a CreateMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ICreateMigrationWorkflowRequest + * @property {string|null} [parent] CreateMigrationWorkflowRequest parent + * @property {google.cloud.bigquery.migration.v2.IMigrationWorkflow|null} [migrationWorkflow] CreateMigrationWorkflowRequest migrationWorkflow + */ + + /** + * Constructs a new CreateMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a CreateMigrationWorkflowRequest. + * @implements ICreateMigrationWorkflowRequest + * @constructor + * @param {google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest=} [properties] Properties to set + */ + function CreateMigrationWorkflowRequest(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]]; + } + + /** + * CreateMigrationWorkflowRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest + * @instance + */ + CreateMigrationWorkflowRequest.prototype.parent = ""; + + /** + * CreateMigrationWorkflowRequest migrationWorkflow. + * @member {google.cloud.bigquery.migration.v2.IMigrationWorkflow|null|undefined} migrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest + * @instance + */ + CreateMigrationWorkflowRequest.prototype.migrationWorkflow = null; + + /** + * Creates a new CreateMigrationWorkflowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest instance + */ + CreateMigrationWorkflowRequest.create = function create(properties) { + return new CreateMigrationWorkflowRequest(properties); + }; + + /** + * Encodes the specified CreateMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest} message CreateMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMigrationWorkflowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.migrationWorkflow != null && Object.hasOwnProperty.call(message, "migrationWorkflow")) + $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.encode(message.migrationWorkflow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest} message CreateMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest + * @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.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMigrationWorkflowRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.migrationWorkflow = $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateMigrationWorkflowRequest message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateMigrationWorkflowRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.migrationWorkflow != null && message.hasOwnProperty("migrationWorkflow")) { + var error = $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.verify(message.migrationWorkflow); + if (error) + return "migrationWorkflow." + error; + } + return null; + }; + + /** + * Creates a CreateMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest + */ + CreateMigrationWorkflowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.migrationWorkflow != null) { + if (typeof object.migrationWorkflow !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest.migrationWorkflow: object expected"); + message.migrationWorkflow = $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.fromObject(object.migrationWorkflow); + } + return message; + }; + + /** + * Creates a plain object from a CreateMigrationWorkflowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest} message CreateMigrationWorkflowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateMigrationWorkflowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.migrationWorkflow = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.migrationWorkflow != null && message.hasOwnProperty("migrationWorkflow")) + object.migrationWorkflow = $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.toObject(message.migrationWorkflow, options); + return object; + }; + + /** + * Converts this CreateMigrationWorkflowRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest + * @instance + * @returns {Object.} JSON object + */ + CreateMigrationWorkflowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateMigrationWorkflowRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest"; + }; + + return CreateMigrationWorkflowRequest; + })(); + + v2.GetMigrationWorkflowRequest = (function() { + + /** + * Properties of a GetMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IGetMigrationWorkflowRequest + * @property {string|null} [name] GetMigrationWorkflowRequest name + * @property {google.protobuf.IFieldMask|null} [readMask] GetMigrationWorkflowRequest readMask + */ + + /** + * Constructs a new GetMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a GetMigrationWorkflowRequest. + * @implements IGetMigrationWorkflowRequest + * @constructor + * @param {google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest=} [properties] Properties to set + */ + function GetMigrationWorkflowRequest(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]]; + } + + /** + * GetMigrationWorkflowRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest + * @instance + */ + GetMigrationWorkflowRequest.prototype.name = ""; + + /** + * GetMigrationWorkflowRequest readMask. + * @member {google.protobuf.IFieldMask|null|undefined} readMask + * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest + * @instance + */ + GetMigrationWorkflowRequest.prototype.readMask = null; + + /** + * Creates a new GetMigrationWorkflowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest instance + */ + GetMigrationWorkflowRequest.create = function create(properties) { + return new GetMigrationWorkflowRequest(properties); + }; + + /** + * Encodes the specified GetMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest} message GetMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMigrationWorkflowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) + $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest} message GetMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest + * @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.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMigrationWorkflowRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMigrationWorkflowRequest message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMigrationWorkflowRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.readMask != null && message.hasOwnProperty("readMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.readMask); + if (error) + return "readMask." + error; + } + return null; + }; + + /** + * Creates a GetMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest + */ + GetMigrationWorkflowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.readMask != null) { + if (typeof object.readMask !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest.readMask: object expected"); + message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); + } + return message; + }; + + /** + * Creates a plain object from a GetMigrationWorkflowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest} message GetMigrationWorkflowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMigrationWorkflowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.readMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.readMask != null && message.hasOwnProperty("readMask")) + object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); + return object; + }; + + /** + * Converts this GetMigrationWorkflowRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest + * @instance + * @returns {Object.} JSON object + */ + GetMigrationWorkflowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMigrationWorkflowRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest"; + }; + + return GetMigrationWorkflowRequest; + })(); + + v2.ListMigrationWorkflowsRequest = (function() { + + /** + * Properties of a ListMigrationWorkflowsRequest. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IListMigrationWorkflowsRequest + * @property {string|null} [parent] ListMigrationWorkflowsRequest parent + * @property {google.protobuf.IFieldMask|null} [readMask] ListMigrationWorkflowsRequest readMask + * @property {number|null} [pageSize] ListMigrationWorkflowsRequest pageSize + * @property {string|null} [pageToken] ListMigrationWorkflowsRequest pageToken + */ + + /** + * Constructs a new ListMigrationWorkflowsRequest. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a ListMigrationWorkflowsRequest. + * @implements IListMigrationWorkflowsRequest + * @constructor + * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest=} [properties] Properties to set + */ + function ListMigrationWorkflowsRequest(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]]; + } + + /** + * ListMigrationWorkflowsRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest + * @instance + */ + ListMigrationWorkflowsRequest.prototype.parent = ""; + + /** + * ListMigrationWorkflowsRequest readMask. + * @member {google.protobuf.IFieldMask|null|undefined} readMask + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest + * @instance + */ + ListMigrationWorkflowsRequest.prototype.readMask = null; + + /** + * ListMigrationWorkflowsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest + * @instance + */ + ListMigrationWorkflowsRequest.prototype.pageSize = 0; + + /** + * ListMigrationWorkflowsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest + * @instance + */ + ListMigrationWorkflowsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMigrationWorkflowsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest instance + */ + ListMigrationWorkflowsRequest.create = function create(properties) { + return new ListMigrationWorkflowsRequest(properties); + }; + + /** + * Encodes the specified ListMigrationWorkflowsRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest} message ListMigrationWorkflowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationWorkflowsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) + $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListMigrationWorkflowsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest} message ListMigrationWorkflowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationWorkflowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest + * @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.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationWorkflowsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationWorkflowsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMigrationWorkflowsRequest message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMigrationWorkflowsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.readMask != null && message.hasOwnProperty("readMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.readMask); + if (error) + return "readMask." + error; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListMigrationWorkflowsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest + */ + ListMigrationWorkflowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.readMask != null) { + if (typeof object.readMask !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest.readMask: object expected"); + message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); + } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListMigrationWorkflowsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest + * @static + * @param {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest} message ListMigrationWorkflowsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMigrationWorkflowsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.readMask = null; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.readMask != null && message.hasOwnProperty("readMask")) + object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListMigrationWorkflowsRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMigrationWorkflowsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMigrationWorkflowsRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMigrationWorkflowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest"; + }; + + return ListMigrationWorkflowsRequest; + })(); + + v2.ListMigrationWorkflowsResponse = (function() { + + /** + * Properties of a ListMigrationWorkflowsResponse. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IListMigrationWorkflowsResponse + * @property {Array.|null} [migrationWorkflows] ListMigrationWorkflowsResponse migrationWorkflows + * @property {string|null} [nextPageToken] ListMigrationWorkflowsResponse nextPageToken + */ + + /** + * Constructs a new ListMigrationWorkflowsResponse. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a ListMigrationWorkflowsResponse. + * @implements IListMigrationWorkflowsResponse + * @constructor + * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse=} [properties] Properties to set + */ + function ListMigrationWorkflowsResponse(properties) { + this.migrationWorkflows = []; + 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]]; + } + + /** + * ListMigrationWorkflowsResponse migrationWorkflows. + * @member {Array.} migrationWorkflows + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse + * @instance + */ + ListMigrationWorkflowsResponse.prototype.migrationWorkflows = $util.emptyArray; + + /** + * ListMigrationWorkflowsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse + * @instance + */ + ListMigrationWorkflowsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMigrationWorkflowsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse + * @static + * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse instance + */ + ListMigrationWorkflowsResponse.create = function create(properties) { + return new ListMigrationWorkflowsResponse(properties); + }; + + /** + * Encodes the specified ListMigrationWorkflowsResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse + * @static + * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse} message ListMigrationWorkflowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationWorkflowsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.migrationWorkflows != null && message.migrationWorkflows.length) + for (var i = 0; i < message.migrationWorkflows.length; ++i) + $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.encode(message.migrationWorkflows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListMigrationWorkflowsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse + * @static + * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse} message ListMigrationWorkflowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationWorkflowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse + * @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.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationWorkflowsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.migrationWorkflows && message.migrationWorkflows.length)) + message.migrationWorkflows = []; + message.migrationWorkflows.push($root.google.cloud.bigquery.migration.v2.MigrationWorkflow.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationWorkflowsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMigrationWorkflowsResponse message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMigrationWorkflowsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.migrationWorkflows != null && message.hasOwnProperty("migrationWorkflows")) { + if (!Array.isArray(message.migrationWorkflows)) + return "migrationWorkflows: array expected"; + for (var i = 0; i < message.migrationWorkflows.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.verify(message.migrationWorkflows[i]); + if (error) + return "migrationWorkflows." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListMigrationWorkflowsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse + */ + ListMigrationWorkflowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse(); + if (object.migrationWorkflows) { + if (!Array.isArray(object.migrationWorkflows)) + throw TypeError(".google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse.migrationWorkflows: array expected"); + message.migrationWorkflows = []; + for (var i = 0; i < object.migrationWorkflows.length; ++i) { + if (typeof object.migrationWorkflows[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse.migrationWorkflows: object expected"); + message.migrationWorkflows[i] = $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.fromObject(object.migrationWorkflows[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListMigrationWorkflowsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse + * @static + * @param {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse} message ListMigrationWorkflowsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMigrationWorkflowsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.migrationWorkflows = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.migrationWorkflows && message.migrationWorkflows.length) { + object.migrationWorkflows = []; + for (var j = 0; j < message.migrationWorkflows.length; ++j) + object.migrationWorkflows[j] = $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.toObject(message.migrationWorkflows[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListMigrationWorkflowsResponse to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMigrationWorkflowsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMigrationWorkflowsResponse + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMigrationWorkflowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse"; + }; + + return ListMigrationWorkflowsResponse; + })(); + + v2.DeleteMigrationWorkflowRequest = (function() { + + /** + * Properties of a DeleteMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IDeleteMigrationWorkflowRequest + * @property {string|null} [name] DeleteMigrationWorkflowRequest name + */ + + /** + * Constructs a new DeleteMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a DeleteMigrationWorkflowRequest. + * @implements IDeleteMigrationWorkflowRequest + * @constructor + * @param {google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest=} [properties] Properties to set + */ + function DeleteMigrationWorkflowRequest(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]]; + } + + /** + * DeleteMigrationWorkflowRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest + * @instance + */ + DeleteMigrationWorkflowRequest.prototype.name = ""; + + /** + * Creates a new DeleteMigrationWorkflowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest instance + */ + DeleteMigrationWorkflowRequest.create = function create(properties) { + return new DeleteMigrationWorkflowRequest(properties); + }; + + /** + * Encodes the specified DeleteMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest} message DeleteMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMigrationWorkflowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest} message DeleteMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest + * @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.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMigrationWorkflowRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteMigrationWorkflowRequest message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteMigrationWorkflowRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest + */ + DeleteMigrationWorkflowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteMigrationWorkflowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest} message DeleteMigrationWorkflowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteMigrationWorkflowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteMigrationWorkflowRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteMigrationWorkflowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteMigrationWorkflowRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest"; + }; + + return DeleteMigrationWorkflowRequest; + })(); + + v2.StartMigrationWorkflowRequest = (function() { + + /** + * Properties of a StartMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IStartMigrationWorkflowRequest + * @property {string|null} [name] StartMigrationWorkflowRequest name + */ + + /** + * Constructs a new StartMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a StartMigrationWorkflowRequest. + * @implements IStartMigrationWorkflowRequest + * @constructor + * @param {google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest=} [properties] Properties to set + */ + function StartMigrationWorkflowRequest(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]]; + } + + /** + * StartMigrationWorkflowRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest + * @instance + */ + StartMigrationWorkflowRequest.prototype.name = ""; + + /** + * Creates a new StartMigrationWorkflowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest instance + */ + StartMigrationWorkflowRequest.create = function create(properties) { + return new StartMigrationWorkflowRequest(properties); + }; + + /** + * Encodes the specified StartMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest} message StartMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartMigrationWorkflowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified StartMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest} message StartMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest + * @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.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartMigrationWorkflowRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartMigrationWorkflowRequest message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartMigrationWorkflowRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a StartMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest + */ + StartMigrationWorkflowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a StartMigrationWorkflowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest} message StartMigrationWorkflowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartMigrationWorkflowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this StartMigrationWorkflowRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest + * @instance + * @returns {Object.} JSON object + */ + StartMigrationWorkflowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StartMigrationWorkflowRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest"; + }; + + return StartMigrationWorkflowRequest; + })(); + + v2.GetMigrationSubtaskRequest = (function() { + + /** + * Properties of a GetMigrationSubtaskRequest. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IGetMigrationSubtaskRequest + * @property {string|null} [name] GetMigrationSubtaskRequest name + * @property {google.protobuf.IFieldMask|null} [readMask] GetMigrationSubtaskRequest readMask + */ + + /** + * Constructs a new GetMigrationSubtaskRequest. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a GetMigrationSubtaskRequest. + * @implements IGetMigrationSubtaskRequest + * @constructor + * @param {google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest=} [properties] Properties to set + */ + function GetMigrationSubtaskRequest(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]]; + } + + /** + * GetMigrationSubtaskRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest + * @instance + */ + GetMigrationSubtaskRequest.prototype.name = ""; + + /** + * GetMigrationSubtaskRequest readMask. + * @member {google.protobuf.IFieldMask|null|undefined} readMask + * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest + * @instance + */ + GetMigrationSubtaskRequest.prototype.readMask = null; + + /** + * Creates a new GetMigrationSubtaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest instance + */ + GetMigrationSubtaskRequest.create = function create(properties) { + return new GetMigrationSubtaskRequest(properties); + }; + + /** + * Encodes the specified GetMigrationSubtaskRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest} message GetMigrationSubtaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMigrationSubtaskRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) + $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetMigrationSubtaskRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest} message GetMigrationSubtaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMigrationSubtaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest + * @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.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMigrationSubtaskRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMigrationSubtaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMigrationSubtaskRequest message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMigrationSubtaskRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.readMask != null && message.hasOwnProperty("readMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.readMask); + if (error) + return "readMask." + error; + } + return null; + }; + + /** + * Creates a GetMigrationSubtaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest + */ + GetMigrationSubtaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.readMask != null) { + if (typeof object.readMask !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest.readMask: object expected"); + message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); + } + return message; + }; + + /** + * Creates a plain object from a GetMigrationSubtaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest + * @static + * @param {google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest} message GetMigrationSubtaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMigrationSubtaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.readMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.readMask != null && message.hasOwnProperty("readMask")) + object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); + return object; + }; + + /** + * Converts this GetMigrationSubtaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest + * @instance + * @returns {Object.} JSON object + */ + GetMigrationSubtaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMigrationSubtaskRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMigrationSubtaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest"; + }; + + return GetMigrationSubtaskRequest; + })(); + + v2.ListMigrationSubtasksRequest = (function() { + + /** + * Properties of a ListMigrationSubtasksRequest. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IListMigrationSubtasksRequest + * @property {string|null} [parent] ListMigrationSubtasksRequest parent + * @property {google.protobuf.IFieldMask|null} [readMask] ListMigrationSubtasksRequest readMask + * @property {number|null} [pageSize] ListMigrationSubtasksRequest pageSize + * @property {string|null} [pageToken] ListMigrationSubtasksRequest pageToken + * @property {string|null} [filter] ListMigrationSubtasksRequest filter + */ + + /** + * Constructs a new ListMigrationSubtasksRequest. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a ListMigrationSubtasksRequest. + * @implements IListMigrationSubtasksRequest + * @constructor + * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest=} [properties] Properties to set + */ + function ListMigrationSubtasksRequest(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]]; + } + + /** + * ListMigrationSubtasksRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + * @instance + */ + ListMigrationSubtasksRequest.prototype.parent = ""; + + /** + * ListMigrationSubtasksRequest readMask. + * @member {google.protobuf.IFieldMask|null|undefined} readMask + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + * @instance + */ + ListMigrationSubtasksRequest.prototype.readMask = null; + + /** + * ListMigrationSubtasksRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + * @instance + */ + ListMigrationSubtasksRequest.prototype.pageSize = 0; + + /** + * ListMigrationSubtasksRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + * @instance + */ + ListMigrationSubtasksRequest.prototype.pageToken = ""; + + /** + * ListMigrationSubtasksRequest filter. + * @member {string} filter + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + * @instance + */ + ListMigrationSubtasksRequest.prototype.filter = ""; + + /** + * Creates a new ListMigrationSubtasksRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest instance + */ + ListMigrationSubtasksRequest.create = function create(properties) { + return new ListMigrationSubtasksRequest(properties); + }; + + /** + * Encodes the specified ListMigrationSubtasksRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest} message ListMigrationSubtasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationSubtasksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) + $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListMigrationSubtasksRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + * @static + * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest} message ListMigrationSubtasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationSubtasksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + * @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.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationSubtasksRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationSubtasksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMigrationSubtasksRequest message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMigrationSubtasksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.readMask != null && message.hasOwnProperty("readMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.readMask); + if (error) + return "readMask." + error; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListMigrationSubtasksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest + */ + ListMigrationSubtasksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.readMask != null) { + if (typeof object.readMask !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest.readMask: object expected"); + message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); + } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListMigrationSubtasksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + * @static + * @param {google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest} message ListMigrationSubtasksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMigrationSubtasksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.readMask = null; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.readMask != null && message.hasOwnProperty("readMask")) + object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListMigrationSubtasksRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + * @instance + * @returns {Object.} JSON object + */ + ListMigrationSubtasksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMigrationSubtasksRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMigrationSubtasksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest"; + }; + + return ListMigrationSubtasksRequest; + })(); + + v2.ListMigrationSubtasksResponse = (function() { + + /** + * Properties of a ListMigrationSubtasksResponse. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IListMigrationSubtasksResponse + * @property {Array.|null} [migrationSubtasks] ListMigrationSubtasksResponse migrationSubtasks + * @property {string|null} [nextPageToken] ListMigrationSubtasksResponse nextPageToken + */ + + /** + * Constructs a new ListMigrationSubtasksResponse. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a ListMigrationSubtasksResponse. + * @implements IListMigrationSubtasksResponse + * @constructor + * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse=} [properties] Properties to set + */ + function ListMigrationSubtasksResponse(properties) { + this.migrationSubtasks = []; + 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]]; + } + + /** + * ListMigrationSubtasksResponse migrationSubtasks. + * @member {Array.} migrationSubtasks + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse + * @instance + */ + ListMigrationSubtasksResponse.prototype.migrationSubtasks = $util.emptyArray; + + /** + * ListMigrationSubtasksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse + * @instance + */ + ListMigrationSubtasksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMigrationSubtasksResponse instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse + * @static + * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse instance + */ + ListMigrationSubtasksResponse.create = function create(properties) { + return new ListMigrationSubtasksResponse(properties); + }; + + /** + * Encodes the specified ListMigrationSubtasksResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse + * @static + * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse} message ListMigrationSubtasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationSubtasksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.migrationSubtasks != null && message.migrationSubtasks.length) + for (var i = 0; i < message.migrationSubtasks.length; ++i) + $root.google.cloud.bigquery.migration.v2.MigrationSubtask.encode(message.migrationSubtasks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListMigrationSubtasksResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse + * @static + * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse} message ListMigrationSubtasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationSubtasksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse + * @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.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationSubtasksResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.migrationSubtasks && message.migrationSubtasks.length)) + message.migrationSubtasks = []; + message.migrationSubtasks.push($root.google.cloud.bigquery.migration.v2.MigrationSubtask.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationSubtasksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMigrationSubtasksResponse message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMigrationSubtasksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.migrationSubtasks != null && message.hasOwnProperty("migrationSubtasks")) { + if (!Array.isArray(message.migrationSubtasks)) + return "migrationSubtasks: array expected"; + for (var i = 0; i < message.migrationSubtasks.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.MigrationSubtask.verify(message.migrationSubtasks[i]); + if (error) + return "migrationSubtasks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListMigrationSubtasksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse + */ + ListMigrationSubtasksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse(); + if (object.migrationSubtasks) { + if (!Array.isArray(object.migrationSubtasks)) + throw TypeError(".google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse.migrationSubtasks: array expected"); + message.migrationSubtasks = []; + for (var i = 0; i < object.migrationSubtasks.length; ++i) { + if (typeof object.migrationSubtasks[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse.migrationSubtasks: object expected"); + message.migrationSubtasks[i] = $root.google.cloud.bigquery.migration.v2.MigrationSubtask.fromObject(object.migrationSubtasks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListMigrationSubtasksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse + * @static + * @param {google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse} message ListMigrationSubtasksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMigrationSubtasksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.migrationSubtasks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.migrationSubtasks && message.migrationSubtasks.length) { + object.migrationSubtasks = []; + for (var j = 0; j < message.migrationSubtasks.length; ++j) + object.migrationSubtasks[j] = $root.google.cloud.bigquery.migration.v2.MigrationSubtask.toObject(message.migrationSubtasks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListMigrationSubtasksResponse to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse + * @instance + * @returns {Object.} JSON object + */ + ListMigrationSubtasksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMigrationSubtasksResponse + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMigrationSubtasksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse"; + }; + + 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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationReportRecord(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + 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; + })(); + + migration.v2alpha = (function() { + + /** + * Namespace v2alpha. + * @memberof google.cloud.bigquery.migration + * @namespace + */ + var v2alpha = {}; + + v2alpha.AssessmentTaskDetails = (function() { + + /** + * Properties of an AssessmentTaskDetails. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IAssessmentTaskDetails + * @property {string|null} [inputPath] AssessmentTaskDetails inputPath + * @property {string|null} [outputDataset] AssessmentTaskDetails outputDataset + * @property {string|null} [querylogsPath] AssessmentTaskDetails querylogsPath + * @property {string|null} [dataSource] AssessmentTaskDetails dataSource + */ + + /** + * Constructs a new AssessmentTaskDetails. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents an AssessmentTaskDetails. + * @implements IAssessmentTaskDetails + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails=} [properties] Properties to set + */ + function AssessmentTaskDetails(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]]; + } + + /** + * AssessmentTaskDetails inputPath. + * @member {string} inputPath + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails + * @instance + */ + AssessmentTaskDetails.prototype.inputPath = ""; + + /** + * AssessmentTaskDetails outputDataset. + * @member {string} outputDataset + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails + * @instance + */ + AssessmentTaskDetails.prototype.outputDataset = ""; + + /** + * AssessmentTaskDetails querylogsPath. + * @member {string} querylogsPath + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails + * @instance + */ + AssessmentTaskDetails.prototype.querylogsPath = ""; + + /** + * AssessmentTaskDetails dataSource. + * @member {string} dataSource + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails + * @instance + */ + AssessmentTaskDetails.prototype.dataSource = ""; + + /** + * Creates a new AssessmentTaskDetails instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails} AssessmentTaskDetails instance + */ + AssessmentTaskDetails.create = function create(properties) { + return new AssessmentTaskDetails(properties); + }; + + /** + * Encodes the specified AssessmentTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails} message AssessmentTaskDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssessmentTaskDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputPath != null && Object.hasOwnProperty.call(message, "inputPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputPath); + if (message.outputDataset != null && Object.hasOwnProperty.call(message, "outputDataset")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.outputDataset); + if (message.querylogsPath != null && Object.hasOwnProperty.call(message, "querylogsPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.querylogsPath); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dataSource); + return writer; + }; + + /** + * Encodes the specified AssessmentTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails} message AssessmentTaskDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssessmentTaskDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AssessmentTaskDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails} AssessmentTaskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssessmentTaskDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inputPath = reader.string(); + break; + } + case 2: { + message.outputDataset = reader.string(); + break; + } + case 3: { + message.querylogsPath = reader.string(); + break; + } + case 4: { + message.dataSource = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AssessmentTaskDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails} AssessmentTaskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssessmentTaskDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AssessmentTaskDetails message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AssessmentTaskDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputPath != null && message.hasOwnProperty("inputPath")) + if (!$util.isString(message.inputPath)) + return "inputPath: string expected"; + if (message.outputDataset != null && message.hasOwnProperty("outputDataset")) + if (!$util.isString(message.outputDataset)) + return "outputDataset: string expected"; + if (message.querylogsPath != null && message.hasOwnProperty("querylogsPath")) + if (!$util.isString(message.querylogsPath)) + return "querylogsPath: string expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + return null; + }; + + /** + * Creates an AssessmentTaskDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails} AssessmentTaskDetails + */ + AssessmentTaskDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails(); + if (object.inputPath != null) + message.inputPath = String(object.inputPath); + if (object.outputDataset != null) + message.outputDataset = String(object.outputDataset); + if (object.querylogsPath != null) + message.querylogsPath = String(object.querylogsPath); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + return message; + }; + + /** + * Creates a plain object from an AssessmentTaskDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails + * @static + * @param {google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails} message AssessmentTaskDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AssessmentTaskDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.inputPath = ""; + object.outputDataset = ""; + object.querylogsPath = ""; + object.dataSource = ""; + } + if (message.inputPath != null && message.hasOwnProperty("inputPath")) + object.inputPath = message.inputPath; + if (message.outputDataset != null && message.hasOwnProperty("outputDataset")) + object.outputDataset = message.outputDataset; + if (message.querylogsPath != null && message.hasOwnProperty("querylogsPath")) + object.querylogsPath = message.querylogsPath; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + return object; + }; + + /** + * Converts this AssessmentTaskDetails to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails + * @instance + * @returns {Object.} JSON object + */ + AssessmentTaskDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AssessmentTaskDetails + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AssessmentTaskDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails"; + }; + + return AssessmentTaskDetails; + })(); + + v2alpha.AssessmentOrchestrationResultDetails = (function() { + + /** + * Properties of an AssessmentOrchestrationResultDetails. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IAssessmentOrchestrationResultDetails + * @property {string|null} [outputTablesSchemaVersion] AssessmentOrchestrationResultDetails outputTablesSchemaVersion + */ + + /** + * Constructs a new AssessmentOrchestrationResultDetails. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents an AssessmentOrchestrationResultDetails. + * @implements IAssessmentOrchestrationResultDetails + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails=} [properties] Properties to set + */ + function AssessmentOrchestrationResultDetails(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]]; + } + + /** + * AssessmentOrchestrationResultDetails outputTablesSchemaVersion. + * @member {string} outputTablesSchemaVersion + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails + * @instance + */ + AssessmentOrchestrationResultDetails.prototype.outputTablesSchemaVersion = ""; + + /** + * Creates a new AssessmentOrchestrationResultDetails instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails} AssessmentOrchestrationResultDetails instance + */ + AssessmentOrchestrationResultDetails.create = function create(properties) { + return new AssessmentOrchestrationResultDetails(properties); + }; + + /** + * Encodes the specified AssessmentOrchestrationResultDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails} message AssessmentOrchestrationResultDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssessmentOrchestrationResultDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.outputTablesSchemaVersion != null && Object.hasOwnProperty.call(message, "outputTablesSchemaVersion")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.outputTablesSchemaVersion); + return writer; + }; + + /** + * Encodes the specified AssessmentOrchestrationResultDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails} message AssessmentOrchestrationResultDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssessmentOrchestrationResultDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AssessmentOrchestrationResultDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails + * @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.v2alpha.AssessmentOrchestrationResultDetails} AssessmentOrchestrationResultDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssessmentOrchestrationResultDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.outputTablesSchemaVersion = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AssessmentOrchestrationResultDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails} AssessmentOrchestrationResultDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssessmentOrchestrationResultDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AssessmentOrchestrationResultDetails message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AssessmentOrchestrationResultDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.outputTablesSchemaVersion != null && message.hasOwnProperty("outputTablesSchemaVersion")) + if (!$util.isString(message.outputTablesSchemaVersion)) + return "outputTablesSchemaVersion: string expected"; + return null; + }; + + /** + * Creates an AssessmentOrchestrationResultDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails} AssessmentOrchestrationResultDetails + */ + AssessmentOrchestrationResultDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails(); + if (object.outputTablesSchemaVersion != null) + message.outputTablesSchemaVersion = String(object.outputTablesSchemaVersion); + return message; + }; + + /** + * Creates a plain object from an AssessmentOrchestrationResultDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails + * @static + * @param {google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails} message AssessmentOrchestrationResultDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AssessmentOrchestrationResultDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.outputTablesSchemaVersion = ""; + if (message.outputTablesSchemaVersion != null && message.hasOwnProperty("outputTablesSchemaVersion")) + object.outputTablesSchemaVersion = message.outputTablesSchemaVersion; + return object; + }; + + /** + * Converts this AssessmentOrchestrationResultDetails to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails + * @instance + * @returns {Object.} JSON object + */ + AssessmentOrchestrationResultDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AssessmentOrchestrationResultDetails + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AssessmentOrchestrationResultDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails"; + }; + + return AssessmentOrchestrationResultDetails; + })(); + + v2alpha.MigrationWorkflow = (function() { + + /** + * Properties of a MigrationWorkflow. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IMigrationWorkflow + * @property {string|null} [name] MigrationWorkflow name + * @property {string|null} [displayName] MigrationWorkflow displayName + * @property {Object.|null} [tasks] MigrationWorkflow tasks + * @property {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State|null} [state] MigrationWorkflow state + * @property {google.protobuf.ITimestamp|null} [createTime] MigrationWorkflow createTime + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationWorkflow lastUpdateTime + */ + + /** + * Constructs a new MigrationWorkflow. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a MigrationWorkflow. + * @implements IMigrationWorkflow + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow=} [properties] Properties to set + */ + function MigrationWorkflow(properties) { + this.tasks = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MigrationWorkflow name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @instance + */ + MigrationWorkflow.prototype.name = ""; + + /** + * MigrationWorkflow displayName. + * @member {string} displayName + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @instance + */ + MigrationWorkflow.prototype.displayName = ""; + + /** + * MigrationWorkflow tasks. + * @member {Object.} tasks + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @instance + */ + MigrationWorkflow.prototype.tasks = $util.emptyObject; + + /** + * MigrationWorkflow state. + * @member {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State} state + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @instance + */ + MigrationWorkflow.prototype.state = 0; + + /** + * MigrationWorkflow createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @instance + */ + MigrationWorkflow.prototype.createTime = null; + + /** + * MigrationWorkflow lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @instance + */ + MigrationWorkflow.prototype.lastUpdateTime = null; + + /** + * Creates a new MigrationWorkflow instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} MigrationWorkflow instance + */ + MigrationWorkflow.create = function create(properties) { + return new MigrationWorkflow(properties); + }; + + /** + * Encodes the specified MigrationWorkflow message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationWorkflow.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.tasks != null && Object.hasOwnProperty.call(message, "tasks")) + for (var keys = Object.keys(message.tasks), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.bigquery.migration.v2alpha.MigrationTask.encode(message.tasks[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified MigrationWorkflow message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationWorkflow.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MigrationWorkflow message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} MigrationWorkflow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationWorkflow.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 2: { + if (message.tasks === $util.emptyObject) + message.tasks = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.bigquery.migration.v2alpha.MigrationTask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.tasks[key] = value; + break; + } + case 3: { + message.state = reader.int32(); + break; + } + case 4: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MigrationWorkflow message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} MigrationWorkflow + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationWorkflow.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MigrationWorkflow message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MigrationWorkflow.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.tasks != null && message.hasOwnProperty("tasks")) { + if (!$util.isObject(message.tasks)) + return "tasks: object expected"; + var key = Object.keys(message.tasks); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2alpha.MigrationTask.verify(message.tasks[key[i]]); + if (error) + return "tasks." + error; + } + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } + return null; + }; + + /** + * Creates a MigrationWorkflow message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} MigrationWorkflow + */ + MigrationWorkflow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.tasks) { + if (typeof object.tasks !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.tasks: object expected"); + message.tasks = {}; + for (var keys = Object.keys(object.tasks), i = 0; i < keys.length; ++i) { + if (typeof object.tasks[keys[i]] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.tasks: object expected"); + message.tasks[keys[i]] = $root.google.cloud.bigquery.migration.v2alpha.MigrationTask.fromObject(object.tasks[keys[i]]); + } + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "DRAFT": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "PAUSED": + case 3: + message.state = 3; + break; + case "COMPLETED": + case 4: + message.state = 4; + break; + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } + return message; + }; + + /** + * Creates a plain object from a MigrationWorkflow message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @static + * @param {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} message MigrationWorkflow + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MigrationWorkflow.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.tasks = {}; + if (options.defaults) { + object.name = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.createTime = null; + object.lastUpdateTime = null; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + var keys2; + if (message.tasks && (keys2 = Object.keys(message.tasks)).length) { + object.tasks = {}; + for (var j = 0; j < keys2.length; ++j) + object.tasks[keys2[j]] = $root.google.cloud.bigquery.migration.v2alpha.MigrationTask.toObject(message.tasks[keys2[j]], options); + } + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State[message.state] : message.state; + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this MigrationWorkflow to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @instance + * @returns {Object.} JSON object + */ + MigrationWorkflow.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MigrationWorkflow + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MigrationWorkflow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.MigrationWorkflow"; + }; + + /** + * State enum. + * @name google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} DRAFT=1 DRAFT value + * @property {number} RUNNING=2 RUNNING value + * @property {number} PAUSED=3 PAUSED value + * @property {number} COMPLETED=4 COMPLETED value + */ + MigrationWorkflow.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DRAFT"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "PAUSED"] = 3; + values[valuesById[4] = "COMPLETED"] = 4; + return values; + })(); + + return MigrationWorkflow; + })(); + + v2alpha.MigrationTask = (function() { + + /** + * Properties of a MigrationTask. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IMigrationTask + * @property {google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails|null} [assessmentTaskDetails] MigrationTask assessmentTaskDetails + * @property {google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails|null} [translationTaskDetails] MigrationTask translationTaskDetails + * @property {string|null} [id] MigrationTask id + * @property {string|null} [type] MigrationTask type + * @property {google.protobuf.IAny|null} [details] MigrationTask details + * @property {google.cloud.bigquery.migration.v2alpha.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 {google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult|null} [orchestrationResult] MigrationTask orchestrationResult + */ + + /** + * Constructs a new MigrationTask. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a MigrationTask. + * @implements IMigrationTask + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTask=} [properties] Properties to set + */ + function MigrationTask(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]]; + } + + /** + * MigrationTask assessmentTaskDetails. + * @member {google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails|null|undefined} assessmentTaskDetails + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @instance + */ + MigrationTask.prototype.assessmentTaskDetails = null; + + /** + * MigrationTask translationTaskDetails. + * @member {google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails|null|undefined} translationTaskDetails + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @instance + */ + MigrationTask.prototype.translationTaskDetails = null; + + /** + * MigrationTask id. + * @member {string} id + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @instance + */ + MigrationTask.prototype.id = ""; + + /** + * MigrationTask type. + * @member {string} type + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @instance + */ + MigrationTask.prototype.type = ""; + + /** + * MigrationTask details. + * @member {google.protobuf.IAny|null|undefined} details + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @instance + */ + MigrationTask.prototype.details = null; + + /** + * MigrationTask state. + * @member {google.cloud.bigquery.migration.v2alpha.MigrationTask.State} state + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @instance + */ + MigrationTask.prototype.state = 0; + + /** + * MigrationTask processingError. + * @member {google.rpc.IErrorInfo|null|undefined} processingError + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @instance + */ + MigrationTask.prototype.processingError = null; + + /** + * MigrationTask createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @instance + */ + MigrationTask.prototype.createTime = null; + + /** + * MigrationTask lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @instance + */ + MigrationTask.prototype.lastUpdateTime = null; + + /** + * MigrationTask orchestrationResult. + * @member {google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult|null|undefined} orchestrationResult + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @instance + */ + MigrationTask.prototype.orchestrationResult = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MigrationTask taskDetails. + * @member {"assessmentTaskDetails"|"translationTaskDetails"|undefined} taskDetails + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @instance + */ + Object.defineProperty(MigrationTask.prototype, "taskDetails", { + get: $util.oneOfGetter($oneOfFields = ["assessmentTaskDetails", "translationTaskDetails"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MigrationTask instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTask=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.MigrationTask} MigrationTask instance + */ + MigrationTask.create = function create(properties) { + return new MigrationTask(properties); + }; + + /** + * Encodes the specified MigrationTask message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTask.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTask} message MigrationTask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationTask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.details != null && Object.hasOwnProperty.call(message, "details")) + $root.google.protobuf.Any.encode(message.details, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); + if (message.processingError != null && Object.hasOwnProperty.call(message, "processingError")) + $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.orchestrationResult != null && Object.hasOwnProperty.call(message, "orchestrationResult")) + $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.encode(message.orchestrationResult, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.assessmentTaskDetails != null && Object.hasOwnProperty.call(message, "assessmentTaskDetails")) + $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.encode(message.assessmentTaskDetails, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.translationTaskDetails != null && Object.hasOwnProperty.call(message, "translationTaskDetails")) + $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.encode(message.translationTaskDetails, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MigrationTask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTask} message MigrationTask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationTask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MigrationTask message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2alpha.MigrationTask} MigrationTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationTask.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationTask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 12: { + message.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.decode(reader, reader.uint32()); + break; + } + case 13: { + message.translationTaskDetails = $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.decode(reader, reader.uint32()); + break; + } + case 1: { + message.id = reader.string(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + case 3: { + message.details = $root.google.protobuf.Any.decode(reader, reader.uint32()); + break; + } + case 4: { + message.state = reader.int32(); + break; + } + case 5: { + message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); + break; + } + case 6: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 7: { + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 10: { + message.orchestrationResult = $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MigrationTask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.MigrationTask} MigrationTask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationTask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MigrationTask message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MigrationTask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.assessmentTaskDetails != null && message.hasOwnProperty("assessmentTaskDetails")) { + properties.taskDetails = 1; + { + var error = $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.verify(message.assessmentTaskDetails); + if (error) + return "assessmentTaskDetails." + error; + } + } + if (message.translationTaskDetails != null && message.hasOwnProperty("translationTaskDetails")) { + if (properties.taskDetails === 1) + return "taskDetails: multiple values"; + properties.taskDetails = 1; + { + var error = $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.verify(message.translationTaskDetails); + if (error) + return "translationTaskDetails." + error; + } + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.details != null && message.hasOwnProperty("details")) { + var error = $root.google.protobuf.Any.verify(message.details); + if (error) + return "details." + error; + } + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.processingError != null && message.hasOwnProperty("processingError")) { + var error = $root.google.rpc.ErrorInfo.verify(message.processingError); + if (error) + return "processingError." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } + if (message.orchestrationResult != null && message.hasOwnProperty("orchestrationResult")) { + var error = $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.verify(message.orchestrationResult); + if (error) + return "orchestrationResult." + error; + } + return null; + }; + + /** + * Creates a MigrationTask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.MigrationTask} MigrationTask + */ + MigrationTask.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.MigrationTask) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationTask(); + if (object.assessmentTaskDetails != null) { + if (typeof object.assessmentTaskDetails !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTask.assessmentTaskDetails: object expected"); + message.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.fromObject(object.assessmentTaskDetails); + } + if (object.translationTaskDetails != null) { + if (typeof object.translationTaskDetails !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTask.translationTaskDetails: object expected"); + message.translationTaskDetails = $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.fromObject(object.translationTaskDetails); + } + if (object.id != null) + message.id = String(object.id); + if (object.type != null) + message.type = String(object.type); + if (object.details != null) { + if (typeof object.details !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTask.details: object expected"); + message.details = $root.google.protobuf.Any.fromObject(object.details); + } + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "PENDING": + case 1: + message.state = 1; + break; + case "ORCHESTRATING": + case 2: + message.state = 2; + break; + case "RUNNING": + case 3: + message.state = 3; + break; + case "PAUSED": + case 4: + message.state = 4; + break; + case "SUCCEEDED": + case 5: + message.state = 5; + break; + case "FAILED": + case 6: + message.state = 6; + break; + } + if (object.processingError != null) { + if (typeof object.processingError !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTask.processingError: object expected"); + message.processingError = $root.google.rpc.ErrorInfo.fromObject(object.processingError); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTask.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTask.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } + if (object.orchestrationResult != null) { + if (typeof object.orchestrationResult !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTask.orchestrationResult: object expected"); + message.orchestrationResult = $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.fromObject(object.orchestrationResult); + } + return message; + }; + + /** + * Creates a plain object from a MigrationTask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @static + * @param {google.cloud.bigquery.migration.v2alpha.MigrationTask} message MigrationTask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MigrationTask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.id = ""; + object.type = ""; + object.details = null; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.processingError = null; + object.createTime = null; + object.lastUpdateTime = null; + object.orchestrationResult = null; + } + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.details != null && message.hasOwnProperty("details")) + object.details = $root.google.protobuf.Any.toObject(message.details, options); + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.MigrationTask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2alpha.MigrationTask.State[message.state] : message.state; + if (message.processingError != null && message.hasOwnProperty("processingError")) + object.processingError = $root.google.rpc.ErrorInfo.toObject(message.processingError, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + if (message.orchestrationResult != null && message.hasOwnProperty("orchestrationResult")) + object.orchestrationResult = $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.toObject(message.orchestrationResult, options); + if (message.assessmentTaskDetails != null && message.hasOwnProperty("assessmentTaskDetails")) { + object.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.toObject(message.assessmentTaskDetails, options); + if (options.oneofs) + object.taskDetails = "assessmentTaskDetails"; + } + if (message.translationTaskDetails != null && message.hasOwnProperty("translationTaskDetails")) { + object.translationTaskDetails = $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.toObject(message.translationTaskDetails, options); + if (options.oneofs) + object.taskDetails = "translationTaskDetails"; + } + return object; + }; + + /** + * Converts this MigrationTask to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @instance + * @returns {Object.} JSON object + */ + MigrationTask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MigrationTask + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MigrationTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.MigrationTask"; + }; + + /** + * State enum. + * @name google.cloud.bigquery.migration.v2alpha.MigrationTask.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} PENDING=1 PENDING value + * @property {number} ORCHESTRATING=2 ORCHESTRATING value + * @property {number} RUNNING=3 RUNNING value + * @property {number} PAUSED=4 PAUSED value + * @property {number} SUCCEEDED=5 SUCCEEDED value + * @property {number} FAILED=6 FAILED value + */ + MigrationTask.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "ORCHESTRATING"] = 2; + values[valuesById[3] = "RUNNING"] = 3; + values[valuesById[4] = "PAUSED"] = 4; + values[valuesById[5] = "SUCCEEDED"] = 5; + values[valuesById[6] = "FAILED"] = 6; + return values; + })(); + + return MigrationTask; + })(); + + v2alpha.MigrationSubtask = (function() { + + /** + * Properties of a MigrationSubtask. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IMigrationSubtask + * @property {string|null} [name] MigrationSubtask name + * @property {string|null} [taskId] MigrationSubtask taskId + * @property {string|null} [type] MigrationSubtask type + * @property {google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State|null} [state] MigrationSubtask state + * @property {google.rpc.IErrorInfo|null} [processingError] MigrationSubtask processingError + * @property {Array.|null} [resourceErrorDetails] MigrationSubtask resourceErrorDetails + * @property {number|null} [resourceErrorCount] MigrationSubtask resourceErrorCount + * @property {google.protobuf.ITimestamp|null} [createTime] MigrationSubtask createTime + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationSubtask lastUpdateTime + * @property {Array.|null} [metrics] MigrationSubtask metrics + */ + + /** + * Constructs a new MigrationSubtask. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a MigrationSubtask. + * @implements IMigrationSubtask + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationSubtask=} [properties] Properties to set + */ + function MigrationSubtask(properties) { + this.resourceErrorDetails = []; + this.metrics = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MigrationSubtask name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.name = ""; + + /** + * MigrationSubtask taskId. + * @member {string} taskId + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.taskId = ""; + + /** + * MigrationSubtask type. + * @member {string} type + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.type = ""; + + /** + * MigrationSubtask state. + * @member {google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State} state + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.state = 0; + + /** + * MigrationSubtask processingError. + * @member {google.rpc.IErrorInfo|null|undefined} processingError + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.processingError = null; + + /** + * MigrationSubtask resourceErrorDetails. + * @member {Array.} resourceErrorDetails + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.resourceErrorDetails = $util.emptyArray; + + /** + * MigrationSubtask resourceErrorCount. + * @member {number} resourceErrorCount + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.resourceErrorCount = 0; + + /** + * MigrationSubtask createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.createTime = null; + + /** + * MigrationSubtask lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.lastUpdateTime = null; + + /** + * MigrationSubtask metrics. + * @member {Array.} metrics + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.metrics = $util.emptyArray; + + /** + * Creates a new MigrationSubtask instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationSubtask=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.MigrationSubtask} MigrationSubtask instance + */ + MigrationSubtask.create = function create(properties) { + return new MigrationSubtask(properties); + }; + + /** + * Encodes the specified MigrationSubtask message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationSubtask.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationSubtask} message MigrationSubtask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationSubtask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.taskId != null && Object.hasOwnProperty.call(message, "taskId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.processingError != null && Object.hasOwnProperty.call(message, "processingError")) + $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.cloud.bigquery.migration.v2alpha.TimeSeries.encode(message.metrics[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.resourceErrorDetails != null && message.resourceErrorDetails.length) + for (var i = 0; i < message.resourceErrorDetails.length; ++i) + $root.google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.encode(message.resourceErrorDetails[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.resourceErrorCount != null && Object.hasOwnProperty.call(message, "resourceErrorCount")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.resourceErrorCount); + return writer; + }; + + /** + * Encodes the specified MigrationSubtask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationSubtask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationSubtask} message MigrationSubtask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationSubtask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MigrationSubtask message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2alpha.MigrationSubtask} MigrationSubtask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationSubtask.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.taskId = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + if (!(message.resourceErrorDetails && message.resourceErrorDetails.length)) + message.resourceErrorDetails = []; + message.resourceErrorDetails.push($root.google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.decode(reader, reader.uint32())); + break; + } + case 13: { + message.resourceErrorCount = reader.int32(); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.cloud.bigquery.migration.v2alpha.TimeSeries.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MigrationSubtask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.MigrationSubtask} MigrationSubtask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationSubtask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MigrationSubtask message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MigrationSubtask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.taskId != null && message.hasOwnProperty("taskId")) + if (!$util.isString(message.taskId)) + return "taskId: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.processingError != null && message.hasOwnProperty("processingError")) { + var error = $root.google.rpc.ErrorInfo.verify(message.processingError); + if (error) + return "processingError." + error; + } + if (message.resourceErrorDetails != null && message.hasOwnProperty("resourceErrorDetails")) { + if (!Array.isArray(message.resourceErrorDetails)) + return "resourceErrorDetails: array expected"; + for (var i = 0; i < message.resourceErrorDetails.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2alpha.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.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2alpha.TimeSeries.verify(message.metrics[i]); + if (error) + return "metrics." + error; + } + } + return null; + }; + + /** + * Creates a MigrationSubtask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.MigrationSubtask} MigrationSubtask + */ + MigrationSubtask.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(); + if (object.name != null) + message.name = String(object.name); + if (object.taskId != null) + message.taskId = String(object.taskId); + if (object.type != null) + message.type = String(object.type); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "SUCCEEDED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "PAUSED": + case 5: + message.state = 5; + break; + } + if (object.processingError != null) { + if (typeof object.processingError !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationSubtask.processingError: object expected"); + message.processingError = $root.google.rpc.ErrorInfo.fromObject(object.processingError); + } + if (object.resourceErrorDetails) { + if (!Array.isArray(object.resourceErrorDetails)) + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationSubtask.resourceErrorDetails: array expected"); + message.resourceErrorDetails = []; + for (var i = 0; i < object.resourceErrorDetails.length; ++i) { + if (typeof object.resourceErrorDetails[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationSubtask.resourceErrorDetails: object expected"); + message.resourceErrorDetails[i] = $root.google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.fromObject(object.resourceErrorDetails[i]); + } + } + if (object.resourceErrorCount != null) + message.resourceErrorCount = object.resourceErrorCount | 0; + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationSubtask.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationSubtask.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationSubtask.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationSubtask.metrics: object expected"); + message.metrics[i] = $root.google.cloud.bigquery.migration.v2alpha.TimeSeries.fromObject(object.metrics[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a MigrationSubtask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @static + * @param {google.cloud.bigquery.migration.v2alpha.MigrationSubtask} message MigrationSubtask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MigrationSubtask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.metrics = []; + object.resourceErrorDetails = []; + } + if (options.defaults) { + object.name = ""; + object.taskId = ""; + object.type = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.processingError = null; + object.createTime = null; + object.lastUpdateTime = null; + object.resourceErrorCount = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.taskId != null && message.hasOwnProperty("taskId")) + object.taskId = message.taskId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State[message.state] : message.state; + if (message.processingError != null && message.hasOwnProperty("processingError")) + object.processingError = $root.google.rpc.ErrorInfo.toObject(message.processingError, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.cloud.bigquery.migration.v2alpha.TimeSeries.toObject(message.metrics[j], options); + } + if (message.resourceErrorDetails && message.resourceErrorDetails.length) { + object.resourceErrorDetails = []; + for (var j = 0; j < message.resourceErrorDetails.length; ++j) + object.resourceErrorDetails[j] = $root.google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.toObject(message.resourceErrorDetails[j], options); + } + if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) + object.resourceErrorCount = message.resourceErrorCount; + return object; + }; + + /** + * Converts this MigrationSubtask to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @instance + * @returns {Object.} JSON object + */ + MigrationSubtask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MigrationSubtask + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MigrationSubtask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.MigrationSubtask"; + }; + + /** + * State enum. + * @name google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} RUNNING=2 RUNNING value + * @property {number} SUCCEEDED=3 SUCCEEDED value + * @property {number} FAILED=4 FAILED value + * @property {number} PAUSED=5 PAUSED value + */ + MigrationSubtask.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "SUCCEEDED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "PAUSED"] = 5; + return values; + })(); + + return MigrationSubtask; + })(); + + v2alpha.MigrationTaskOrchestrationResult = (function() { + + /** + * Properties of a MigrationTaskOrchestrationResult. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IMigrationTaskOrchestrationResult + * @property {google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails|null} [assessmentDetails] MigrationTaskOrchestrationResult assessmentDetails + */ + + /** + * Constructs a new MigrationTaskOrchestrationResult. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a MigrationTaskOrchestrationResult. + * @implements IMigrationTaskOrchestrationResult + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult=} [properties] Properties to set + */ + function MigrationTaskOrchestrationResult(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]]; + } + + /** + * MigrationTaskOrchestrationResult assessmentDetails. + * @member {google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails|null|undefined} assessmentDetails + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult + * @instance + */ + MigrationTaskOrchestrationResult.prototype.assessmentDetails = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MigrationTaskOrchestrationResult details. + * @member {"assessmentDetails"|undefined} details + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult + * @instance + */ + Object.defineProperty(MigrationTaskOrchestrationResult.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["assessmentDetails"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MigrationTaskOrchestrationResult instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult} MigrationTaskOrchestrationResult instance + */ + MigrationTaskOrchestrationResult.create = function create(properties) { + return new MigrationTaskOrchestrationResult(properties); + }; + + /** + * Encodes the specified MigrationTaskOrchestrationResult message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult} message MigrationTaskOrchestrationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationTaskOrchestrationResult.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.assessmentDetails != null && Object.hasOwnProperty.call(message, "assessmentDetails")) + $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.encode(message.assessmentDetails, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MigrationTaskOrchestrationResult message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult} message MigrationTaskOrchestrationResult message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MigrationTaskOrchestrationResult.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MigrationTaskOrchestrationResult message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult + * @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.v2alpha.MigrationTaskOrchestrationResult} MigrationTaskOrchestrationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationTaskOrchestrationResult.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.assessmentDetails = $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MigrationTaskOrchestrationResult message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult} MigrationTaskOrchestrationResult + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationTaskOrchestrationResult.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MigrationTaskOrchestrationResult message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MigrationTaskOrchestrationResult.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.assessmentDetails != null && message.hasOwnProperty("assessmentDetails")) { + properties.details = 1; + { + var error = $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.verify(message.assessmentDetails); + if (error) + return "assessmentDetails." + error; + } + } + return null; + }; + + /** + * Creates a MigrationTaskOrchestrationResult message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult} MigrationTaskOrchestrationResult + */ + MigrationTaskOrchestrationResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult(); + if (object.assessmentDetails != null) { + if (typeof object.assessmentDetails !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.assessmentDetails: object expected"); + message.assessmentDetails = $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.fromObject(object.assessmentDetails); + } + return message; + }; + + /** + * Creates a plain object from a MigrationTaskOrchestrationResult message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult + * @static + * @param {google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult} message MigrationTaskOrchestrationResult + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MigrationTaskOrchestrationResult.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.assessmentDetails != null && message.hasOwnProperty("assessmentDetails")) { + object.assessmentDetails = $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.toObject(message.assessmentDetails, options); + if (options.oneofs) + object.details = "assessmentDetails"; + } + return object; + }; + + /** + * Converts this MigrationTaskOrchestrationResult to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult + * @instance + * @returns {Object.} JSON object + */ + MigrationTaskOrchestrationResult.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MigrationTaskOrchestrationResult + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MigrationTaskOrchestrationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult"; + }; + + return MigrationTaskOrchestrationResult; + })(); + + v2alpha.ResourceErrorDetail = (function() { + + /** + * Properties of a ResourceErrorDetail. + * @memberof google.cloud.bigquery.migration.v2alpha + * @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 ResourceErrorDetail. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a ResourceErrorDetail. + * @implements IResourceErrorDetail + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail=} [properties] Properties to set + */ + function ResourceErrorDetail(properties) { + this.errorDetails = []; + 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]]; + } + + /** + * ResourceErrorDetail resourceInfo. + * @member {google.rpc.IResourceInfo|null|undefined} resourceInfo + * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail + * @instance + */ + ResourceErrorDetail.prototype.resourceInfo = null; + + /** + * ResourceErrorDetail errorDetails. + * @member {Array.} errorDetails + * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail + * @instance + */ + ResourceErrorDetail.prototype.errorDetails = $util.emptyArray; + + /** + * ResourceErrorDetail errorCount. + * @member {number} errorCount + * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail + * @instance + */ + ResourceErrorDetail.prototype.errorCount = 0; + + /** + * Creates a new ResourceErrorDetail instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail} ResourceErrorDetail instance + */ + ResourceErrorDetail.create = function create(properties) { + return new ResourceErrorDetail(properties); + }; + + /** + * Encodes the specified ResourceErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail} message ResourceErrorDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceErrorDetail.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.v2alpha.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 ResourceErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail} message ResourceErrorDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceErrorDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.ResourceErrorDetail} ResourceErrorDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceErrorDetail.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resourceInfo = $root.google.rpc.ResourceInfo.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.errorDetails && message.errorDetails.length)) + message.errorDetails = []; + message.errorDetails.push($root.google.cloud.bigquery.migration.v2alpha.ErrorDetail.decode(reader, reader.uint32())); + break; + } + case 3: { + message.errorCount = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceErrorDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail} ResourceErrorDetail + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceErrorDetail message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail + * @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) { + 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.v2alpha.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.v2alpha.ResourceErrorDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail} ResourceErrorDetail + */ + ResourceErrorDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail(); + if (object.resourceInfo != null) { + if (typeof object.resourceInfo !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.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.v2alpha.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.v2alpha.ResourceErrorDetail.errorDetails: object expected"); + message.errorDetails[i] = $root.google.cloud.bigquery.migration.v2alpha.ErrorDetail.fromObject(object.errorDetails[i]); + } + } + 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. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail} message ResourceErrorDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceErrorDetail.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.v2alpha.ErrorDetail.toObject(message.errorDetails[j], options); + } + if (message.errorCount != null && message.hasOwnProperty("errorCount")) + object.errorCount = message.errorCount; + return object; + }; + + /** + * Converts this ResourceErrorDetail to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail + * @instance + * @returns {Object.} JSON object + */ + ResourceErrorDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceErrorDetail + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail"; + }; + + return ResourceErrorDetail; + })(); + + v2alpha.ErrorDetail = (function() { + + /** + * Properties of an ErrorDetail. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IErrorDetail + * @property {google.cloud.bigquery.migration.v2alpha.IErrorLocation|null} [location] ErrorDetail location + * @property {google.rpc.IErrorInfo|null} [errorInfo] ErrorDetail errorInfo + */ + + /** + * Constructs a new ErrorDetail. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents an ErrorDetail. + * @implements IErrorDetail + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IErrorDetail=} [properties] Properties to set + */ + function ErrorDetail(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorDetail location. + * @member {google.cloud.bigquery.migration.v2alpha.IErrorLocation|null|undefined} location + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail + * @instance + */ + ErrorDetail.prototype.location = null; + + /** + * ErrorDetail errorInfo. + * @member {google.rpc.IErrorInfo|null|undefined} errorInfo + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail + * @instance + */ + ErrorDetail.prototype.errorInfo = null; + + /** + * Creates a new ErrorDetail instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IErrorDetail=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.ErrorDetail} ErrorDetail instance + */ + ErrorDetail.create = function create(properties) { + return new ErrorDetail(properties); + }; + + /** + * Encodes the specified ErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IErrorDetail} message ErrorDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorDetail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.google.cloud.bigquery.migration.v2alpha.ErrorLocation.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errorInfo != null && Object.hasOwnProperty.call(message, "errorInfo")) + $root.google.rpc.ErrorInfo.encode(message.errorInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IErrorDetail} message ErrorDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.ErrorDetail} ErrorDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorDetail.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.ErrorDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.location = $root.google.cloud.bigquery.migration.v2alpha.ErrorLocation.decode(reader, reader.uint32()); + break; + } + case 2: { + message.errorInfo = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.ErrorDetail} ErrorDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorDetail message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorDetail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.google.cloud.bigquery.migration.v2alpha.ErrorLocation.verify(message.location); + if (error) + return "location." + error; + } + if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) { + var error = $root.google.rpc.ErrorInfo.verify(message.errorInfo); + if (error) + return "errorInfo." + error; + } + return null; + }; + + /** + * Creates an ErrorDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.ErrorDetail} ErrorDetail + */ + ErrorDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.ErrorDetail) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.ErrorDetail(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.ErrorDetail.location: object expected"); + message.location = $root.google.cloud.bigquery.migration.v2alpha.ErrorLocation.fromObject(object.location); + } + if (object.errorInfo != null) { + if (typeof object.errorInfo !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.ErrorDetail.errorInfo: object expected"); + message.errorInfo = $root.google.rpc.ErrorInfo.fromObject(object.errorInfo); + } + return message; + }; + + /** + * Creates a plain object from an ErrorDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ErrorDetail} message ErrorDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = null; + object.errorInfo = null; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.google.cloud.bigquery.migration.v2alpha.ErrorLocation.toObject(message.location, options); + if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) + object.errorInfo = $root.google.rpc.ErrorInfo.toObject(message.errorInfo, options); + return object; + }; + + /** + * Converts this ErrorDetail to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail + * @instance + * @returns {Object.} JSON object + */ + ErrorDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorDetail + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.ErrorDetail"; + }; + + return ErrorDetail; + })(); + + v2alpha.ErrorLocation = (function() { + + /** + * Properties of an ErrorLocation. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IErrorLocation + * @property {number|null} [line] ErrorLocation line + * @property {number|null} [column] ErrorLocation column + */ + + /** + * Constructs a new ErrorLocation. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents an ErrorLocation. + * @implements IErrorLocation + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IErrorLocation=} [properties] Properties to set + */ + function ErrorLocation(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]]; + } + + /** + * ErrorLocation line. + * @member {number} line + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation + * @instance + */ + ErrorLocation.prototype.line = 0; + + /** + * ErrorLocation column. + * @member {number} column + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation + * @instance + */ + ErrorLocation.prototype.column = 0; + + /** + * Creates a new ErrorLocation instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IErrorLocation=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.ErrorLocation} ErrorLocation instance + */ + ErrorLocation.create = function create(properties) { + return new ErrorLocation(properties); + }; + + /** + * Encodes the specified ErrorLocation message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorLocation.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IErrorLocation} message ErrorLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorLocation.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); + return writer; + }; + + /** + * Encodes the specified ErrorLocation message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorLocation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IErrorLocation} message ErrorLocation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorLocation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorLocation message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.ErrorLocation} ErrorLocation + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.ErrorLocation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.line = reader.int32(); + break; + } + case 2: { + message.column = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorLocation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.ErrorLocation} ErrorLocation + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorLocation message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation + * @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) { + 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.v2alpha.ErrorLocation + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.ErrorLocation} ErrorLocation + */ + ErrorLocation.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.ErrorLocation) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.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 an ErrorLocation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ErrorLocation} message ErrorLocation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorLocation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.line = 0; + object.column = 0; + } + 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 ErrorLocation to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation + * @instance + * @returns {Object.} JSON object + */ + ErrorLocation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorLocation + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.ErrorLocation"; + }; + + return ErrorLocation; + })(); + + v2alpha.TimeSeries = (function() { + + /** + * Properties of a TimeSeries. + * @memberof google.cloud.bigquery.migration.v2alpha + * @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 TimeSeries. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a TimeSeries. + * @implements ITimeSeries + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.ITimeSeries=} [properties] Properties to set + */ + function TimeSeries(properties) { + this.points = []; + 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]]; + } + + /** + * TimeSeries metric. + * @member {string} metric + * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries + * @instance + */ + TimeSeries.prototype.metric = ""; + + /** + * TimeSeries valueType. + * @member {google.api.MetricDescriptor.ValueType} valueType + * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries + * @instance + */ + TimeSeries.prototype.valueType = 0; + + /** + * TimeSeries metricKind. + * @member {google.api.MetricDescriptor.MetricKind} metricKind + * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries + * @instance + */ + TimeSeries.prototype.metricKind = 0; + + /** + * TimeSeries points. + * @member {Array.} points + * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries + * @instance + */ + TimeSeries.prototype.points = $util.emptyArray; + + /** + * Creates a new TimeSeries instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITimeSeries=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.TimeSeries} TimeSeries instance + */ + TimeSeries.create = function create(properties) { + return new TimeSeries(properties); + }; + + /** + * Encodes the specified TimeSeries message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeSeries.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITimeSeries} message TimeSeries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeries.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.v2alpha.Point.encode(message.points[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeSeries.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITimeSeries} message TimeSeries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeSeries.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeSeries message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.TimeSeries} TimeSeries + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TimeSeries(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.metric = reader.string(); + 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.v2alpha.Point.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeSeries message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.TimeSeries} TimeSeries + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeSeries message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries + * @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) { + 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.v2alpha.Point.verify(message.points[i]); + if (error) + return "points." + error; + } + } + return null; + }; + + /** + * Creates a TimeSeries message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.TimeSeries} TimeSeries + */ + TimeSeries.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TimeSeries) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.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; + } + if (object.points) { + if (!Array.isArray(object.points)) + throw TypeError(".google.cloud.bigquery.migration.v2alpha.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.v2alpha.TimeSeries.points: object expected"); + message.points[i] = $root.google.cloud.bigquery.migration.v2alpha.Point.fromObject(object.points[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries + * @static + * @param {google.cloud.bigquery.migration.v2alpha.TimeSeries} message TimeSeries + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeSeries.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.v2alpha.Point.toObject(message.points[j], options); + } + return object; + }; + + /** + * Converts this TimeSeries to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries + * @instance + * @returns {Object.} JSON object + */ + TimeSeries.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeSeries + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeSeries.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.TimeSeries"; + }; + + return TimeSeries; + })(); + + v2alpha.Point = (function() { + + /** + * Properties of a Point. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IPoint + * @property {google.cloud.bigquery.migration.v2alpha.ITimeInterval|null} [interval] Point interval + * @property {google.cloud.bigquery.migration.v2alpha.ITypedValue|null} [value] Point value + */ + + /** + * Constructs a new Point. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a Point. + * @implements IPoint + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IPoint=} [properties] Properties to set + */ + function Point(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]]; + } + + /** + * Point interval. + * @member {google.cloud.bigquery.migration.v2alpha.ITimeInterval|null|undefined} interval + * @memberof google.cloud.bigquery.migration.v2alpha.Point + * @instance + */ + Point.prototype.interval = null; + + /** + * Point value. + * @member {google.cloud.bigquery.migration.v2alpha.ITypedValue|null|undefined} value + * @memberof google.cloud.bigquery.migration.v2alpha.Point + * @instance + */ + Point.prototype.value = null; + + /** + * Creates a new Point instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.Point + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IPoint=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.Point} Point instance + */ + Point.create = function create(properties) { + return new Point(properties); + }; + + /** + * Encodes the specified Point message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Point.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.Point + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IPoint} message Point message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Point.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) + $root.google.cloud.bigquery.migration.v2alpha.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.v2alpha.TypedValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Point message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Point.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.Point + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IPoint} message Point message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Point.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Point message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.Point} Point + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.Point(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.interval = $root.google.cloud.bigquery.migration.v2alpha.TimeInterval.decode(reader, reader.uint32()); + break; + } + case 2: { + message.value = $root.google.cloud.bigquery.migration.v2alpha.TypedValue.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Point message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.Point + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.Point} Point + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Point message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.Point + * @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) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.interval != null && message.hasOwnProperty("interval")) { + var error = $root.google.cloud.bigquery.migration.v2alpha.TimeInterval.verify(message.interval); + if (error) + return "interval." + error; + } + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.cloud.bigquery.migration.v2alpha.TypedValue.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a Point message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.Point + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.Point} Point + */ + Point.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.Point) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.Point(); + if (object.interval != null) { + if (typeof object.interval !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.Point.interval: object expected"); + message.interval = $root.google.cloud.bigquery.migration.v2alpha.TimeInterval.fromObject(object.interval); + } + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.Point.value: object expected"); + message.value = $root.google.cloud.bigquery.migration.v2alpha.TypedValue.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a Point message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.Point + * @static + * @param {google.cloud.bigquery.migration.v2alpha.Point} message Point + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Point.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.interval = null; + object.value = null; + } + if (message.interval != null && message.hasOwnProperty("interval")) + object.interval = $root.google.cloud.bigquery.migration.v2alpha.TimeInterval.toObject(message.interval, options); + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.cloud.bigquery.migration.v2alpha.TypedValue.toObject(message.value, options); + return object; + }; + + /** + * Converts this Point to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.Point + * @instance + * @returns {Object.} JSON object + */ + Point.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Point + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.Point + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Point.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.Point"; + }; + + return Point; + })(); + + v2alpha.TimeInterval = (function() { + + /** + * Properties of a TimeInterval. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface ITimeInterval + * @property {google.protobuf.ITimestamp|null} [startTime] TimeInterval startTime + * @property {google.protobuf.ITimestamp|null} [endTime] TimeInterval endTime + */ + + /** + * Constructs a new TimeInterval. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a TimeInterval. + * @implements ITimeInterval + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.ITimeInterval=} [properties] Properties to set + */ + function TimeInterval(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]]; + } + + /** + * TimeInterval startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval + * @instance + */ + TimeInterval.prototype.startTime = null; + + /** + * TimeInterval endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval + * @instance + */ + TimeInterval.prototype.endTime = null; + + /** + * Creates a new TimeInterval instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITimeInterval=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.TimeInterval} TimeInterval instance + */ + TimeInterval.create = function create(properties) { + return new TimeInterval(properties); + }; + + /** + * Encodes the specified TimeInterval message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeInterval.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITimeInterval} message TimeInterval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + 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; + }; + + /** + * Encodes the specified TimeInterval message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeInterval.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITimeInterval} message TimeInterval message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TimeInterval.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TimeInterval message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.TimeInterval} TimeInterval + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TimeInterval(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TimeInterval message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.TimeInterval} TimeInterval + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TimeInterval message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval + * @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) { + 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; + } + return null; + }; + + /** + * Creates a TimeInterval message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.TimeInterval} TimeInterval + */ + TimeInterval.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TimeInterval) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.TimeInterval(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.TimeInterval.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.TimeInterval.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + return message; + }; + + /** + * Creates a plain object from a TimeInterval message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval + * @static + * @param {google.cloud.bigquery.migration.v2alpha.TimeInterval} message TimeInterval + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TimeInterval.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.startTime = null; + object.endTime = null; + } + 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. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval + * @instance + * @returns {Object.} JSON object + */ + TimeInterval.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TimeInterval + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TimeInterval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.TimeInterval"; + }; + + return TimeInterval; + })(); + + v2alpha.TypedValue = (function() { + + /** + * Properties of a TypedValue. + * @memberof google.cloud.bigquery.migration.v2alpha + * @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 TypedValue. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a TypedValue. + * @implements ITypedValue + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.ITypedValue=} [properties] Properties to set + */ + function TypedValue(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]]; + } + + /** + * TypedValue boolValue. + * @member {boolean|null|undefined} boolValue + * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue + * @instance + */ + TypedValue.prototype.boolValue = null; + + /** + * TypedValue int64Value. + * @member {number|Long|null|undefined} int64Value + * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue + * @instance + */ + TypedValue.prototype.int64Value = null; + + /** + * TypedValue doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue + * @instance + */ + TypedValue.prototype.doubleValue = null; + + /** + * TypedValue stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue + * @instance + */ + TypedValue.prototype.stringValue = null; + + /** + * TypedValue distributionValue. + * @member {google.api.IDistribution|null|undefined} distributionValue + * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue + * @instance + */ + TypedValue.prototype.distributionValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TypedValue value. + * @member {"boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"|undefined} value + * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue + * @instance + */ + Object.defineProperty(TypedValue.prototype, "value", { + get: $util.oneOfGetter($oneOfFields = ["boolValue", "int64Value", "doubleValue", "stringValue", "distributionValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TypedValue instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITypedValue=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.TypedValue} TypedValue instance + */ + TypedValue.create = function create(properties) { + return new TypedValue(properties); + }; + + /** + * Encodes the specified TypedValue message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TypedValue.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITypedValue} message TypedValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypedValue.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(); + return writer; + }; + + /** + * Encodes the specified TypedValue message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TypedValue.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITypedValue} message TypedValue message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TypedValue.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TypedValue message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.TypedValue} TypedValue + * @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, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TypedValue(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.boolValue = reader.bool(); + 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()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TypedValue message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.TypedValue} TypedValue + * @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) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TypedValue message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue + * @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) { + 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.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; + } + } + 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.v2alpha.TypedValue + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.TypedValue} TypedValue + */ + TypedValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TypedValue) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.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.v2alpha.TypedValue.distributionValue: object expected"); + message.distributionValue = $root.google.api.Distribution.fromObject(object.distributionValue); + } + 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.v2alpha.TypedValue + * @static + * @param {google.cloud.bigquery.migration.v2alpha.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.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"; + } + return object; + }; + + /** + * Converts this TypedValue to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.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.v2alpha.TypedValue"; + }; + + return TypedValue; + })(); + + v2alpha.TranslationFileMapping = (function() { + + /** + * Properties of a TranslationFileMapping. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface ITranslationFileMapping + * @property {string|null} [inputPath] TranslationFileMapping inputPath + * @property {string|null} [outputPath] TranslationFileMapping outputPath + */ + + /** + * Constructs a new TranslationFileMapping. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a TranslationFileMapping. + * @implements ITranslationFileMapping + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping=} [properties] Properties to set + */ + function TranslationFileMapping(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]]; + } + + /** + * TranslationFileMapping inputPath. + * @member {string} inputPath + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping + * @instance + */ + TranslationFileMapping.prototype.inputPath = ""; + + /** + * TranslationFileMapping outputPath. + * @member {string} outputPath + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping + * @instance + */ + TranslationFileMapping.prototype.outputPath = ""; + + /** + * Creates a new TranslationFileMapping instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.TranslationFileMapping} TranslationFileMapping instance + */ + TranslationFileMapping.create = function create(properties) { + return new TranslationFileMapping(properties); + }; + + /** + * Encodes the specified TranslationFileMapping message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping} message TranslationFileMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslationFileMapping.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputPath != null && Object.hasOwnProperty.call(message, "inputPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputPath); + if (message.outputPath != null && Object.hasOwnProperty.call(message, "outputPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.outputPath); + return writer; + }; + + /** + * Encodes the specified TranslationFileMapping message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping} message TranslationFileMapping message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslationFileMapping.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TranslationFileMapping message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping + * @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.v2alpha.TranslationFileMapping} TranslationFileMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationFileMapping.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.inputPath = reader.string(); + break; + } + case 2: { + message.outputPath = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TranslationFileMapping message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.TranslationFileMapping} TranslationFileMapping + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationFileMapping.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TranslationFileMapping message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TranslationFileMapping.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputPath != null && message.hasOwnProperty("inputPath")) + if (!$util.isString(message.inputPath)) + return "inputPath: string expected"; + if (message.outputPath != null && message.hasOwnProperty("outputPath")) + if (!$util.isString(message.outputPath)) + return "outputPath: string expected"; + return null; + }; + + /** + * Creates a TranslationFileMapping message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.TranslationFileMapping} TranslationFileMapping + */ + TranslationFileMapping.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping(); + if (object.inputPath != null) + message.inputPath = String(object.inputPath); + if (object.outputPath != null) + message.outputPath = String(object.outputPath); + return message; + }; + + /** + * Creates a plain object from a TranslationFileMapping message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping + * @static + * @param {google.cloud.bigquery.migration.v2alpha.TranslationFileMapping} message TranslationFileMapping + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TranslationFileMapping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.inputPath = ""; + object.outputPath = ""; + } + if (message.inputPath != null && message.hasOwnProperty("inputPath")) + object.inputPath = message.inputPath; + if (message.outputPath != null && message.hasOwnProperty("outputPath")) + object.outputPath = message.outputPath; + return object; + }; + + /** + * Converts this TranslationFileMapping to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping + * @instance + * @returns {Object.} JSON object + */ + TranslationFileMapping.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TranslationFileMapping + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TranslationFileMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.TranslationFileMapping"; + }; + + return TranslationFileMapping; + })(); + + v2alpha.TranslationTaskDetails = (function() { + + /** + * Properties of a TranslationTaskDetails. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface ITranslationTaskDetails + * @property {google.cloud.bigquery.migration.v2alpha.ITeradataOptions|null} [teradataOptions] TranslationTaskDetails teradataOptions + * @property {google.cloud.bigquery.migration.v2alpha.IBteqOptions|null} [bteqOptions] TranslationTaskDetails bteqOptions + * @property {string|null} [inputPath] TranslationTaskDetails inputPath + * @property {string|null} [outputPath] TranslationTaskDetails outputPath + * @property {Array.|null} [filePaths] TranslationTaskDetails filePaths + * @property {string|null} [schemaPath] TranslationTaskDetails schemaPath + * @property {google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding|null} [fileEncoding] TranslationTaskDetails fileEncoding + * @property {google.cloud.bigquery.migration.v2alpha.IIdentifierSettings|null} [identifierSettings] TranslationTaskDetails identifierSettings + * @property {Object.|null} [specialTokenMap] TranslationTaskDetails specialTokenMap + * @property {google.cloud.bigquery.migration.v2alpha.IFilter|null} [filter] TranslationTaskDetails filter + * @property {string|null} [translationExceptionTable] TranslationTaskDetails translationExceptionTable + */ + + /** + * Constructs a new TranslationTaskDetails. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a TranslationTaskDetails. + * @implements ITranslationTaskDetails + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails=} [properties] Properties to set + */ + function TranslationTaskDetails(properties) { + this.filePaths = []; + this.specialTokenMap = {}; + 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]]; + } + + /** + * TranslationTaskDetails teradataOptions. + * @member {google.cloud.bigquery.migration.v2alpha.ITeradataOptions|null|undefined} teradataOptions + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @instance + */ + TranslationTaskDetails.prototype.teradataOptions = null; + + /** + * TranslationTaskDetails bteqOptions. + * @member {google.cloud.bigquery.migration.v2alpha.IBteqOptions|null|undefined} bteqOptions + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @instance + */ + TranslationTaskDetails.prototype.bteqOptions = null; + + /** + * TranslationTaskDetails inputPath. + * @member {string} inputPath + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @instance + */ + TranslationTaskDetails.prototype.inputPath = ""; + + /** + * TranslationTaskDetails outputPath. + * @member {string} outputPath + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @instance + */ + TranslationTaskDetails.prototype.outputPath = ""; + + /** + * TranslationTaskDetails filePaths. + * @member {Array.} filePaths + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @instance + */ + TranslationTaskDetails.prototype.filePaths = $util.emptyArray; + + /** + * TranslationTaskDetails schemaPath. + * @member {string} schemaPath + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @instance + */ + TranslationTaskDetails.prototype.schemaPath = ""; + + /** + * TranslationTaskDetails fileEncoding. + * @member {google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding} fileEncoding + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @instance + */ + TranslationTaskDetails.prototype.fileEncoding = 0; + + /** + * TranslationTaskDetails identifierSettings. + * @member {google.cloud.bigquery.migration.v2alpha.IIdentifierSettings|null|undefined} identifierSettings + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @instance + */ + TranslationTaskDetails.prototype.identifierSettings = null; + + /** + * TranslationTaskDetails specialTokenMap. + * @member {Object.} specialTokenMap + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @instance + */ + TranslationTaskDetails.prototype.specialTokenMap = $util.emptyObject; + + /** + * TranslationTaskDetails filter. + * @member {google.cloud.bigquery.migration.v2alpha.IFilter|null|undefined} filter + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @instance + */ + TranslationTaskDetails.prototype.filter = null; + + /** + * TranslationTaskDetails translationExceptionTable. + * @member {string} translationExceptionTable + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @instance + */ + TranslationTaskDetails.prototype.translationExceptionTable = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * TranslationTaskDetails languageOptions. + * @member {"teradataOptions"|"bteqOptions"|undefined} languageOptions + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @instance + */ + Object.defineProperty(TranslationTaskDetails.prototype, "languageOptions", { + get: $util.oneOfGetter($oneOfFields = ["teradataOptions", "bteqOptions"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new TranslationTaskDetails instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails} TranslationTaskDetails instance + */ + TranslationTaskDetails.create = function create(properties) { + return new TranslationTaskDetails(properties); + }; + + /** + * Encodes the specified TranslationTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails} message TranslationTaskDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslationTaskDetails.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputPath != null && Object.hasOwnProperty.call(message, "inputPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputPath); + if (message.outputPath != null && Object.hasOwnProperty.call(message, "outputPath")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.outputPath); + if (message.schemaPath != null && Object.hasOwnProperty.call(message, "schemaPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.schemaPath); + if (message.fileEncoding != null && Object.hasOwnProperty.call(message, "fileEncoding")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.fileEncoding); + if (message.identifierSettings != null && Object.hasOwnProperty.call(message, "identifierSettings")) + $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.encode(message.identifierSettings, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.specialTokenMap != null && Object.hasOwnProperty.call(message, "specialTokenMap")) + for (var keys = Object.keys(message.specialTokenMap), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.specialTokenMap[keys[i]]).ldelim(); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + $root.google.cloud.bigquery.migration.v2alpha.Filter.encode(message.filter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.teradataOptions != null && Object.hasOwnProperty.call(message, "teradataOptions")) + $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions.encode(message.teradataOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.bteqOptions != null && Object.hasOwnProperty.call(message, "bteqOptions")) + $root.google.cloud.bigquery.migration.v2alpha.BteqOptions.encode(message.bteqOptions, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.filePaths != null && message.filePaths.length) + for (var i = 0; i < message.filePaths.length; ++i) + $root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.encode(message.filePaths[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.translationExceptionTable != null && Object.hasOwnProperty.call(message, "translationExceptionTable")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.translationExceptionTable); + return writer; + }; + + /** + * Encodes the specified TranslationTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails} message TranslationTaskDetails message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslationTaskDetails.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TranslationTaskDetails message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @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.v2alpha.TranslationTaskDetails} TranslationTaskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationTaskDetails.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 10: { + message.teradataOptions = $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions.decode(reader, reader.uint32()); + break; + } + case 11: { + message.bteqOptions = $root.google.cloud.bigquery.migration.v2alpha.BteqOptions.decode(reader, reader.uint32()); + break; + } + case 1: { + message.inputPath = reader.string(); + break; + } + case 2: { + message.outputPath = reader.string(); + break; + } + case 12: { + if (!(message.filePaths && message.filePaths.length)) + message.filePaths = []; + message.filePaths.push($root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.decode(reader, reader.uint32())); + break; + } + case 3: { + message.schemaPath = reader.string(); + break; + } + case 4: { + message.fileEncoding = reader.int32(); + break; + } + case 5: { + message.identifierSettings = $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.decode(reader, reader.uint32()); + break; + } + case 6: { + if (message.specialTokenMap === $util.emptyObject) + message.specialTokenMap = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int32(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.specialTokenMap[key] = value; + break; + } + case 7: { + message.filter = $root.google.cloud.bigquery.migration.v2alpha.Filter.decode(reader, reader.uint32()); + break; + } + case 13: { + message.translationExceptionTable = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TranslationTaskDetails message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails} TranslationTaskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslationTaskDetails.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TranslationTaskDetails message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TranslationTaskDetails.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.teradataOptions != null && message.hasOwnProperty("teradataOptions")) { + properties.languageOptions = 1; + { + var error = $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions.verify(message.teradataOptions); + if (error) + return "teradataOptions." + error; + } + } + if (message.bteqOptions != null && message.hasOwnProperty("bteqOptions")) { + if (properties.languageOptions === 1) + return "languageOptions: multiple values"; + properties.languageOptions = 1; + { + var error = $root.google.cloud.bigquery.migration.v2alpha.BteqOptions.verify(message.bteqOptions); + if (error) + return "bteqOptions." + error; + } + } + if (message.inputPath != null && message.hasOwnProperty("inputPath")) + if (!$util.isString(message.inputPath)) + return "inputPath: string expected"; + if (message.outputPath != null && message.hasOwnProperty("outputPath")) + if (!$util.isString(message.outputPath)) + return "outputPath: string expected"; + if (message.filePaths != null && message.hasOwnProperty("filePaths")) { + if (!Array.isArray(message.filePaths)) + return "filePaths: array expected"; + for (var i = 0; i < message.filePaths.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.verify(message.filePaths[i]); + if (error) + return "filePaths." + error; + } + } + if (message.schemaPath != null && message.hasOwnProperty("schemaPath")) + if (!$util.isString(message.schemaPath)) + return "schemaPath: string expected"; + if (message.fileEncoding != null && message.hasOwnProperty("fileEncoding")) + switch (message.fileEncoding) { + default: + return "fileEncoding: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.identifierSettings != null && message.hasOwnProperty("identifierSettings")) { + var error = $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.verify(message.identifierSettings); + if (error) + return "identifierSettings." + error; + } + if (message.specialTokenMap != null && message.hasOwnProperty("specialTokenMap")) { + if (!$util.isObject(message.specialTokenMap)) + return "specialTokenMap: object expected"; + var key = Object.keys(message.specialTokenMap); + for (var i = 0; i < key.length; ++i) + switch (message.specialTokenMap[key[i]]) { + default: + return "specialTokenMap: enum value{k:string} expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + } + if (message.filter != null && message.hasOwnProperty("filter")) { + var error = $root.google.cloud.bigquery.migration.v2alpha.Filter.verify(message.filter); + if (error) + return "filter." + error; + } + if (message.translationExceptionTable != null && message.hasOwnProperty("translationExceptionTable")) + if (!$util.isString(message.translationExceptionTable)) + return "translationExceptionTable: string expected"; + return null; + }; + + /** + * Creates a TranslationTaskDetails message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails} TranslationTaskDetails + */ + TranslationTaskDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails(); + if (object.teradataOptions != null) { + if (typeof object.teradataOptions !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.teradataOptions: object expected"); + message.teradataOptions = $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions.fromObject(object.teradataOptions); + } + if (object.bteqOptions != null) { + if (typeof object.bteqOptions !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.bteqOptions: object expected"); + message.bteqOptions = $root.google.cloud.bigquery.migration.v2alpha.BteqOptions.fromObject(object.bteqOptions); + } + if (object.inputPath != null) + message.inputPath = String(object.inputPath); + if (object.outputPath != null) + message.outputPath = String(object.outputPath); + if (object.filePaths) { + if (!Array.isArray(object.filePaths)) + throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.filePaths: array expected"); + message.filePaths = []; + for (var i = 0; i < object.filePaths.length; ++i) { + if (typeof object.filePaths[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.filePaths: object expected"); + message.filePaths[i] = $root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.fromObject(object.filePaths[i]); + } + } + if (object.schemaPath != null) + message.schemaPath = String(object.schemaPath); + switch (object.fileEncoding) { + default: + if (typeof object.fileEncoding === "number") { + message.fileEncoding = object.fileEncoding; + break; + } + break; + case "FILE_ENCODING_UNSPECIFIED": + case 0: + message.fileEncoding = 0; + break; + case "UTF_8": + case 1: + message.fileEncoding = 1; + break; + case "ISO_8859_1": + case 2: + message.fileEncoding = 2; + break; + case "US_ASCII": + case 3: + message.fileEncoding = 3; + break; + case "UTF_16": + case 4: + message.fileEncoding = 4; + break; + case "UTF_16LE": + case 5: + message.fileEncoding = 5; + break; + case "UTF_16BE": + case 6: + message.fileEncoding = 6; + break; + } + if (object.identifierSettings != null) { + if (typeof object.identifierSettings !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.identifierSettings: object expected"); + message.identifierSettings = $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.fromObject(object.identifierSettings); + } + if (object.specialTokenMap) { + if (typeof object.specialTokenMap !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.specialTokenMap: object expected"); + message.specialTokenMap = {}; + for (var keys = Object.keys(object.specialTokenMap), i = 0; i < keys.length; ++i) + switch (object.specialTokenMap[keys[i]]) { + default: + if (typeof object.specialTokenMap[keys[i]] === "number") { + message.specialTokenMap[keys[i]] = object.specialTokenMap[keys[i]]; + break; + } + break; + case "TOKEN_TYPE_UNSPECIFIED": + case 0: + message.specialTokenMap[keys[i]] = 0; + break; + case "STRING": + case 1: + message.specialTokenMap[keys[i]] = 1; + break; + case "INT64": + case 2: + message.specialTokenMap[keys[i]] = 2; + break; + case "NUMERIC": + case 3: + message.specialTokenMap[keys[i]] = 3; + break; + case "BOOL": + case 4: + message.specialTokenMap[keys[i]] = 4; + break; + case "FLOAT64": + case 5: + message.specialTokenMap[keys[i]] = 5; + break; + case "DATE": + case 6: + message.specialTokenMap[keys[i]] = 6; + break; + case "TIMESTAMP": + case 7: + message.specialTokenMap[keys[i]] = 7; + break; + } + } + if (object.filter != null) { + if (typeof object.filter !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.filter: object expected"); + message.filter = $root.google.cloud.bigquery.migration.v2alpha.Filter.fromObject(object.filter); + } + if (object.translationExceptionTable != null) + message.translationExceptionTable = String(object.translationExceptionTable); + return message; + }; + + /** + * Creates a plain object from a TranslationTaskDetails message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @static + * @param {google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails} message TranslationTaskDetails + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TranslationTaskDetails.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.filePaths = []; + if (options.objects || options.defaults) + object.specialTokenMap = {}; + if (options.defaults) { + object.inputPath = ""; + object.outputPath = ""; + object.schemaPath = ""; + object.fileEncoding = options.enums === String ? "FILE_ENCODING_UNSPECIFIED" : 0; + object.identifierSettings = null; + object.filter = null; + object.translationExceptionTable = ""; + } + if (message.inputPath != null && message.hasOwnProperty("inputPath")) + object.inputPath = message.inputPath; + if (message.outputPath != null && message.hasOwnProperty("outputPath")) + object.outputPath = message.outputPath; + if (message.schemaPath != null && message.hasOwnProperty("schemaPath")) + object.schemaPath = message.schemaPath; + if (message.fileEncoding != null && message.hasOwnProperty("fileEncoding")) + object.fileEncoding = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding[message.fileEncoding] === undefined ? message.fileEncoding : $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding[message.fileEncoding] : message.fileEncoding; + if (message.identifierSettings != null && message.hasOwnProperty("identifierSettings")) + object.identifierSettings = $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.toObject(message.identifierSettings, options); + var keys2; + if (message.specialTokenMap && (keys2 = Object.keys(message.specialTokenMap)).length) { + object.specialTokenMap = {}; + for (var j = 0; j < keys2.length; ++j) + object.specialTokenMap[keys2[j]] = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.TokenType[message.specialTokenMap[keys2[j]]] === undefined ? message.specialTokenMap[keys2[j]] : $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.TokenType[message.specialTokenMap[keys2[j]]] : message.specialTokenMap[keys2[j]]; + } + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = $root.google.cloud.bigquery.migration.v2alpha.Filter.toObject(message.filter, options); + if (message.teradataOptions != null && message.hasOwnProperty("teradataOptions")) { + object.teradataOptions = $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions.toObject(message.teradataOptions, options); + if (options.oneofs) + object.languageOptions = "teradataOptions"; + } + if (message.bteqOptions != null && message.hasOwnProperty("bteqOptions")) { + object.bteqOptions = $root.google.cloud.bigquery.migration.v2alpha.BteqOptions.toObject(message.bteqOptions, options); + if (options.oneofs) + object.languageOptions = "bteqOptions"; + } + if (message.filePaths && message.filePaths.length) { + object.filePaths = []; + for (var j = 0; j < message.filePaths.length; ++j) + object.filePaths[j] = $root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.toObject(message.filePaths[j], options); + } + if (message.translationExceptionTable != null && message.hasOwnProperty("translationExceptionTable")) + object.translationExceptionTable = message.translationExceptionTable; + return object; + }; + + /** + * Converts this TranslationTaskDetails to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @instance + * @returns {Object.} JSON object + */ + TranslationTaskDetails.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TranslationTaskDetails + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TranslationTaskDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails"; + }; + + /** + * FileEncoding enum. + * @name google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding + * @enum {number} + * @property {number} FILE_ENCODING_UNSPECIFIED=0 FILE_ENCODING_UNSPECIFIED value + * @property {number} UTF_8=1 UTF_8 value + * @property {number} ISO_8859_1=2 ISO_8859_1 value + * @property {number} US_ASCII=3 US_ASCII value + * @property {number} UTF_16=4 UTF_16 value + * @property {number} UTF_16LE=5 UTF_16LE value + * @property {number} UTF_16BE=6 UTF_16BE value + */ + TranslationTaskDetails.FileEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FILE_ENCODING_UNSPECIFIED"] = 0; + values[valuesById[1] = "UTF_8"] = 1; + values[valuesById[2] = "ISO_8859_1"] = 2; + values[valuesById[3] = "US_ASCII"] = 3; + values[valuesById[4] = "UTF_16"] = 4; + values[valuesById[5] = "UTF_16LE"] = 5; + values[valuesById[6] = "UTF_16BE"] = 6; + return values; + })(); + + /** + * TokenType enum. + * @name google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.TokenType + * @enum {number} + * @property {number} TOKEN_TYPE_UNSPECIFIED=0 TOKEN_TYPE_UNSPECIFIED value + * @property {number} STRING=1 STRING value + * @property {number} INT64=2 INT64 value + * @property {number} NUMERIC=3 NUMERIC value + * @property {number} BOOL=4 BOOL value + * @property {number} FLOAT64=5 FLOAT64 value + * @property {number} DATE=6 DATE value + * @property {number} TIMESTAMP=7 TIMESTAMP value + */ + TranslationTaskDetails.TokenType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TOKEN_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "STRING"] = 1; + values[valuesById[2] = "INT64"] = 2; + values[valuesById[3] = "NUMERIC"] = 3; + values[valuesById[4] = "BOOL"] = 4; + values[valuesById[5] = "FLOAT64"] = 5; + values[valuesById[6] = "DATE"] = 6; + values[valuesById[7] = "TIMESTAMP"] = 7; + return values; + })(); + + return TranslationTaskDetails; + })(); + + v2alpha.Filter = (function() { + + /** + * Properties of a Filter. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IFilter + * @property {Array.|null} [inputFileExclusionPrefixes] Filter inputFileExclusionPrefixes + */ + + /** + * Constructs a new Filter. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a Filter. + * @implements IFilter + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IFilter=} [properties] Properties to set + */ + function Filter(properties) { + this.inputFileExclusionPrefixes = []; + 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]]; + } + + /** + * Filter inputFileExclusionPrefixes. + * @member {Array.} inputFileExclusionPrefixes + * @memberof google.cloud.bigquery.migration.v2alpha.Filter + * @instance + */ + Filter.prototype.inputFileExclusionPrefixes = $util.emptyArray; + + /** + * Creates a new Filter instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.Filter + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IFilter=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.Filter} Filter instance + */ + Filter.create = function create(properties) { + return new Filter(properties); + }; + + /** + * Encodes the specified Filter message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Filter.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.Filter + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inputFileExclusionPrefixes != null && message.inputFileExclusionPrefixes.length) + for (var i = 0; i < message.inputFileExclusionPrefixes.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputFileExclusionPrefixes[i]); + return writer; + }; + + /** + * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Filter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.Filter + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IFilter} message Filter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Filter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Filter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.Filter + * @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.v2alpha.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.Filter(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.inputFileExclusionPrefixes && message.inputFileExclusionPrefixes.length)) + message.inputFileExclusionPrefixes = []; + message.inputFileExclusionPrefixes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Filter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.Filter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.Filter} Filter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Filter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Filter message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.Filter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Filter.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inputFileExclusionPrefixes != null && message.hasOwnProperty("inputFileExclusionPrefixes")) { + if (!Array.isArray(message.inputFileExclusionPrefixes)) + return "inputFileExclusionPrefixes: array expected"; + for (var i = 0; i < message.inputFileExclusionPrefixes.length; ++i) + if (!$util.isString(message.inputFileExclusionPrefixes[i])) + return "inputFileExclusionPrefixes: string[] expected"; + } + return null; + }; + + /** + * Creates a Filter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.Filter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.Filter} Filter + */ + Filter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.Filter) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.Filter(); + if (object.inputFileExclusionPrefixes) { + if (!Array.isArray(object.inputFileExclusionPrefixes)) + throw TypeError(".google.cloud.bigquery.migration.v2alpha.Filter.inputFileExclusionPrefixes: array expected"); + message.inputFileExclusionPrefixes = []; + for (var i = 0; i < object.inputFileExclusionPrefixes.length; ++i) + message.inputFileExclusionPrefixes[i] = String(object.inputFileExclusionPrefixes[i]); + } + return message; + }; + + /** + * Creates a plain object from a Filter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.Filter + * @static + * @param {google.cloud.bigquery.migration.v2alpha.Filter} message Filter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Filter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.inputFileExclusionPrefixes = []; + if (message.inputFileExclusionPrefixes && message.inputFileExclusionPrefixes.length) { + object.inputFileExclusionPrefixes = []; + for (var j = 0; j < message.inputFileExclusionPrefixes.length; ++j) + object.inputFileExclusionPrefixes[j] = message.inputFileExclusionPrefixes[j]; + } + return object; + }; + + /** + * Converts this Filter to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.Filter + * @instance + * @returns {Object.} JSON object + */ + Filter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Filter + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.Filter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.Filter"; + }; + + return Filter; + })(); + + v2alpha.IdentifierSettings = (function() { + + /** + * Properties of an IdentifierSettings. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IIdentifierSettings + * @property {google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase|null} [outputIdentifierCase] IdentifierSettings outputIdentifierCase + * @property {google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode|null} [identifierRewriteMode] IdentifierSettings identifierRewriteMode + */ + + /** + * Constructs a new IdentifierSettings. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents an IdentifierSettings. + * @implements IIdentifierSettings + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IIdentifierSettings=} [properties] Properties to set + */ + function IdentifierSettings(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]]; + } + + /** + * IdentifierSettings outputIdentifierCase. + * @member {google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase} outputIdentifierCase + * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings + * @instance + */ + IdentifierSettings.prototype.outputIdentifierCase = 0; + + /** + * IdentifierSettings identifierRewriteMode. + * @member {google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode} identifierRewriteMode + * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings + * @instance + */ + IdentifierSettings.prototype.identifierRewriteMode = 0; + + /** + * Creates a new IdentifierSettings instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IIdentifierSettings=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.IdentifierSettings} IdentifierSettings instance + */ + IdentifierSettings.create = function create(properties) { + return new IdentifierSettings(properties); + }; + + /** + * Encodes the specified IdentifierSettings message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.IdentifierSettings.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IIdentifierSettings} message IdentifierSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifierSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.outputIdentifierCase != null && Object.hasOwnProperty.call(message, "outputIdentifierCase")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.outputIdentifierCase); + if (message.identifierRewriteMode != null && Object.hasOwnProperty.call(message, "identifierRewriteMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.identifierRewriteMode); + return writer; + }; + + /** + * Encodes the specified IdentifierSettings message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.IdentifierSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IIdentifierSettings} message IdentifierSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IdentifierSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an IdentifierSettings message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings + * @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.v2alpha.IdentifierSettings} IdentifierSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifierSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.outputIdentifierCase = reader.int32(); + break; + } + case 2: { + message.identifierRewriteMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an IdentifierSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.IdentifierSettings} IdentifierSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IdentifierSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an IdentifierSettings message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IdentifierSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.outputIdentifierCase != null && message.hasOwnProperty("outputIdentifierCase")) + switch (message.outputIdentifierCase) { + default: + return "outputIdentifierCase: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.identifierRewriteMode != null && message.hasOwnProperty("identifierRewriteMode")) + switch (message.identifierRewriteMode) { + default: + return "identifierRewriteMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an IdentifierSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.IdentifierSettings} IdentifierSettings + */ + IdentifierSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings(); + switch (object.outputIdentifierCase) { + default: + if (typeof object.outputIdentifierCase === "number") { + message.outputIdentifierCase = object.outputIdentifierCase; + break; + } + break; + case "IDENTIFIER_CASE_UNSPECIFIED": + case 0: + message.outputIdentifierCase = 0; + break; + case "ORIGINAL": + case 1: + message.outputIdentifierCase = 1; + break; + case "UPPER": + case 2: + message.outputIdentifierCase = 2; + break; + case "LOWER": + case 3: + message.outputIdentifierCase = 3; + break; + } + switch (object.identifierRewriteMode) { + default: + if (typeof object.identifierRewriteMode === "number") { + message.identifierRewriteMode = object.identifierRewriteMode; + break; + } + break; + case "IDENTIFIER_REWRITE_MODE_UNSPECIFIED": + case 0: + message.identifierRewriteMode = 0; + break; + case "NONE": + case 1: + message.identifierRewriteMode = 1; + break; + case "REWRITE_ALL": + case 2: + message.identifierRewriteMode = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an IdentifierSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IdentifierSettings} message IdentifierSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IdentifierSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.outputIdentifierCase = options.enums === String ? "IDENTIFIER_CASE_UNSPECIFIED" : 0; + object.identifierRewriteMode = options.enums === String ? "IDENTIFIER_REWRITE_MODE_UNSPECIFIED" : 0; + } + if (message.outputIdentifierCase != null && message.hasOwnProperty("outputIdentifierCase")) + object.outputIdentifierCase = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase[message.outputIdentifierCase] === undefined ? message.outputIdentifierCase : $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase[message.outputIdentifierCase] : message.outputIdentifierCase; + if (message.identifierRewriteMode != null && message.hasOwnProperty("identifierRewriteMode")) + object.identifierRewriteMode = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode[message.identifierRewriteMode] === undefined ? message.identifierRewriteMode : $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode[message.identifierRewriteMode] : message.identifierRewriteMode; + return object; + }; + + /** + * Converts this IdentifierSettings to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings + * @instance + * @returns {Object.} JSON object + */ + IdentifierSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for IdentifierSettings + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IdentifierSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.IdentifierSettings"; + }; + + /** + * IdentifierCase enum. + * @name google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase + * @enum {number} + * @property {number} IDENTIFIER_CASE_UNSPECIFIED=0 IDENTIFIER_CASE_UNSPECIFIED value + * @property {number} ORIGINAL=1 ORIGINAL value + * @property {number} UPPER=2 UPPER value + * @property {number} LOWER=3 LOWER value + */ + IdentifierSettings.IdentifierCase = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDENTIFIER_CASE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINAL"] = 1; + values[valuesById[2] = "UPPER"] = 2; + values[valuesById[3] = "LOWER"] = 3; + return values; + })(); + + /** + * IdentifierRewriteMode enum. + * @name google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode + * @enum {number} + * @property {number} IDENTIFIER_REWRITE_MODE_UNSPECIFIED=0 IDENTIFIER_REWRITE_MODE_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} REWRITE_ALL=2 REWRITE_ALL value + */ + IdentifierSettings.IdentifierRewriteMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDENTIFIER_REWRITE_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "REWRITE_ALL"] = 2; + return values; + })(); + + return IdentifierSettings; + })(); + + v2alpha.TeradataOptions = (function() { + + /** + * Properties of a TeradataOptions. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface ITeradataOptions + */ + + /** + * Constructs a new TeradataOptions. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a TeradataOptions. + * @implements ITeradataOptions + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.ITeradataOptions=} [properties] Properties to set + */ + function TeradataOptions(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 TeradataOptions instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITeradataOptions=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.TeradataOptions} TeradataOptions instance + */ + TeradataOptions.create = function create(properties) { + return new TeradataOptions(properties); + }; + + /** + * Encodes the specified TeradataOptions message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TeradataOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITeradataOptions} message TeradataOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TeradataOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified TeradataOptions message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TeradataOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITeradataOptions} message TeradataOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TeradataOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TeradataOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions + * @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.v2alpha.TeradataOptions} TeradataOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TeradataOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TeradataOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.TeradataOptions} TeradataOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TeradataOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TeradataOptions message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TeradataOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a TeradataOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.TeradataOptions} TeradataOptions + */ + TeradataOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions) + return object; + return new $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions(); + }; + + /** + * Creates a plain object from a TeradataOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions + * @static + * @param {google.cloud.bigquery.migration.v2alpha.TeradataOptions} message TeradataOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TeradataOptions.toObject = function toObject() { + return {}; + }; + + /** + * Converts this TeradataOptions to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions + * @instance + * @returns {Object.} JSON object + */ + TeradataOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TeradataOptions + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TeradataOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.TeradataOptions"; + }; + + return TeradataOptions; + })(); + + v2alpha.BteqOptions = (function() { + + /** + * Properties of a BteqOptions. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IBteqOptions + * @property {google.cloud.bigquery.migration.v2alpha.IDatasetReference|null} [projectDataset] BteqOptions projectDataset + * @property {string|null} [defaultPathUri] BteqOptions defaultPathUri + * @property {Object.|null} [fileReplacementMap] BteqOptions fileReplacementMap + */ + + /** + * Constructs a new BteqOptions. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a BteqOptions. + * @implements IBteqOptions + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IBteqOptions=} [properties] Properties to set + */ + function BteqOptions(properties) { + this.fileReplacementMap = {}; + 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]]; + } + + /** + * BteqOptions projectDataset. + * @member {google.cloud.bigquery.migration.v2alpha.IDatasetReference|null|undefined} projectDataset + * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions + * @instance + */ + BteqOptions.prototype.projectDataset = null; + + /** + * BteqOptions defaultPathUri. + * @member {string} defaultPathUri + * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions + * @instance + */ + BteqOptions.prototype.defaultPathUri = ""; + + /** + * BteqOptions fileReplacementMap. + * @member {Object.} fileReplacementMap + * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions + * @instance + */ + BteqOptions.prototype.fileReplacementMap = $util.emptyObject; + + /** + * Creates a new BteqOptions instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IBteqOptions=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.BteqOptions} BteqOptions instance + */ + BteqOptions.create = function create(properties) { + return new BteqOptions(properties); + }; + + /** + * Encodes the specified BteqOptions message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.BteqOptions.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IBteqOptions} message BteqOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BteqOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.projectDataset != null && Object.hasOwnProperty.call(message, "projectDataset")) + $root.google.cloud.bigquery.migration.v2alpha.DatasetReference.encode(message.projectDataset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.defaultPathUri != null && Object.hasOwnProperty.call(message, "defaultPathUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultPathUri); + if (message.fileReplacementMap != null && Object.hasOwnProperty.call(message, "fileReplacementMap")) + for (var keys = Object.keys(message.fileReplacementMap), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.fileReplacementMap[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified BteqOptions message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.BteqOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IBteqOptions} message BteqOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BteqOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BteqOptions message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions + * @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.v2alpha.BteqOptions} BteqOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BteqOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.BteqOptions(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.projectDataset = $root.google.cloud.bigquery.migration.v2alpha.DatasetReference.decode(reader, reader.uint32()); + break; + } + case 2: { + message.defaultPathUri = reader.string(); + break; + } + case 3: { + if (message.fileReplacementMap === $util.emptyObject) + message.fileReplacementMap = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.fileReplacementMap[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BteqOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.BteqOptions} BteqOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BteqOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BteqOptions message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BteqOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.projectDataset != null && message.hasOwnProperty("projectDataset")) { + var error = $root.google.cloud.bigquery.migration.v2alpha.DatasetReference.verify(message.projectDataset); + if (error) + return "projectDataset." + error; + } + if (message.defaultPathUri != null && message.hasOwnProperty("defaultPathUri")) + if (!$util.isString(message.defaultPathUri)) + return "defaultPathUri: string expected"; + if (message.fileReplacementMap != null && message.hasOwnProperty("fileReplacementMap")) { + if (!$util.isObject(message.fileReplacementMap)) + return "fileReplacementMap: object expected"; + var key = Object.keys(message.fileReplacementMap); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.fileReplacementMap[key[i]])) + return "fileReplacementMap: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a BteqOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.BteqOptions} BteqOptions + */ + BteqOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.BteqOptions) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.BteqOptions(); + if (object.projectDataset != null) { + if (typeof object.projectDataset !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.BteqOptions.projectDataset: object expected"); + message.projectDataset = $root.google.cloud.bigquery.migration.v2alpha.DatasetReference.fromObject(object.projectDataset); + } + if (object.defaultPathUri != null) + message.defaultPathUri = String(object.defaultPathUri); + if (object.fileReplacementMap) { + if (typeof object.fileReplacementMap !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.BteqOptions.fileReplacementMap: object expected"); + message.fileReplacementMap = {}; + for (var keys = Object.keys(object.fileReplacementMap), i = 0; i < keys.length; ++i) + message.fileReplacementMap[keys[i]] = String(object.fileReplacementMap[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a BteqOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions + * @static + * @param {google.cloud.bigquery.migration.v2alpha.BteqOptions} message BteqOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BteqOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.fileReplacementMap = {}; + if (options.defaults) { + object.projectDataset = null; + object.defaultPathUri = ""; + } + if (message.projectDataset != null && message.hasOwnProperty("projectDataset")) + object.projectDataset = $root.google.cloud.bigquery.migration.v2alpha.DatasetReference.toObject(message.projectDataset, options); + if (message.defaultPathUri != null && message.hasOwnProperty("defaultPathUri")) + object.defaultPathUri = message.defaultPathUri; + var keys2; + if (message.fileReplacementMap && (keys2 = Object.keys(message.fileReplacementMap)).length) { + object.fileReplacementMap = {}; + for (var j = 0; j < keys2.length; ++j) + object.fileReplacementMap[keys2[j]] = message.fileReplacementMap[keys2[j]]; + } + return object; + }; + + /** + * Converts this BteqOptions to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions + * @instance + * @returns {Object.} JSON object + */ + BteqOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BteqOptions + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BteqOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.BteqOptions"; + }; + + return BteqOptions; + })(); + + v2alpha.DatasetReference = (function() { + + /** + * Properties of a DatasetReference. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IDatasetReference + * @property {string|null} [datasetId] DatasetReference datasetId + * @property {string|null} [projectId] DatasetReference projectId + */ + + /** + * Constructs a new DatasetReference. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a DatasetReference. + * @implements IDatasetReference + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IDatasetReference=} [properties] Properties to set + */ + function DatasetReference(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]]; + } + + /** + * DatasetReference datasetId. + * @member {string} datasetId + * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference + * @instance + */ + DatasetReference.prototype.datasetId = ""; + + /** + * DatasetReference projectId. + * @member {string} projectId + * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference + * @instance + */ + DatasetReference.prototype.projectId = ""; + + /** + * Creates a new DatasetReference instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IDatasetReference=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.DatasetReference} DatasetReference instance + */ + DatasetReference.create = function create(properties) { + return new DatasetReference(properties); + }; + + /** + * Encodes the specified DatasetReference message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DatasetReference.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IDatasetReference} message DatasetReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatasetReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.datasetId); + if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); + return writer; + }; + + /** + * Encodes the specified DatasetReference message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DatasetReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IDatasetReference} message DatasetReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DatasetReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DatasetReference message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference + * @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.v2alpha.DatasetReference} DatasetReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatasetReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.DatasetReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.datasetId = reader.string(); + break; + } + case 2: { + message.projectId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DatasetReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.DatasetReference} DatasetReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DatasetReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DatasetReference message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DatasetReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + if (!$util.isString(message.datasetId)) + return "datasetId: string expected"; + if (message.projectId != null && message.hasOwnProperty("projectId")) + if (!$util.isString(message.projectId)) + return "projectId: string expected"; + return null; + }; + + /** + * Creates a DatasetReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.DatasetReference} DatasetReference + */ + DatasetReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.DatasetReference) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.DatasetReference(); + if (object.datasetId != null) + message.datasetId = String(object.datasetId); + if (object.projectId != null) + message.projectId = String(object.projectId); + return message; + }; + + /** + * Creates a plain object from a DatasetReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference + * @static + * @param {google.cloud.bigquery.migration.v2alpha.DatasetReference} message DatasetReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DatasetReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.datasetId = ""; + object.projectId = ""; + } + if (message.datasetId != null && message.hasOwnProperty("datasetId")) + object.datasetId = message.datasetId; + if (message.projectId != null && message.hasOwnProperty("projectId")) + object.projectId = message.projectId; + return object; + }; + + /** + * Converts this DatasetReference to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference + * @instance + * @returns {Object.} JSON object + */ + DatasetReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DatasetReference + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DatasetReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.DatasetReference"; + }; + + return DatasetReference; + })(); + + v2alpha.MigrationService = (function() { + + /** + * Constructs a new MigrationService service. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a MigrationService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function MigrationService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MigrationService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MigrationService; + + /** + * Creates new MigrationService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {MigrationService} RPC service. Useful where requests and/or responses are streamed. + */ + MigrationService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|createMigrationWorkflow}. + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @typedef CreateMigrationWorkflowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} [response] MigrationWorkflow + */ + + /** + * Calls CreateMigrationWorkflow. + * @function createMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest} request CreateMigrationWorkflowRequest message or plain object + * @param {google.cloud.bigquery.migration.v2alpha.MigrationService.CreateMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and MigrationWorkflow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MigrationService.prototype.createMigrationWorkflow = function createMigrationWorkflow(request, callback) { + return this.rpcCall(createMigrationWorkflow, $root.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest, $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow, request, callback); + }, "name", { value: "CreateMigrationWorkflow" }); + + /** + * Calls CreateMigrationWorkflow. + * @function createMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest} request CreateMigrationWorkflowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|getMigrationWorkflow}. + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @typedef GetMigrationWorkflowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} [response] MigrationWorkflow + */ + + /** + * Calls GetMigrationWorkflow. + * @function getMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest} request GetMigrationWorkflowRequest message or plain object + * @param {google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and MigrationWorkflow + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MigrationService.prototype.getMigrationWorkflow = function getMigrationWorkflow(request, callback) { + return this.rpcCall(getMigrationWorkflow, $root.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest, $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow, request, callback); + }, "name", { value: "GetMigrationWorkflow" }); + + /** + * Calls GetMigrationWorkflow. + * @function getMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest} request GetMigrationWorkflowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|listMigrationWorkflows}. + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @typedef ListMigrationWorkflowsCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse} [response] ListMigrationWorkflowsResponse + */ + + /** + * Calls ListMigrationWorkflows. + * @function listMigrationWorkflows + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest} request ListMigrationWorkflowsRequest message or plain object + * @param {google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationWorkflowsCallback} callback Node-style callback called with the error, if any, and ListMigrationWorkflowsResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MigrationService.prototype.listMigrationWorkflows = function listMigrationWorkflows(request, callback) { + return this.rpcCall(listMigrationWorkflows, $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest, $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse, request, callback); + }, "name", { value: "ListMigrationWorkflows" }); + + /** + * Calls ListMigrationWorkflows. + * @function listMigrationWorkflows + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest} request ListMigrationWorkflowsRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|deleteMigrationWorkflow}. + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @typedef DeleteMigrationWorkflowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteMigrationWorkflow. + * @function deleteMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest} request DeleteMigrationWorkflowRequest message or plain object + * @param {google.cloud.bigquery.migration.v2alpha.MigrationService.DeleteMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MigrationService.prototype.deleteMigrationWorkflow = function deleteMigrationWorkflow(request, callback) { + return this.rpcCall(deleteMigrationWorkflow, $root.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteMigrationWorkflow" }); + + /** + * Calls DeleteMigrationWorkflow. + * @function deleteMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest} request DeleteMigrationWorkflowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|startMigrationWorkflow}. + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @typedef StartMigrationWorkflowCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls StartMigrationWorkflow. + * @function startMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest} request StartMigrationWorkflowRequest message or plain object + * @param {google.cloud.bigquery.migration.v2alpha.MigrationService.StartMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MigrationService.prototype.startMigrationWorkflow = function startMigrationWorkflow(request, callback) { + return this.rpcCall(startMigrationWorkflow, $root.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "StartMigrationWorkflow" }); + + /** + * Calls StartMigrationWorkflow. + * @function startMigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest} request StartMigrationWorkflowRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|getMigrationSubtask}. + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @typedef GetMigrationSubtaskCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.migration.v2alpha.MigrationSubtask} [response] MigrationSubtask + */ + + /** + * Calls GetMigrationSubtask. + * @function getMigrationSubtask + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest} request GetMigrationSubtaskRequest message or plain object + * @param {google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationSubtaskCallback} callback Node-style callback called with the error, if any, and MigrationSubtask + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MigrationService.prototype.getMigrationSubtask = function getMigrationSubtask(request, callback) { + return this.rpcCall(getMigrationSubtask, $root.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest, $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask, request, callback); + }, "name", { value: "GetMigrationSubtask" }); + + /** + * Calls GetMigrationSubtask. + * @function getMigrationSubtask + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest} request GetMigrationSubtaskRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|listMigrationSubtasks}. + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @typedef ListMigrationSubtasksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse} [response] ListMigrationSubtasksResponse + */ + + /** + * Calls ListMigrationSubtasks. + * @function listMigrationSubtasks + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest} request ListMigrationSubtasksRequest message or plain object + * @param {google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationSubtasksCallback} callback Node-style callback called with the error, if any, and ListMigrationSubtasksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MigrationService.prototype.listMigrationSubtasks = function listMigrationSubtasks(request, callback) { + return this.rpcCall(listMigrationSubtasks, $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest, $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse, request, callback); + }, "name", { value: "ListMigrationSubtasks" }); + + /** + * Calls ListMigrationSubtasks. + * @function listMigrationSubtasks + * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest} request ListMigrationSubtasksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MigrationService; + })(); + + v2alpha.CreateMigrationWorkflowRequest = (function() { + + /** + * Properties of a CreateMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface ICreateMigrationWorkflowRequest + * @property {string|null} [parent] CreateMigrationWorkflowRequest parent + * @property {google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow|null} [migrationWorkflow] CreateMigrationWorkflowRequest migrationWorkflow + */ + + /** + * Constructs a new CreateMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a CreateMigrationWorkflowRequest. + * @implements ICreateMigrationWorkflowRequest + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest=} [properties] Properties to set + */ + function CreateMigrationWorkflowRequest(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]]; + } + + /** + * CreateMigrationWorkflowRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest + * @instance + */ + CreateMigrationWorkflowRequest.prototype.parent = ""; + + /** + * CreateMigrationWorkflowRequest migrationWorkflow. + * @member {google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow|null|undefined} migrationWorkflow + * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest + * @instance + */ + CreateMigrationWorkflowRequest.prototype.migrationWorkflow = null; + + /** + * Creates a new CreateMigrationWorkflowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest instance + */ + CreateMigrationWorkflowRequest.create = function create(properties) { + return new CreateMigrationWorkflowRequest(properties); + }; + + /** + * Encodes the specified CreateMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest} message CreateMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMigrationWorkflowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.migrationWorkflow != null && Object.hasOwnProperty.call(message, "migrationWorkflow")) + $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.encode(message.migrationWorkflow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest} message CreateMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest + * @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.v2alpha.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMigrationWorkflowRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.migrationWorkflow = $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateMigrationWorkflowRequest message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateMigrationWorkflowRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.migrationWorkflow != null && message.hasOwnProperty("migrationWorkflow")) { + var error = $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.verify(message.migrationWorkflow); + if (error) + return "migrationWorkflow." + error; + } + return null; + }; + + /** + * Creates a CreateMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest + */ + CreateMigrationWorkflowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.migrationWorkflow != null) { + if (typeof object.migrationWorkflow !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest.migrationWorkflow: object expected"); + message.migrationWorkflow = $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.fromObject(object.migrationWorkflow); + } + return message; + }; + + /** + * Creates a plain object from a CreateMigrationWorkflowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest} message CreateMigrationWorkflowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateMigrationWorkflowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.migrationWorkflow = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.migrationWorkflow != null && message.hasOwnProperty("migrationWorkflow")) + object.migrationWorkflow = $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.toObject(message.migrationWorkflow, options); + return object; + }; + + /** + * Converts this CreateMigrationWorkflowRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest + * @instance + * @returns {Object.} JSON object + */ + CreateMigrationWorkflowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateMigrationWorkflowRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest"; + }; + + return CreateMigrationWorkflowRequest; + })(); + + v2alpha.GetMigrationWorkflowRequest = (function() { + + /** + * Properties of a GetMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IGetMigrationWorkflowRequest + * @property {string|null} [name] GetMigrationWorkflowRequest name + * @property {google.protobuf.IFieldMask|null} [readMask] GetMigrationWorkflowRequest readMask + */ + + /** + * Constructs a new GetMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a GetMigrationWorkflowRequest. + * @implements IGetMigrationWorkflowRequest + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest=} [properties] Properties to set + */ + function GetMigrationWorkflowRequest(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]]; + } + + /** + * GetMigrationWorkflowRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest + * @instance + */ + GetMigrationWorkflowRequest.prototype.name = ""; + + /** + * GetMigrationWorkflowRequest readMask. + * @member {google.protobuf.IFieldMask|null|undefined} readMask + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest + * @instance + */ + GetMigrationWorkflowRequest.prototype.readMask = null; + + /** + * Creates a new GetMigrationWorkflowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest instance + */ + GetMigrationWorkflowRequest.create = function create(properties) { + return new GetMigrationWorkflowRequest(properties); + }; + + /** + * Encodes the specified GetMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest} message GetMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMigrationWorkflowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) + $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest} message GetMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest + * @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.v2alpha.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMigrationWorkflowRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMigrationWorkflowRequest message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMigrationWorkflowRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.readMask != null && message.hasOwnProperty("readMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.readMask); + if (error) + return "readMask." + error; + } + return null; + }; + + /** + * Creates a GetMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest + */ + GetMigrationWorkflowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.readMask != null) { + if (typeof object.readMask !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest.readMask: object expected"); + message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); + } + return message; + }; + + /** + * Creates a plain object from a GetMigrationWorkflowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest} message GetMigrationWorkflowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMigrationWorkflowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.readMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.readMask != null && message.hasOwnProperty("readMask")) + object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); + return object; + }; + + /** + * Converts this GetMigrationWorkflowRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest + * @instance + * @returns {Object.} JSON object + */ + GetMigrationWorkflowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMigrationWorkflowRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest"; + }; + + return GetMigrationWorkflowRequest; + })(); + + v2alpha.ListMigrationWorkflowsRequest = (function() { + + /** + * Properties of a ListMigrationWorkflowsRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IListMigrationWorkflowsRequest + * @property {string|null} [parent] ListMigrationWorkflowsRequest parent + * @property {google.protobuf.IFieldMask|null} [readMask] ListMigrationWorkflowsRequest readMask + * @property {number|null} [pageSize] ListMigrationWorkflowsRequest pageSize + * @property {string|null} [pageToken] ListMigrationWorkflowsRequest pageToken + */ + + /** + * Constructs a new ListMigrationWorkflowsRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a ListMigrationWorkflowsRequest. + * @implements IListMigrationWorkflowsRequest + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest=} [properties] Properties to set + */ + function ListMigrationWorkflowsRequest(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]]; + } + + /** + * ListMigrationWorkflowsRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest + * @instance + */ + ListMigrationWorkflowsRequest.prototype.parent = ""; + + /** + * ListMigrationWorkflowsRequest readMask. + * @member {google.protobuf.IFieldMask|null|undefined} readMask + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest + * @instance + */ + ListMigrationWorkflowsRequest.prototype.readMask = null; + + /** + * ListMigrationWorkflowsRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest + * @instance + */ + ListMigrationWorkflowsRequest.prototype.pageSize = 0; + + /** + * ListMigrationWorkflowsRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest + * @instance + */ + ListMigrationWorkflowsRequest.prototype.pageToken = ""; + + /** + * Creates a new ListMigrationWorkflowsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest instance + */ + ListMigrationWorkflowsRequest.create = function create(properties) { + return new ListMigrationWorkflowsRequest(properties); + }; + + /** + * Encodes the specified ListMigrationWorkflowsRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest} message ListMigrationWorkflowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationWorkflowsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) + $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + return writer; + }; + + /** + * Encodes the specified ListMigrationWorkflowsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest} message ListMigrationWorkflowsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationWorkflowsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest + * @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.v2alpha.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationWorkflowsRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationWorkflowsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMigrationWorkflowsRequest message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMigrationWorkflowsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.readMask != null && message.hasOwnProperty("readMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.readMask); + if (error) + return "readMask." + error; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + return null; + }; + + /** + * Creates a ListMigrationWorkflowsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest + */ + ListMigrationWorkflowsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.readMask != null) { + if (typeof object.readMask !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest.readMask: object expected"); + message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); + } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + return message; + }; + + /** + * Creates a plain object from a ListMigrationWorkflowsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest} message ListMigrationWorkflowsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMigrationWorkflowsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.readMask = null; + object.pageSize = 0; + object.pageToken = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.readMask != null && message.hasOwnProperty("readMask")) + object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + return object; + }; + + /** + * Converts this ListMigrationWorkflowsRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest + * @instance + * @returns {Object.} JSON object + */ + ListMigrationWorkflowsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMigrationWorkflowsRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMigrationWorkflowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest"; + }; + + return ListMigrationWorkflowsRequest; + })(); + + v2alpha.ListMigrationWorkflowsResponse = (function() { + + /** + * Properties of a ListMigrationWorkflowsResponse. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IListMigrationWorkflowsResponse + * @property {Array.|null} [migrationWorkflows] ListMigrationWorkflowsResponse migrationWorkflows + * @property {string|null} [nextPageToken] ListMigrationWorkflowsResponse nextPageToken + */ + + /** + * Constructs a new ListMigrationWorkflowsResponse. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a ListMigrationWorkflowsResponse. + * @implements IListMigrationWorkflowsResponse + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse=} [properties] Properties to set + */ + function ListMigrationWorkflowsResponse(properties) { + this.migrationWorkflows = []; + 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]]; + } + + /** + * ListMigrationWorkflowsResponse migrationWorkflows. + * @member {Array.} migrationWorkflows + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse + * @instance + */ + ListMigrationWorkflowsResponse.prototype.migrationWorkflows = $util.emptyArray; + + /** + * ListMigrationWorkflowsResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse + * @instance + */ + ListMigrationWorkflowsResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMigrationWorkflowsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse instance + */ + ListMigrationWorkflowsResponse.create = function create(properties) { + return new ListMigrationWorkflowsResponse(properties); + }; + + /** + * Encodes the specified ListMigrationWorkflowsResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse} message ListMigrationWorkflowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationWorkflowsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.migrationWorkflows != null && message.migrationWorkflows.length) + for (var i = 0; i < message.migrationWorkflows.length; ++i) + $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.encode(message.migrationWorkflows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListMigrationWorkflowsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse} message ListMigrationWorkflowsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationWorkflowsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse + * @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.v2alpha.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationWorkflowsResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.migrationWorkflows && message.migrationWorkflows.length)) + message.migrationWorkflows = []; + message.migrationWorkflows.push($root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationWorkflowsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMigrationWorkflowsResponse message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMigrationWorkflowsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.migrationWorkflows != null && message.hasOwnProperty("migrationWorkflows")) { + if (!Array.isArray(message.migrationWorkflows)) + return "migrationWorkflows: array expected"; + for (var i = 0; i < message.migrationWorkflows.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.verify(message.migrationWorkflows[i]); + if (error) + return "migrationWorkflows." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListMigrationWorkflowsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse + */ + ListMigrationWorkflowsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse(); + if (object.migrationWorkflows) { + if (!Array.isArray(object.migrationWorkflows)) + throw TypeError(".google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse.migrationWorkflows: array expected"); + message.migrationWorkflows = []; + for (var i = 0; i < object.migrationWorkflows.length; ++i) { + if (typeof object.migrationWorkflows[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse.migrationWorkflows: object expected"); + message.migrationWorkflows[i] = $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.fromObject(object.migrationWorkflows[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListMigrationWorkflowsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse} message ListMigrationWorkflowsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMigrationWorkflowsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.migrationWorkflows = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.migrationWorkflows && message.migrationWorkflows.length) { + object.migrationWorkflows = []; + for (var j = 0; j < message.migrationWorkflows.length; ++j) + object.migrationWorkflows[j] = $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.toObject(message.migrationWorkflows[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListMigrationWorkflowsResponse to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse + * @instance + * @returns {Object.} JSON object + */ + ListMigrationWorkflowsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMigrationWorkflowsResponse + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMigrationWorkflowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse"; + }; + + return ListMigrationWorkflowsResponse; + })(); + + v2alpha.DeleteMigrationWorkflowRequest = (function() { + + /** + * Properties of a DeleteMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IDeleteMigrationWorkflowRequest + * @property {string|null} [name] DeleteMigrationWorkflowRequest name + */ + + /** + * Constructs a new DeleteMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a DeleteMigrationWorkflowRequest. + * @implements IDeleteMigrationWorkflowRequest + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest=} [properties] Properties to set + */ + function DeleteMigrationWorkflowRequest(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]]; + } + + /** + * DeleteMigrationWorkflowRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest + * @instance + */ + DeleteMigrationWorkflowRequest.prototype.name = ""; + + /** + * Creates a new DeleteMigrationWorkflowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest instance + */ + DeleteMigrationWorkflowRequest.create = function create(properties) { + return new DeleteMigrationWorkflowRequest(properties); + }; + + /** + * Encodes the specified DeleteMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest} message DeleteMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMigrationWorkflowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified DeleteMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest} message DeleteMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest + * @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.v2alpha.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMigrationWorkflowRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteMigrationWorkflowRequest message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteMigrationWorkflowRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a DeleteMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest + */ + DeleteMigrationWorkflowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteMigrationWorkflowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest} message DeleteMigrationWorkflowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteMigrationWorkflowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this DeleteMigrationWorkflowRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteMigrationWorkflowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteMigrationWorkflowRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest"; + }; + + return DeleteMigrationWorkflowRequest; + })(); + + v2alpha.StartMigrationWorkflowRequest = (function() { + + /** + * Properties of a StartMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IStartMigrationWorkflowRequest + * @property {string|null} [name] StartMigrationWorkflowRequest name + */ + + /** + * Constructs a new StartMigrationWorkflowRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a StartMigrationWorkflowRequest. + * @implements IStartMigrationWorkflowRequest + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest=} [properties] Properties to set + */ + function StartMigrationWorkflowRequest(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]]; + } + + /** + * StartMigrationWorkflowRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest + * @instance + */ + StartMigrationWorkflowRequest.prototype.name = ""; + + /** + * Creates a new StartMigrationWorkflowRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest instance + */ + StartMigrationWorkflowRequest.create = function create(properties) { + return new StartMigrationWorkflowRequest(properties); + }; + + /** + * Encodes the specified StartMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest} message StartMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartMigrationWorkflowRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified StartMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest} message StartMigrationWorkflowRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + StartMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest + * @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.v2alpha.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartMigrationWorkflowRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + StartMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a StartMigrationWorkflowRequest message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + StartMigrationWorkflowRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a StartMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest + */ + StartMigrationWorkflowRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a StartMigrationWorkflowRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest} message StartMigrationWorkflowRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + StartMigrationWorkflowRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this StartMigrationWorkflowRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest + * @instance + * @returns {Object.} JSON object + */ + StartMigrationWorkflowRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for StartMigrationWorkflowRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + StartMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest"; + }; + + return StartMigrationWorkflowRequest; + })(); + + v2alpha.GetMigrationSubtaskRequest = (function() { + + /** + * Properties of a GetMigrationSubtaskRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IGetMigrationSubtaskRequest + * @property {string|null} [name] GetMigrationSubtaskRequest name + * @property {google.protobuf.IFieldMask|null} [readMask] GetMigrationSubtaskRequest readMask + */ + + /** + * Constructs a new GetMigrationSubtaskRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a GetMigrationSubtaskRequest. + * @implements IGetMigrationSubtaskRequest + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest=} [properties] Properties to set + */ + function GetMigrationSubtaskRequest(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]]; + } + + /** + * GetMigrationSubtaskRequest name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest + * @instance + */ + GetMigrationSubtaskRequest.prototype.name = ""; + + /** + * GetMigrationSubtaskRequest readMask. + * @member {google.protobuf.IFieldMask|null|undefined} readMask + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest + * @instance + */ + GetMigrationSubtaskRequest.prototype.readMask = null; + + /** + * Creates a new GetMigrationSubtaskRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest instance + */ + GetMigrationSubtaskRequest.create = function create(properties) { + return new GetMigrationSubtaskRequest(properties); + }; + + /** + * Encodes the specified GetMigrationSubtaskRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest} message GetMigrationSubtaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMigrationSubtaskRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) + $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetMigrationSubtaskRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest} message GetMigrationSubtaskRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetMigrationSubtaskRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest + * @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.v2alpha.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMigrationSubtaskRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetMigrationSubtaskRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetMigrationSubtaskRequest message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetMigrationSubtaskRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.readMask != null && message.hasOwnProperty("readMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.readMask); + if (error) + return "readMask." + error; + } + return null; + }; + + /** + * Creates a GetMigrationSubtaskRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest + */ + GetMigrationSubtaskRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.readMask != null) { + if (typeof object.readMask !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest.readMask: object expected"); + message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); + } + return message; + }; + + /** + * Creates a plain object from a GetMigrationSubtaskRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest} message GetMigrationSubtaskRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetMigrationSubtaskRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.readMask = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.readMask != null && message.hasOwnProperty("readMask")) + object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); + return object; + }; + + /** + * Converts this GetMigrationSubtaskRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest + * @instance + * @returns {Object.} JSON object + */ + GetMigrationSubtaskRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetMigrationSubtaskRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetMigrationSubtaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest"; + }; + + return GetMigrationSubtaskRequest; + })(); + + v2alpha.ListMigrationSubtasksRequest = (function() { + + /** + * Properties of a ListMigrationSubtasksRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IListMigrationSubtasksRequest + * @property {string|null} [parent] ListMigrationSubtasksRequest parent + * @property {google.protobuf.IFieldMask|null} [readMask] ListMigrationSubtasksRequest readMask + * @property {number|null} [pageSize] ListMigrationSubtasksRequest pageSize + * @property {string|null} [pageToken] ListMigrationSubtasksRequest pageToken + * @property {string|null} [filter] ListMigrationSubtasksRequest filter + */ + + /** + * Constructs a new ListMigrationSubtasksRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a ListMigrationSubtasksRequest. + * @implements IListMigrationSubtasksRequest + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest=} [properties] Properties to set + */ + function ListMigrationSubtasksRequest(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]]; + } + + /** + * ListMigrationSubtasksRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest + * @instance + */ + ListMigrationSubtasksRequest.prototype.parent = ""; + + /** + * ListMigrationSubtasksRequest readMask. + * @member {google.protobuf.IFieldMask|null|undefined} readMask + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest + * @instance + */ + ListMigrationSubtasksRequest.prototype.readMask = null; + + /** + * ListMigrationSubtasksRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest + * @instance + */ + ListMigrationSubtasksRequest.prototype.pageSize = 0; + + /** + * ListMigrationSubtasksRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest + * @instance + */ + ListMigrationSubtasksRequest.prototype.pageToken = ""; + + /** + * ListMigrationSubtasksRequest filter. + * @member {string} filter + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest + * @instance + */ + ListMigrationSubtasksRequest.prototype.filter = ""; + + /** + * Creates a new ListMigrationSubtasksRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest instance + */ + ListMigrationSubtasksRequest.create = function create(properties) { + return new ListMigrationSubtasksRequest(properties); + }; + + /** + * Encodes the specified ListMigrationSubtasksRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest} message ListMigrationSubtasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationSubtasksRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) + $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListMigrationSubtasksRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest} message ListMigrationSubtasksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationSubtasksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest + * @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.v2alpha.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationSubtasksRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pageSize = reader.int32(); + break; + } + case 4: { + message.pageToken = reader.string(); + break; + } + case 5: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationSubtasksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMigrationSubtasksRequest message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMigrationSubtasksRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.readMask != null && message.hasOwnProperty("readMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.readMask); + if (error) + return "readMask." + error; + } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListMigrationSubtasksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest + */ + ListMigrationSubtasksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.readMask != null) { + if (typeof object.readMask !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest.readMask: object expected"); + message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); + } + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListMigrationSubtasksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest} message ListMigrationSubtasksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMigrationSubtasksRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.readMask = null; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.readMask != null && message.hasOwnProperty("readMask")) + object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListMigrationSubtasksRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest + * @instance + * @returns {Object.} JSON object + */ + ListMigrationSubtasksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMigrationSubtasksRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMigrationSubtasksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest"; + }; + + return ListMigrationSubtasksRequest; + })(); + + v2alpha.ListMigrationSubtasksResponse = (function() { + + /** + * Properties of a ListMigrationSubtasksResponse. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface IListMigrationSubtasksResponse + * @property {Array.|null} [migrationSubtasks] ListMigrationSubtasksResponse migrationSubtasks + * @property {string|null} [nextPageToken] ListMigrationSubtasksResponse nextPageToken + */ + + /** + * Constructs a new ListMigrationSubtasksResponse. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a ListMigrationSubtasksResponse. + * @implements IListMigrationSubtasksResponse + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse=} [properties] Properties to set + */ + function ListMigrationSubtasksResponse(properties) { + this.migrationSubtasks = []; + 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]]; + } + + /** + * ListMigrationSubtasksResponse migrationSubtasks. + * @member {Array.} migrationSubtasks + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse + * @instance + */ + ListMigrationSubtasksResponse.prototype.migrationSubtasks = $util.emptyArray; + + /** + * ListMigrationSubtasksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse + * @instance + */ + ListMigrationSubtasksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListMigrationSubtasksResponse instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse instance + */ + ListMigrationSubtasksResponse.create = function create(properties) { + return new ListMigrationSubtasksResponse(properties); + }; + + /** + * Encodes the specified ListMigrationSubtasksResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse} message ListMigrationSubtasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationSubtasksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.migrationSubtasks != null && message.migrationSubtasks.length) + for (var i = 0; i < message.migrationSubtasks.length; ++i) + $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask.encode(message.migrationSubtasks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListMigrationSubtasksResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse + * @static + * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse} message ListMigrationSubtasksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListMigrationSubtasksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse + * @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.v2alpha.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationSubtasksResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.migrationSubtasks && message.migrationSubtasks.length)) + message.migrationSubtasks = []; + message.migrationSubtasks.push($root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListMigrationSubtasksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListMigrationSubtasksResponse message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListMigrationSubtasksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.migrationSubtasks != null && message.hasOwnProperty("migrationSubtasks")) { + if (!Array.isArray(message.migrationSubtasks)) + return "migrationSubtasks: array expected"; + for (var i = 0; i < message.migrationSubtasks.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask.verify(message.migrationSubtasks[i]); + if (error) + return "migrationSubtasks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListMigrationSubtasksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse + */ + ListMigrationSubtasksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse(); + if (object.migrationSubtasks) { + if (!Array.isArray(object.migrationSubtasks)) + throw TypeError(".google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse.migrationSubtasks: array expected"); + message.migrationSubtasks = []; + for (var i = 0; i < object.migrationSubtasks.length; ++i) { + if (typeof object.migrationSubtasks[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse.migrationSubtasks: object expected"); + message.migrationSubtasks[i] = $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask.fromObject(object.migrationSubtasks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListMigrationSubtasksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse} message ListMigrationSubtasksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListMigrationSubtasksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.migrationSubtasks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.migrationSubtasks && message.migrationSubtasks.length) { + object.migrationSubtasks = []; + for (var j = 0; j < message.migrationSubtasks.length; ++j) + object.migrationSubtasks[j] = $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask.toObject(message.migrationSubtasks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListMigrationSubtasksResponse to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse + * @instance + * @returns {Object.} JSON object + */ + ListMigrationSubtasksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListMigrationSubtasksResponse + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListMigrationSubtasksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse"; + }; + + return ListMigrationSubtasksResponse; + })(); + + v2alpha.SqlTranslationService = (function() { + + /** + * Constructs a new SqlTranslationService service. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a SqlTranslationService + * @extends $protobuf.rpc.Service + * @constructor + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + */ + function SqlTranslationService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (SqlTranslationService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SqlTranslationService; + + /** + * Creates new SqlTranslationService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationService + * @static + * @param {$protobuf.RPCImpl} rpcImpl RPC implementation + * @param {boolean} [requestDelimited=false] Whether requests are length-delimited + * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @returns {SqlTranslationService} RPC service. Useful where requests and/or responses are streamed. + */ + SqlTranslationService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationService|translateQuery}. + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationService + * @typedef TranslateQueryCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse} [response] TranslateQueryResponse + */ + + /** + * Calls TranslateQuery. + * @function translateQuery + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest} request TranslateQueryRequest message or plain object + * @param {google.cloud.bigquery.migration.v2alpha.SqlTranslationService.TranslateQueryCallback} callback Node-style callback called with the error, if any, and TranslateQueryResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(SqlTranslationService.prototype.translateQuery = function translateQuery(request, callback) { + return this.rpcCall(translateQuery, $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest, $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse, request, callback); + }, "name", { value: "TranslateQuery" }); + + /** + * Calls TranslateQuery. + * @function translateQuery + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationService + * @instance + * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest} request TranslateQueryRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return SqlTranslationService; + })(); + + v2alpha.TranslateQueryRequest = (function() { + + /** + * Properties of a TranslateQueryRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface ITranslateQueryRequest + * @property {string|null} [parent] TranslateQueryRequest parent + * @property {google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect|null} [sourceDialect] TranslateQueryRequest sourceDialect + * @property {string|null} [query] TranslateQueryRequest query + */ + + /** + * Constructs a new TranslateQueryRequest. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a TranslateQueryRequest. + * @implements ITranslateQueryRequest + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest=} [properties] Properties to set + */ + function TranslateQueryRequest(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]]; + } + + /** + * TranslateQueryRequest parent. + * @member {string} parent + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest + * @instance + */ + TranslateQueryRequest.prototype.parent = ""; + + /** + * TranslateQueryRequest sourceDialect. + * @member {google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect} sourceDialect + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest + * @instance + */ + TranslateQueryRequest.prototype.sourceDialect = 0; + + /** + * TranslateQueryRequest query. + * @member {string} query + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest + * @instance + */ + TranslateQueryRequest.prototype.query = ""; + + /** + * Creates a new TranslateQueryRequest instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest} TranslateQueryRequest instance + */ + TranslateQueryRequest.create = function create(properties) { + return new TranslateQueryRequest(properties); + }; + + /** + * Encodes the specified TranslateQueryRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest} message TranslateQueryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslateQueryRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.sourceDialect != null && Object.hasOwnProperty.call(message, "sourceDialect")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sourceDialect); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.query); + return writer; + }; + + /** + * Encodes the specified TranslateQueryRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest} message TranslateQueryRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslateQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TranslateQueryRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest + * @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.v2alpha.TranslateQueryRequest} TranslateQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslateQueryRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.sourceDialect = reader.int32(); + break; + } + case 3: { + message.query = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TranslateQueryRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest} TranslateQueryRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslateQueryRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TranslateQueryRequest message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TranslateQueryRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.sourceDialect != null && message.hasOwnProperty("sourceDialect")) + switch (message.sourceDialect) { + default: + return "sourceDialect: enum value expected"; + case 0: + case 1: + break; + } + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + return null; + }; + + /** + * Creates a TranslateQueryRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest} TranslateQueryRequest + */ + TranslateQueryRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest(); + if (object.parent != null) + message.parent = String(object.parent); + switch (object.sourceDialect) { + default: + if (typeof object.sourceDialect === "number") { + message.sourceDialect = object.sourceDialect; + break; + } + break; + case "SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED": + case 0: + message.sourceDialect = 0; + break; + case "TERADATA": + case 1: + message.sourceDialect = 1; + break; + } + if (object.query != null) + message.query = String(object.query); + return message; + }; + + /** + * Creates a plain object from a TranslateQueryRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest + * @static + * @param {google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest} message TranslateQueryRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TranslateQueryRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.sourceDialect = options.enums === String ? "SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED" : 0; + object.query = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.sourceDialect != null && message.hasOwnProperty("sourceDialect")) + object.sourceDialect = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect[message.sourceDialect] === undefined ? message.sourceDialect : $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect[message.sourceDialect] : message.sourceDialect; + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + return object; + }; + + /** + * Converts this TranslateQueryRequest to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest + * @instance + * @returns {Object.} JSON object + */ + TranslateQueryRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TranslateQueryRequest + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TranslateQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest"; + }; + + /** + * SqlTranslationSourceDialect enum. + * @name google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect + * @enum {number} + * @property {number} SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED=0 SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED value + * @property {number} TERADATA=1 TERADATA value + */ + TranslateQueryRequest.SqlTranslationSourceDialect = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED"] = 0; + values[valuesById[1] = "TERADATA"] = 1; + return values; + })(); + + return TranslateQueryRequest; + })(); + + v2alpha.TranslateQueryResponse = (function() { + + /** + * Properties of a TranslateQueryResponse. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface ITranslateQueryResponse + * @property {string|null} [translationJob] TranslateQueryResponse translationJob + * @property {string|null} [translatedQuery] TranslateQueryResponse translatedQuery + * @property {Array.|null} [errors] TranslateQueryResponse errors + * @property {Array.|null} [warnings] TranslateQueryResponse warnings + */ + + /** + * Constructs a new TranslateQueryResponse. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a TranslateQueryResponse. + * @implements ITranslateQueryResponse + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse=} [properties] Properties to set + */ + function TranslateQueryResponse(properties) { + this.errors = []; + this.warnings = []; + 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]]; + } + + /** + * TranslateQueryResponse translationJob. + * @member {string} translationJob + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse + * @instance + */ + TranslateQueryResponse.prototype.translationJob = ""; + + /** + * TranslateQueryResponse translatedQuery. + * @member {string} translatedQuery + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse + * @instance + */ + TranslateQueryResponse.prototype.translatedQuery = ""; + + /** + * TranslateQueryResponse errors. + * @member {Array.} errors + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse + * @instance + */ + TranslateQueryResponse.prototype.errors = $util.emptyArray; + + /** + * TranslateQueryResponse warnings. + * @member {Array.} warnings + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse + * @instance + */ + TranslateQueryResponse.prototype.warnings = $util.emptyArray; + + /** + * Creates a new TranslateQueryResponse instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse} TranslateQueryResponse instance + */ + TranslateQueryResponse.create = function create(properties) { + return new TranslateQueryResponse(properties); + }; + + /** + * Encodes the specified TranslateQueryResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse} message TranslateQueryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslateQueryResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.translatedQuery != null && Object.hasOwnProperty.call(message, "translatedQuery")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.translatedQuery); + if (message.errors != null && message.errors.length) + for (var i = 0; i < message.errors.length; ++i) + $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.warnings != null && message.warnings.length) + for (var i = 0; i < message.warnings.length; ++i) + $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.encode(message.warnings[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.translationJob != null && Object.hasOwnProperty.call(message, "translationJob")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.translationJob); + return writer; + }; + + /** + * Encodes the specified TranslateQueryResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse} message TranslateQueryResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + TranslateQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a TranslateQueryResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse + * @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.v2alpha.TranslateQueryResponse} TranslateQueryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslateQueryResponse.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 4: { + message.translationJob = reader.string(); + break; + } + case 1: { + message.translatedQuery = reader.string(); + break; + } + case 2: { + if (!(message.errors && message.errors.length)) + message.errors = []; + message.errors.push($root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.warnings && message.warnings.length)) + message.warnings = []; + message.warnings.push($root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a TranslateQueryResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse} TranslateQueryResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + TranslateQueryResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a TranslateQueryResponse message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + TranslateQueryResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.translationJob != null && message.hasOwnProperty("translationJob")) + if (!$util.isString(message.translationJob)) + return "translationJob: string expected"; + if (message.translatedQuery != null && message.hasOwnProperty("translatedQuery")) + if (!$util.isString(message.translatedQuery)) + return "translatedQuery: string expected"; + if (message.errors != null && message.hasOwnProperty("errors")) { + if (!Array.isArray(message.errors)) + return "errors: array expected"; + for (var i = 0; i < message.errors.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError.verify(message.errors[i]); + if (error) + return "errors." + error; + } + } + if (message.warnings != null && message.hasOwnProperty("warnings")) { + if (!Array.isArray(message.warnings)) + return "warnings: array expected"; + for (var i = 0; i < message.warnings.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.verify(message.warnings[i]); + if (error) + return "warnings." + error; + } + } + return null; + }; + + /** + * Creates a TranslateQueryResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse} TranslateQueryResponse + */ + TranslateQueryResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse(); + if (object.translationJob != null) + message.translationJob = String(object.translationJob); + if (object.translatedQuery != null) + message.translatedQuery = String(object.translatedQuery); + if (object.errors) { + if (!Array.isArray(object.errors)) + throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.errors: array expected"); + message.errors = []; + for (var i = 0; i < object.errors.length; ++i) { + if (typeof object.errors[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.errors: object expected"); + message.errors[i] = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError.fromObject(object.errors[i]); + } + } + if (object.warnings) { + if (!Array.isArray(object.warnings)) + throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.warnings: array expected"); + message.warnings = []; + for (var i = 0; i < object.warnings.length; ++i) { + if (typeof object.warnings[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.warnings: object expected"); + message.warnings[i] = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.fromObject(object.warnings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a TranslateQueryResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse + * @static + * @param {google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse} message TranslateQueryResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + TranslateQueryResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.errors = []; + object.warnings = []; + } + if (options.defaults) { + object.translatedQuery = ""; + object.translationJob = ""; + } + if (message.translatedQuery != null && message.hasOwnProperty("translatedQuery")) + object.translatedQuery = message.translatedQuery; + if (message.errors && message.errors.length) { + object.errors = []; + for (var j = 0; j < message.errors.length; ++j) + object.errors[j] = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError.toObject(message.errors[j], options); + } + if (message.warnings && message.warnings.length) { + object.warnings = []; + for (var j = 0; j < message.warnings.length; ++j) + object.warnings[j] = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.toObject(message.warnings[j], options); + } + if (message.translationJob != null && message.hasOwnProperty("translationJob")) + object.translationJob = message.translationJob; + return object; + }; + + /** + * Converts this TranslateQueryResponse to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse + * @instance + * @returns {Object.} JSON object + */ + TranslateQueryResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for TranslateQueryResponse + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + TranslateQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse"; + }; + + return TranslateQueryResponse; + })(); + + v2alpha.SqlTranslationErrorDetail = (function() { + + /** + * Properties of a SqlTranslationErrorDetail. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface ISqlTranslationErrorDetail + * @property {number|Long|null} [row] SqlTranslationErrorDetail row + * @property {number|Long|null} [column] SqlTranslationErrorDetail column + * @property {string|null} [message] SqlTranslationErrorDetail message + */ + + /** + * Constructs a new SqlTranslationErrorDetail. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a SqlTranslationErrorDetail. + * @implements ISqlTranslationErrorDetail + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail=} [properties] Properties to set + */ + function SqlTranslationErrorDetail(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]]; + } + + /** + * SqlTranslationErrorDetail row. + * @member {number|Long} row + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail + * @instance + */ + SqlTranslationErrorDetail.prototype.row = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SqlTranslationErrorDetail column. + * @member {number|Long} column + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail + * @instance + */ + SqlTranslationErrorDetail.prototype.column = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * SqlTranslationErrorDetail message. + * @member {string} message + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail + * @instance + */ + SqlTranslationErrorDetail.prototype.message = ""; + + /** + * Creates a new SqlTranslationErrorDetail instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail} SqlTranslationErrorDetail instance + */ + SqlTranslationErrorDetail.create = function create(properties) { + return new SqlTranslationErrorDetail(properties); + }; + + /** + * Encodes the specified SqlTranslationErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail} message SqlTranslationErrorDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlTranslationErrorDetail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.row != null && Object.hasOwnProperty.call(message, "row")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.row); + if (message.column != null && Object.hasOwnProperty.call(message, "column")) + writer.uint32(/* id 2, wireType 0 =*/16).int64(message.column); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.message); + return writer; + }; + + /** + * Encodes the specified SqlTranslationErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail} message SqlTranslationErrorDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlTranslationErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SqlTranslationErrorDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail + * @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.v2alpha.SqlTranslationErrorDetail} SqlTranslationErrorDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlTranslationErrorDetail.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.row = reader.int64(); + break; + } + case 2: { + message.column = reader.int64(); + break; + } + case 3: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SqlTranslationErrorDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail} SqlTranslationErrorDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlTranslationErrorDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SqlTranslationErrorDetail message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SqlTranslationErrorDetail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.row != null && message.hasOwnProperty("row")) + if (!$util.isInteger(message.row) && !(message.row && $util.isInteger(message.row.low) && $util.isInteger(message.row.high))) + return "row: integer|Long expected"; + if (message.column != null && message.hasOwnProperty("column")) + if (!$util.isInteger(message.column) && !(message.column && $util.isInteger(message.column.low) && $util.isInteger(message.column.high))) + return "column: integer|Long expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a SqlTranslationErrorDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail} SqlTranslationErrorDetail + */ + SqlTranslationErrorDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail(); + if (object.row != null) + if ($util.Long) + (message.row = $util.Long.fromValue(object.row)).unsigned = false; + else if (typeof object.row === "string") + message.row = parseInt(object.row, 10); + else if (typeof object.row === "number") + message.row = object.row; + else if (typeof object.row === "object") + message.row = new $util.LongBits(object.row.low >>> 0, object.row.high >>> 0).toNumber(); + if (object.column != null) + if ($util.Long) + (message.column = $util.Long.fromValue(object.column)).unsigned = false; + else if (typeof object.column === "string") + message.column = parseInt(object.column, 10); + else if (typeof object.column === "number") + message.column = object.column; + else if (typeof object.column === "object") + message.column = new $util.LongBits(object.column.low >>> 0, object.column.high >>> 0).toNumber(); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a SqlTranslationErrorDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail} message SqlTranslationErrorDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SqlTranslationErrorDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.row = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.row = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.column = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.column = options.longs === String ? "0" : 0; + object.message = ""; + } + if (message.row != null && message.hasOwnProperty("row")) + if (typeof message.row === "number") + object.row = options.longs === String ? String(message.row) : message.row; + else + object.row = options.longs === String ? $util.Long.prototype.toString.call(message.row) : options.longs === Number ? new $util.LongBits(message.row.low >>> 0, message.row.high >>> 0).toNumber() : message.row; + if (message.column != null && message.hasOwnProperty("column")) + if (typeof message.column === "number") + object.column = options.longs === String ? String(message.column) : message.column; + else + object.column = options.longs === String ? $util.Long.prototype.toString.call(message.column) : options.longs === Number ? new $util.LongBits(message.column.low >>> 0, message.column.high >>> 0).toNumber() : message.column; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this SqlTranslationErrorDetail to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail + * @instance + * @returns {Object.} JSON object + */ + SqlTranslationErrorDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SqlTranslationErrorDetail + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SqlTranslationErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail"; + }; + + return SqlTranslationErrorDetail; + })(); + + v2alpha.SqlTranslationError = (function() { + + /** + * Properties of a SqlTranslationError. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface ISqlTranslationError + * @property {google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType|null} [errorType] SqlTranslationError errorType + * @property {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null} [errorDetail] SqlTranslationError errorDetail + */ + + /** + * Constructs a new SqlTranslationError. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a SqlTranslationError. + * @implements ISqlTranslationError + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationError=} [properties] Properties to set + */ + function SqlTranslationError(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]]; + } + + /** + * SqlTranslationError errorType. + * @member {google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType} errorType + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError + * @instance + */ + SqlTranslationError.prototype.errorType = 0; + + /** + * SqlTranslationError errorDetail. + * @member {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null|undefined} errorDetail + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError + * @instance + */ + SqlTranslationError.prototype.errorDetail = null; + + /** + * Creates a new SqlTranslationError instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationError=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationError} SqlTranslationError instance + */ + SqlTranslationError.create = function create(properties) { + return new SqlTranslationError(properties); + }; + + /** + * Encodes the specified SqlTranslationError message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationError.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationError} message SqlTranslationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlTranslationError.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.errorType != null && Object.hasOwnProperty.call(message, "errorType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.errorType); + if (message.errorDetail != null && Object.hasOwnProperty.call(message, "errorDetail")) + $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.encode(message.errorDetail, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SqlTranslationError message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationError.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationError} message SqlTranslationError message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlTranslationError.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SqlTranslationError message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError + * @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.v2alpha.SqlTranslationError} SqlTranslationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlTranslationError.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.errorType = reader.int32(); + break; + } + case 2: { + message.errorDetail = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SqlTranslationError message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationError} SqlTranslationError + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlTranslationError.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SqlTranslationError message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SqlTranslationError.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.errorType != null && message.hasOwnProperty("errorType")) + switch (message.errorType) { + default: + return "errorType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.errorDetail != null && message.hasOwnProperty("errorDetail")) { + var error = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.verify(message.errorDetail); + if (error) + return "errorDetail." + error; + } + return null; + }; + + /** + * Creates a SqlTranslationError message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationError} SqlTranslationError + */ + SqlTranslationError.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError(); + switch (object.errorType) { + default: + if (typeof object.errorType === "number") { + message.errorType = object.errorType; + break; + } + break; + case "SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED": + case 0: + message.errorType = 0; + break; + case "SQL_PARSE_ERROR": + case 1: + message.errorType = 1; + break; + case "UNSUPPORTED_SQL_FUNCTION": + case 2: + message.errorType = 2; + break; + } + if (object.errorDetail != null) { + if (typeof object.errorDetail !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.SqlTranslationError.errorDetail: object expected"); + message.errorDetail = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.fromObject(object.errorDetail); + } + return message; + }; + + /** + * Creates a plain object from a SqlTranslationError message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError + * @static + * @param {google.cloud.bigquery.migration.v2alpha.SqlTranslationError} message SqlTranslationError + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SqlTranslationError.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.errorType = options.enums === String ? "SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED" : 0; + object.errorDetail = null; + } + if (message.errorType != null && message.hasOwnProperty("errorType")) + object.errorType = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType[message.errorType] === undefined ? message.errorType : $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType[message.errorType] : message.errorType; + if (message.errorDetail != null && message.hasOwnProperty("errorDetail")) + object.errorDetail = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.toObject(message.errorDetail, options); + return object; + }; + + /** + * Converts this SqlTranslationError to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError + * @instance + * @returns {Object.} JSON object + */ + SqlTranslationError.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SqlTranslationError + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SqlTranslationError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.SqlTranslationError"; + }; + + /** + * SqlTranslationErrorType enum. + * @name google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType + * @enum {number} + * @property {number} SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED=0 SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED value + * @property {number} SQL_PARSE_ERROR=1 SQL_PARSE_ERROR value + * @property {number} UNSUPPORTED_SQL_FUNCTION=2 UNSUPPORTED_SQL_FUNCTION value + */ + SqlTranslationError.SqlTranslationErrorType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SQL_PARSE_ERROR"] = 1; + values[valuesById[2] = "UNSUPPORTED_SQL_FUNCTION"] = 2; + return values; + })(); + + return SqlTranslationError; + })(); + + v2alpha.SqlTranslationWarning = (function() { + + /** + * Properties of a SqlTranslationWarning. + * @memberof google.cloud.bigquery.migration.v2alpha + * @interface ISqlTranslationWarning + * @property {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null} [warningDetail] SqlTranslationWarning warningDetail + */ + + /** + * Constructs a new SqlTranslationWarning. + * @memberof google.cloud.bigquery.migration.v2alpha + * @classdesc Represents a SqlTranslationWarning. + * @implements ISqlTranslationWarning + * @constructor + * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning=} [properties] Properties to set + */ + function SqlTranslationWarning(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]]; + } + + /** + * SqlTranslationWarning warningDetail. + * @member {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null|undefined} warningDetail + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning + * @instance + */ + SqlTranslationWarning.prototype.warningDetail = null; + + /** + * Creates a new SqlTranslationWarning instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning} SqlTranslationWarning instance + */ + SqlTranslationWarning.create = function create(properties) { + return new SqlTranslationWarning(properties); + }; + + /** + * Encodes the specified SqlTranslationWarning message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning} message SqlTranslationWarning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlTranslationWarning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.warningDetail != null && Object.hasOwnProperty.call(message, "warningDetail")) + $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.encode(message.warningDetail, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SqlTranslationWarning message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning + * @static + * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning} message SqlTranslationWarning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SqlTranslationWarning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SqlTranslationWarning message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning + * @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.v2alpha.SqlTranslationWarning} SqlTranslationWarning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlTranslationWarning.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.warningDetail = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SqlTranslationWarning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning} SqlTranslationWarning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SqlTranslationWarning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SqlTranslationWarning message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SqlTranslationWarning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.warningDetail != null && message.hasOwnProperty("warningDetail")) { + var error = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.verify(message.warningDetail); + if (error) + return "warningDetail." + error; + } + return null; + }; + + /** + * Creates a SqlTranslationWarning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning} SqlTranslationWarning + */ + SqlTranslationWarning.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning) + return object; + var message = new $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning(); + if (object.warningDetail != null) { + if (typeof object.warningDetail !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.warningDetail: object expected"); + message.warningDetail = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.fromObject(object.warningDetail); + } + return message; + }; + + /** + * Creates a plain object from a SqlTranslationWarning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning + * @static + * @param {google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning} message SqlTranslationWarning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SqlTranslationWarning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.warningDetail = null; + if (message.warningDetail != null && message.hasOwnProperty("warningDetail")) + object.warningDetail = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.toObject(message.warningDetail, options); + return object; + }; + + /** + * Converts this SqlTranslationWarning to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning + * @instance + * @returns {Object.} JSON object + */ + SqlTranslationWarning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SqlTranslationWarning + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SqlTranslationWarning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning"; + }; + + return SqlTranslationWarning; + })(); + + return v2alpha; + })(); + + return migration; + })(); + + return bigquery; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + /** + * FieldBehavior enum. + * @name google.api.FieldBehavior + * @enum {number} + * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value + * @property {number} OPTIONAL=1 OPTIONAL value + * @property {number} REQUIRED=2 REQUIRED value + * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value + * @property {number} INPUT_ONLY=4 INPUT_ONLY value + * @property {number} IMMUTABLE=5 IMMUTABLE value + * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value + * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value + * @property {number} IDENTIFIER=8 IDENTIFIER value + */ + api.FieldBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "OPTIONAL"] = 1; + values[valuesById[2] = "REQUIRED"] = 2; + values[valuesById[3] = "OUTPUT_ONLY"] = 3; + values[valuesById[4] = "INPUT_ONLY"] = 4; + values[valuesById[5] = "IMMUTABLE"] = 5; + values[valuesById[6] = "UNORDERED_LIST"] = 6; + values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; + values[valuesById[8] = "IDENTIFIER"] = 8; + return values; + })(); + + api.ResourceDescriptor = (function() { + + /** + * Properties of a ResourceDescriptor. + * @memberof google.api + * @interface IResourceDescriptor + * @property {string|null} [type] ResourceDescriptor type + * @property {Array.|null} [pattern] ResourceDescriptor pattern + * @property {string|null} [nameField] ResourceDescriptor nameField + * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history + * @property {string|null} [plural] ResourceDescriptor plural + * @property {string|null} [singular] ResourceDescriptor singular + * @property {Array.|null} [style] ResourceDescriptor style + */ + + /** + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + */ + function ResourceDescriptor(properties) { + this.pattern = []; + this.style = []; + 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]]; + } + + /** + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.type = ""; + + /** + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.pattern = $util.emptyArray; + + /** + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.nameField = ""; + + /** + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.history = 0; + + /** + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.plural = ""; + + /** + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.singular = ""; + + /** + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor + * @instance + */ + ResourceDescriptor.prototype.style = $util.emptyArray; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @function create + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance + */ + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); + }; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.pattern != null && message.pattern.length) + for (var i = 0; i < message.pattern.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); + if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); + if (message.history != null && Object.hasOwnProperty.call(message, "history")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); + if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); + if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); + if (message.style != null && message.style.length) { + writer.uint32(/* id 10, wireType 2 =*/82).fork(); + for (var i = 0; i < message.style.length; ++i) + writer.int32(message.style[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(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]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + api.Distribution = (function() { + + /** + * Properties of a Distribution. + * @memberof google.api + * @interface IDistribution + * @property {number|Long|null} [count] Distribution count + * @property {number|null} [mean] Distribution mean + * @property {number|null} [sumOfSquaredDeviation] Distribution sumOfSquaredDeviation + * @property {google.api.Distribution.IRange|null} [range] Distribution range + * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] Distribution bucketOptions + * @property {Array.|null} [bucketCounts] Distribution bucketCounts + * @property {Array.|null} [exemplars] Distribution exemplars + */ + + /** + * Constructs a new Distribution. + * @memberof google.api + * @classdesc Represents a Distribution. + * @implements IDistribution + * @constructor + * @param {google.api.IDistribution=} [properties] Properties to set + */ + function Distribution(properties) { + this.bucketCounts = []; + this.exemplars = []; + 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]]; + } + + /** + * Distribution count. + * @member {number|Long} count + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Distribution mean. + * @member {number} mean + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.mean = 0; + + /** + * Distribution sumOfSquaredDeviation. + * @member {number} sumOfSquaredDeviation + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.sumOfSquaredDeviation = 0; + + /** + * Distribution range. + * @member {google.api.Distribution.IRange|null|undefined} range + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.range = null; + + /** + * Distribution bucketOptions. + * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketOptions = null; + + /** + * Distribution bucketCounts. + * @member {Array.} bucketCounts + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.bucketCounts = $util.emptyArray; + + /** + * Distribution exemplars. + * @member {Array.} exemplars + * @memberof google.api.Distribution + * @instance + */ + Distribution.prototype.exemplars = $util.emptyArray; + + /** + * Creates a new Distribution instance using the specified properties. + * @function create + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution=} [properties] Properties to set + * @returns {google.api.Distribution} Distribution instance + */ + Distribution.create = function create(properties) { + return new Distribution(properties); + }; + + /** + * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Distribution.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.count != null && Object.hasOwnProperty.call(message, "count")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); + if (message.mean != null && Object.hasOwnProperty.call(message, "mean")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); + if (message.sumOfSquaredDeviation != null && Object.hasOwnProperty.call(message, "sumOfSquaredDeviation")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); + if (message.range != null && Object.hasOwnProperty.call(message, "range")) + $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) + $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.bucketCounts != null && message.bucketCounts.length) { + writer.uint32(/* id 7, wireType 2 =*/58).fork(); + for (var i = 0; i < message.bucketCounts.length; ++i) + writer.int64(message.bucketCounts[i]); + writer.ldelim(); + } + if (message.exemplars != null && message.exemplars.length) + for (var i = 0; i < message.exemplars.length; ++i) + $root.google.api.Distribution.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution + * @static + * @param {google.api.IDistribution} message Distribution message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Distribution.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Distribution message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution} Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Distribution.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.count = reader.int64(); + break; + } + case 2: { + message.mean = reader.double(); + break; + } + case 3: { + message.sumOfSquaredDeviation = reader.double(); + break; + } + case 4: { + message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); + break; + } + case 6: { + message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); + break; + } + case 7: { + if (!(message.bucketCounts && message.bucketCounts.length)) + message.bucketCounts = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bucketCounts.push(reader.int64()); + } else + message.bucketCounts.push(reader.int64()); + break; + } + case 10: { + if (!(message.exemplars && message.exemplars.length)) + message.exemplars = []; + message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Distribution message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution} Distribution + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Distribution.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Distribution message. + * @function verify + * @memberof google.api.Distribution + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Distribution.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.count != null && message.hasOwnProperty("count")) + if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) + return "count: integer|Long expected"; + if (message.mean != null && message.hasOwnProperty("mean")) + if (typeof message.mean !== "number") + return "mean: number expected"; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + if (typeof message.sumOfSquaredDeviation !== "number") + return "sumOfSquaredDeviation: number expected"; + if (message.range != null && message.hasOwnProperty("range")) { + var error = $root.google.api.Distribution.Range.verify(message.range); + if (error) + return "range." + error; + } + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { + var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); + if (error) + return "bucketOptions." + error; + } + if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { + if (!Array.isArray(message.bucketCounts)) + return "bucketCounts: array expected"; + for (var i = 0; i < message.bucketCounts.length; ++i) + if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) + return "bucketCounts: integer|Long[] expected"; + } + if (message.exemplars != null && message.hasOwnProperty("exemplars")) { + if (!Array.isArray(message.exemplars)) + return "exemplars: array expected"; + for (var i = 0; i < message.exemplars.length; ++i) { + var error = $root.google.api.Distribution.Exemplar.verify(message.exemplars[i]); + if (error) + return "exemplars." + error; + } + } + return null; + }; + + /** + * Creates a Distribution message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution} Distribution + */ + Distribution.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution) + return object; + var message = new $root.google.api.Distribution(); + if (object.count != null) + if ($util.Long) + (message.count = $util.Long.fromValue(object.count)).unsigned = false; + else if (typeof object.count === "string") + message.count = parseInt(object.count, 10); + else if (typeof object.count === "number") + message.count = object.count; + else if (typeof object.count === "object") + message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); + if (object.mean != null) + message.mean = Number(object.mean); + if (object.sumOfSquaredDeviation != null) + message.sumOfSquaredDeviation = Number(object.sumOfSquaredDeviation); + if (object.range != null) { + if (typeof object.range !== "object") + throw TypeError(".google.api.Distribution.range: object expected"); + message.range = $root.google.api.Distribution.Range.fromObject(object.range); + } + if (object.bucketOptions != null) { + if (typeof object.bucketOptions !== "object") + throw TypeError(".google.api.Distribution.bucketOptions: object expected"); + message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); + } + if (object.bucketCounts) { + if (!Array.isArray(object.bucketCounts)) + throw TypeError(".google.api.Distribution.bucketCounts: array expected"); + message.bucketCounts = []; + for (var i = 0; i < object.bucketCounts.length; ++i) + if ($util.Long) + (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; + else if (typeof object.bucketCounts[i] === "string") + message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); + else if (typeof object.bucketCounts[i] === "number") + message.bucketCounts[i] = object.bucketCounts[i]; + else if (typeof object.bucketCounts[i] === "object") + message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); + } + if (object.exemplars) { + if (!Array.isArray(object.exemplars)) + throw TypeError(".google.api.Distribution.exemplars: array expected"); + message.exemplars = []; + for (var i = 0; i < object.exemplars.length; ++i) { + if (typeof object.exemplars[i] !== "object") + throw TypeError(".google.api.Distribution.exemplars: object expected"); + message.exemplars[i] = $root.google.api.Distribution.Exemplar.fromObject(object.exemplars[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Distribution message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution + * @static + * @param {google.api.Distribution} message Distribution + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Distribution.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.bucketCounts = []; + object.exemplars = []; + } + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.count = options.longs === String ? "0" : 0; + object.mean = 0; + object.sumOfSquaredDeviation = 0; + object.range = null; + object.bucketOptions = null; + } + if (message.count != null && message.hasOwnProperty("count")) + if (typeof message.count === "number") + object.count = options.longs === String ? String(message.count) : message.count; + else + object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; + if (message.mean != null && message.hasOwnProperty("mean")) + object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; + if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) + object.sumOfSquaredDeviation = options.json && !isFinite(message.sumOfSquaredDeviation) ? String(message.sumOfSquaredDeviation) : message.sumOfSquaredDeviation; + if (message.range != null && message.hasOwnProperty("range")) + object.range = $root.google.api.Distribution.Range.toObject(message.range, options); + if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) + object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); + if (message.bucketCounts && message.bucketCounts.length) { + object.bucketCounts = []; + for (var j = 0; j < message.bucketCounts.length; ++j) + if (typeof message.bucketCounts[j] === "number") + object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; + else + object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; + } + if (message.exemplars && message.exemplars.length) { + object.exemplars = []; + for (var j = 0; j < message.exemplars.length; ++j) + object.exemplars[j] = $root.google.api.Distribution.Exemplar.toObject(message.exemplars[j], options); + } + return object; + }; + + /** + * Converts this Distribution to JSON. + * @function toJSON + * @memberof google.api.Distribution + * @instance + * @returns {Object.} JSON object + */ + Distribution.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Distribution + * @function getTypeUrl + * @memberof google.api.Distribution + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Distribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Distribution"; + }; + + Distribution.Range = (function() { + + /** + * Properties of a Range. + * @memberof google.api.Distribution + * @interface IRange + * @property {number|null} [min] Range min + * @property {number|null} [max] Range max + */ + + /** + * Constructs a new Range. + * @memberof google.api.Distribution + * @classdesc Represents a Range. + * @implements IRange + * @constructor + * @param {google.api.Distribution.IRange=} [properties] Properties to set + */ + function Range(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]]; + } + + /** + * Range min. + * @member {number} min + * @memberof google.api.Distribution.Range + * @instance + */ + Range.prototype.min = 0; + + /** + * Range max. + * @member {number} max + * @memberof google.api.Distribution.Range + * @instance + */ + Range.prototype.max = 0; + + /** + * Creates a new Range instance using the specified properties. + * @function create + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange=} [properties] Properties to set + * @returns {google.api.Distribution.Range} Range instance + */ + Range.create = function create(properties) { + return new Range(properties); + }; + + /** + * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.min != null && Object.hasOwnProperty.call(message, "min")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); + if (message.max != null && Object.hasOwnProperty.call(message, "max")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); + return writer; + }; + + /** + * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.IRange} message Range message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Range.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Range message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Range(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.min = reader.double(); + break; + } + case 2: { + message.max = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Range message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.Range + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.Range} Range + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Range.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Range message. + * @function verify + * @memberof google.api.Distribution.Range + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Range.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.min != null && message.hasOwnProperty("min")) + if (typeof message.min !== "number") + return "min: number expected"; + if (message.max != null && message.hasOwnProperty("max")) + if (typeof message.max !== "number") + return "max: number expected"; + return null; + }; + + /** + * Creates a Range message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.Range + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.Range} Range + */ + Range.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.Range) + return object; + var message = new $root.google.api.Distribution.Range(); + if (object.min != null) + message.min = Number(object.min); + if (object.max != null) + message.max = Number(object.max); + return message; + }; + + /** + * Creates a plain object from a Range message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.Range + * @static + * @param {google.api.Distribution.Range} message Range + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Range.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.min = 0; + object.max = 0; + } + if (message.min != null && message.hasOwnProperty("min")) + object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; + if (message.max != null && message.hasOwnProperty("max")) + object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; + return object; + }; + + /** + * Converts this Range to JSON. + * @function toJSON + * @memberof google.api.Distribution.Range + * @instance + * @returns {Object.} JSON object + */ + Range.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Range + * @function getTypeUrl + * @memberof google.api.Distribution.Range + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Range.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Distribution.Range"; + }; + + return Range; + })(); + + Distribution.BucketOptions = (function() { + + /** + * Properties of a BucketOptions. + * @memberof google.api.Distribution + * @interface IBucketOptions + * @property {google.api.Distribution.BucketOptions.ILinear|null} [linearBuckets] BucketOptions linearBuckets + * @property {google.api.Distribution.BucketOptions.IExponential|null} [exponentialBuckets] BucketOptions exponentialBuckets + * @property {google.api.Distribution.BucketOptions.IExplicit|null} [explicitBuckets] BucketOptions explicitBuckets + */ + + /** + * Constructs a new BucketOptions. + * @memberof google.api.Distribution + * @classdesc Represents a BucketOptions. + * @implements IBucketOptions + * @constructor + * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + */ + function BucketOptions(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]]; + } + + /** + * BucketOptions linearBuckets. + * @member {google.api.Distribution.BucketOptions.ILinear|null|undefined} linearBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.linearBuckets = null; + + /** + * BucketOptions exponentialBuckets. + * @member {google.api.Distribution.BucketOptions.IExponential|null|undefined} exponentialBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.exponentialBuckets = null; + + /** + * BucketOptions explicitBuckets. + * @member {google.api.Distribution.BucketOptions.IExplicit|null|undefined} explicitBuckets + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + BucketOptions.prototype.explicitBuckets = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * BucketOptions options. + * @member {"linearBuckets"|"exponentialBuckets"|"explicitBuckets"|undefined} options + * @memberof google.api.Distribution.BucketOptions + * @instance + */ + Object.defineProperty(BucketOptions.prototype, "options", { + get: $util.oneOfGetter($oneOfFields = ["linearBuckets", "exponentialBuckets", "explicitBuckets"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new BucketOptions instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions} BucketOptions instance + */ + BucketOptions.create = function create(properties) { + return new BucketOptions(properties); + }; + + /** + * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.linearBuckets != null && Object.hasOwnProperty.call(message, "linearBuckets")) + $root.google.api.Distribution.BucketOptions.Linear.encode(message.linearBuckets, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.exponentialBuckets != null && Object.hasOwnProperty.call(message, "exponentialBuckets")) + $root.google.api.Distribution.BucketOptions.Exponential.encode(message.exponentialBuckets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.explicitBuckets != null && Object.hasOwnProperty.call(message, "explicitBuckets")) + $root.google.api.Distribution.BucketOptions.Explicit.encode(message.explicitBuckets, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BucketOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BucketOptions message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); + break; + } + case 2: { + message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.decode(reader, reader.uint32()); + break; + } + case 3: { + message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BucketOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions} BucketOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BucketOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BucketOptions message. + * @function verify + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BucketOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Linear.verify(message.linearBuckets); + if (error) + return "linearBuckets." + error; + } + } + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Exponential.verify(message.exponentialBuckets); + if (error) + return "exponentialBuckets." + error; + } + } + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { + if (properties.options === 1) + return "options: multiple values"; + properties.options = 1; + { + var error = $root.google.api.Distribution.BucketOptions.Explicit.verify(message.explicitBuckets); + if (error) + return "explicitBuckets." + error; + } + } + return null; + }; + + /** + * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions} BucketOptions + */ + BucketOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions) + return object; + var message = new $root.google.api.Distribution.BucketOptions(); + if (object.linearBuckets != null) { + if (typeof object.linearBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.linearBuckets: object expected"); + message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.fromObject(object.linearBuckets); + } + if (object.exponentialBuckets != null) { + if (typeof object.exponentialBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.exponentialBuckets: object expected"); + message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.fromObject(object.exponentialBuckets); + } + if (object.explicitBuckets != null) { + if (typeof object.explicitBuckets !== "object") + throw TypeError(".google.api.Distribution.BucketOptions.explicitBuckets: object expected"); + message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.fromObject(object.explicitBuckets); + } + return message; + }; + + /** + * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {google.api.Distribution.BucketOptions} message BucketOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BucketOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { + object.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.toObject(message.linearBuckets, options); + if (options.oneofs) + object.options = "linearBuckets"; + } + if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { + object.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.toObject(message.exponentialBuckets, options); + if (options.oneofs) + object.options = "exponentialBuckets"; + } + if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { + object.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.toObject(message.explicitBuckets, options); + if (options.oneofs) + object.options = "explicitBuckets"; + } + return object; + }; + + /** + * Converts this BucketOptions to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions + * @instance + * @returns {Object.} JSON object + */ + BucketOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BucketOptions + * @function getTypeUrl + * @memberof google.api.Distribution.BucketOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BucketOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Distribution.BucketOptions"; + }; + + BucketOptions.Linear = (function() { + + /** + * Properties of a Linear. + * @memberof google.api.Distribution.BucketOptions + * @interface ILinear + * @property {number|null} [numFiniteBuckets] Linear numFiniteBuckets + * @property {number|null} [width] Linear width + * @property {number|null} [offset] Linear offset + */ + + /** + * Constructs a new Linear. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents a Linear. + * @implements ILinear + * @constructor + * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set + */ + function Linear(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]]; + } + + /** + * Linear numFiniteBuckets. + * @member {number} numFiniteBuckets + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.numFiniteBuckets = 0; + + /** + * Linear width. + * @member {number} width + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.width = 0; + + /** + * Linear offset. + * @member {number} offset + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + */ + Linear.prototype.offset = 0; + + /** + * Creates a new Linear instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Linear} Linear instance + */ + Linear.create = function create(properties) { + return new Linear(properties); + }; + + /** + * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Linear.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); + if (message.width != null && Object.hasOwnProperty.call(message, "width")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.width); + if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.offset); + return writer; + }; + + /** + * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Linear.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Linear message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Linear} Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Linear.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Linear(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.numFiniteBuckets = reader.int32(); + break; + } + case 2: { + message.width = reader.double(); + break; + } + case 3: { + message.offset = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Linear message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Linear} Linear + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Linear.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Linear message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Linear.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (!$util.isInteger(message.numFiniteBuckets)) + return "numFiniteBuckets: integer expected"; + if (message.width != null && message.hasOwnProperty("width")) + if (typeof message.width !== "number") + return "width: number expected"; + if (message.offset != null && message.hasOwnProperty("offset")) + if (typeof message.offset !== "number") + return "offset: number expected"; + return null; + }; + + /** + * Creates a Linear message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Linear} Linear + */ + Linear.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Linear) + return object; + var message = new $root.google.api.Distribution.BucketOptions.Linear(); + if (object.numFiniteBuckets != null) + message.numFiniteBuckets = object.numFiniteBuckets | 0; + if (object.width != null) + message.width = Number(object.width); + if (object.offset != null) + message.offset = Number(object.offset); + return message; + }; + + /** + * Creates a plain object from a Linear message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {google.api.Distribution.BucketOptions.Linear} message Linear + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Linear.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.numFiniteBuckets = 0; + object.width = 0; + object.offset = 0; + } + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + object.numFiniteBuckets = message.numFiniteBuckets; + if (message.width != null && message.hasOwnProperty("width")) + object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; + if (message.offset != null && message.hasOwnProperty("offset")) + object.offset = options.json && !isFinite(message.offset) ? String(message.offset) : message.offset; + return object; + }; + + /** + * Converts this Linear to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Linear + * @instance + * @returns {Object.} JSON object + */ + Linear.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Linear + * @function getTypeUrl + * @memberof google.api.Distribution.BucketOptions.Linear + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Linear.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Distribution.BucketOptions.Linear"; + }; + + return Linear; + })(); + + BucketOptions.Exponential = (function() { + + /** + * Properties of an Exponential. + * @memberof google.api.Distribution.BucketOptions + * @interface IExponential + * @property {number|null} [numFiniteBuckets] Exponential numFiniteBuckets + * @property {number|null} [growthFactor] Exponential growthFactor + * @property {number|null} [scale] Exponential scale + */ + + /** + * Constructs a new Exponential. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents an Exponential. + * @implements IExponential + * @constructor + * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set + */ + function Exponential(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]]; + } + + /** + * Exponential numFiniteBuckets. + * @member {number} numFiniteBuckets + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.numFiniteBuckets = 0; + + /** + * Exponential growthFactor. + * @member {number} growthFactor + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.growthFactor = 0; + + /** + * Exponential scale. + * @member {number} scale + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + */ + Exponential.prototype.scale = 0; + + /** + * Creates a new Exponential instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential instance + */ + Exponential.create = function create(properties) { + return new Exponential(properties); + }; + + /** + * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exponential.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); + if (message.growthFactor != null && Object.hasOwnProperty.call(message, "growthFactor")) + writer.uint32(/* id 2, wireType 1 =*/17).double(message.growthFactor); + if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) + writer.uint32(/* id 3, wireType 1 =*/25).double(message.scale); + return writer; + }; + + /** + * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exponential.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Exponential message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exponential.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Exponential(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.numFiniteBuckets = reader.int32(); + break; + } + case 2: { + message.growthFactor = reader.double(); + break; + } + case 3: { + message.scale = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Exponential message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exponential.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Exponential message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exponential.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + if (!$util.isInteger(message.numFiniteBuckets)) + return "numFiniteBuckets: integer expected"; + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + if (typeof message.growthFactor !== "number") + return "growthFactor: number expected"; + if (message.scale != null && message.hasOwnProperty("scale")) + if (typeof message.scale !== "number") + return "scale: number expected"; + return null; + }; + + /** + * Creates an Exponential message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential + */ + Exponential.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Exponential) + return object; + var message = new $root.google.api.Distribution.BucketOptions.Exponential(); + if (object.numFiniteBuckets != null) + message.numFiniteBuckets = object.numFiniteBuckets | 0; + if (object.growthFactor != null) + message.growthFactor = Number(object.growthFactor); + if (object.scale != null) + message.scale = Number(object.scale); + return message; + }; + + /** + * Creates a plain object from an Exponential message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {google.api.Distribution.BucketOptions.Exponential} message Exponential + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exponential.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.numFiniteBuckets = 0; + object.growthFactor = 0; + object.scale = 0; + } + if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) + object.numFiniteBuckets = message.numFiniteBuckets; + if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) + object.growthFactor = options.json && !isFinite(message.growthFactor) ? String(message.growthFactor) : message.growthFactor; + if (message.scale != null && message.hasOwnProperty("scale")) + object.scale = options.json && !isFinite(message.scale) ? String(message.scale) : message.scale; + return object; + }; + + /** + * Converts this Exponential to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Exponential + * @instance + * @returns {Object.} JSON object + */ + Exponential.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Exponential + * @function getTypeUrl + * @memberof google.api.Distribution.BucketOptions.Exponential + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Exponential.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Distribution.BucketOptions.Exponential"; + }; + + return Exponential; + })(); + + BucketOptions.Explicit = (function() { + + /** + * Properties of an Explicit. + * @memberof google.api.Distribution.BucketOptions + * @interface IExplicit + * @property {Array.|null} [bounds] Explicit bounds + */ + + /** + * Constructs a new Explicit. + * @memberof google.api.Distribution.BucketOptions + * @classdesc Represents an Explicit. + * @implements IExplicit + * @constructor + * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set + */ + function Explicit(properties) { + this.bounds = []; + 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]]; + } + + /** + * Explicit bounds. + * @member {Array.} bounds + * @memberof google.api.Distribution.BucketOptions.Explicit + * @instance + */ + Explicit.prototype.bounds = $util.emptyArray; + + /** + * Creates a new Explicit instance using the specified properties. + * @function create + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit instance + */ + Explicit.create = function create(properties) { + return new Explicit(properties); + }; + + /** + * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Explicit.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.bounds != null && message.bounds.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.bounds.length; ++i) + writer.double(message.bounds[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Explicit.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Explicit message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Explicit.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Explicit(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.bounds && message.bounds.length)) + message.bounds = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.bounds.push(reader.double()); + } else + message.bounds.push(reader.double()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Explicit message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Explicit.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Explicit message. + * @function verify + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Explicit.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.bounds != null && message.hasOwnProperty("bounds")) { + if (!Array.isArray(message.bounds)) + return "bounds: array expected"; + for (var i = 0; i < message.bounds.length; ++i) + if (typeof message.bounds[i] !== "number") + return "bounds: number[] expected"; + } + return null; + }; + + /** + * Creates an Explicit message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit + */ + Explicit.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.BucketOptions.Explicit) + return object; + var message = new $root.google.api.Distribution.BucketOptions.Explicit(); + if (object.bounds) { + if (!Array.isArray(object.bounds)) + throw TypeError(".google.api.Distribution.BucketOptions.Explicit.bounds: array expected"); + message.bounds = []; + for (var i = 0; i < object.bounds.length; ++i) + message.bounds[i] = Number(object.bounds[i]); + } + return message; + }; + + /** + * Creates a plain object from an Explicit message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {google.api.Distribution.BucketOptions.Explicit} message Explicit + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Explicit.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.bounds = []; + if (message.bounds && message.bounds.length) { + object.bounds = []; + for (var j = 0; j < message.bounds.length; ++j) + object.bounds[j] = options.json && !isFinite(message.bounds[j]) ? String(message.bounds[j]) : message.bounds[j]; + } + return object; + }; + + /** + * Converts this Explicit to JSON. + * @function toJSON + * @memberof google.api.Distribution.BucketOptions.Explicit + * @instance + * @returns {Object.} JSON object + */ + Explicit.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Explicit + * @function getTypeUrl + * @memberof google.api.Distribution.BucketOptions.Explicit + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Explicit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Distribution.BucketOptions.Explicit"; + }; + + return Explicit; + })(); + + return BucketOptions; + })(); + + Distribution.Exemplar = (function() { + + /** + * Properties of an Exemplar. + * @memberof google.api.Distribution + * @interface IExemplar + * @property {number|null} [value] Exemplar value + * @property {google.protobuf.ITimestamp|null} [timestamp] Exemplar timestamp + * @property {Array.|null} [attachments] Exemplar attachments + */ + + /** + * Constructs a new Exemplar. + * @memberof google.api.Distribution + * @classdesc Represents an Exemplar. + * @implements IExemplar + * @constructor + * @param {google.api.Distribution.IExemplar=} [properties] Properties to set + */ + function Exemplar(properties) { + this.attachments = []; + 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]]; + } + + /** + * Exemplar value. + * @member {number} value + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.value = 0; + + /** + * Exemplar timestamp. + * @member {google.protobuf.ITimestamp|null|undefined} timestamp + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.timestamp = null; + + /** + * Exemplar attachments. + * @member {Array.} attachments + * @memberof google.api.Distribution.Exemplar + * @instance + */ + Exemplar.prototype.attachments = $util.emptyArray; + + /** + * Creates a new Exemplar instance using the specified properties. + * @function create + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar=} [properties] Properties to set + * @returns {google.api.Distribution.Exemplar} Exemplar instance + */ + Exemplar.create = function create(properties) { + return new Exemplar(properties); + }; + + /** + * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @function encode + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); + if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) + $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.attachments != null && message.attachments.length) + for (var i = 0; i < message.attachments.length; ++i) + $root.google.protobuf.Any.encode(message.attachments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Exemplar.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Exemplar message from the specified reader or buffer. + * @function decode + * @memberof google.api.Distribution.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Distribution.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Exemplar(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.value = reader.double(); + break; + } + case 2: { + message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.attachments && message.attachments.length)) + message.attachments = []; + message.attachments.push($root.google.protobuf.Any.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Exemplar message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Distribution.Exemplar + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Distribution.Exemplar} Exemplar + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Exemplar.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Exemplar message. + * @function verify + * @memberof google.api.Distribution.Exemplar + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Exemplar.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (typeof message.value !== "number") + return "value: number expected"; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.timestamp); + if (error) + return "timestamp." + error; + } + if (message.attachments != null && message.hasOwnProperty("attachments")) { + if (!Array.isArray(message.attachments)) + return "attachments: array expected"; + for (var i = 0; i < message.attachments.length; ++i) { + var error = $root.google.protobuf.Any.verify(message.attachments[i]); + if (error) + return "attachments." + error; + } + } + return null; + }; + + /** + * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Distribution.Exemplar + * @static + * @param {Object.} object Plain object + * @returns {google.api.Distribution.Exemplar} Exemplar + */ + Exemplar.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Distribution.Exemplar) + return object; + var message = new $root.google.api.Distribution.Exemplar(); + if (object.value != null) + message.value = Number(object.value); + if (object.timestamp != null) { + if (typeof object.timestamp !== "object") + throw TypeError(".google.api.Distribution.Exemplar.timestamp: object expected"); + message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); + } + if (object.attachments) { + if (!Array.isArray(object.attachments)) + throw TypeError(".google.api.Distribution.Exemplar.attachments: array expected"); + message.attachments = []; + for (var i = 0; i < object.attachments.length; ++i) { + if (typeof object.attachments[i] !== "object") + throw TypeError(".google.api.Distribution.Exemplar.attachments: object expected"); + message.attachments[i] = $root.google.protobuf.Any.fromObject(object.attachments[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an Exemplar message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Distribution.Exemplar + * @static + * @param {google.api.Distribution.Exemplar} message Exemplar + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Exemplar.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.attachments = []; + if (options.defaults) { + object.value = 0; + object.timestamp = null; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; + if (message.timestamp != null && message.hasOwnProperty("timestamp")) + object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); + if (message.attachments && message.attachments.length) { + object.attachments = []; + for (var j = 0; j < message.attachments.length; ++j) + object.attachments[j] = $root.google.protobuf.Any.toObject(message.attachments[j], options); + } + return object; + }; + + /** + * Converts this Exemplar to JSON. + * @function toJSON + * @memberof google.api.Distribution.Exemplar + * @instance + * @returns {Object.} JSON object + */ + Exemplar.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Exemplar + * @function getTypeUrl + * @memberof google.api.Distribution.Exemplar + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Exemplar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Distribution.Exemplar"; + }; + + return Exemplar; + })(); + + return Distribution; + })(); + + api.MetricDescriptor = (function() { + + /** + * Properties of a MetricDescriptor. + * @memberof google.api + * @interface IMetricDescriptor + * @property {string|null} [name] MetricDescriptor name + * @property {string|null} [type] MetricDescriptor type + * @property {Array.|null} [labels] MetricDescriptor labels + * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] MetricDescriptor metricKind + * @property {google.api.MetricDescriptor.ValueType|null} [valueType] MetricDescriptor valueType + * @property {string|null} [unit] MetricDescriptor unit + * @property {string|null} [description] MetricDescriptor description + * @property {string|null} [displayName] MetricDescriptor displayName + * @property {google.api.MetricDescriptor.IMetricDescriptorMetadata|null} [metadata] MetricDescriptor metadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptor launchStage + * @property {Array.|null} [monitoredResourceTypes] MetricDescriptor monitoredResourceTypes + */ + + /** + * Constructs a new MetricDescriptor. + * @memberof google.api + * @classdesc Represents a MetricDescriptor. + * @implements IMetricDescriptor + * @constructor + * @param {google.api.IMetricDescriptor=} [properties] Properties to set + */ + function MetricDescriptor(properties) { + this.labels = []; + this.monitoredResourceTypes = []; + 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]]; + } + + /** + * MetricDescriptor name. + * @member {string} name + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.name = ""; + + /** + * MetricDescriptor type. + * @member {string} type + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.type = ""; + + /** + * MetricDescriptor labels. + * @member {Array.} labels + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.labels = $util.emptyArray; + + /** + * MetricDescriptor metricKind. + * @member {google.api.MetricDescriptor.MetricKind} metricKind + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.metricKind = 0; + + /** + * MetricDescriptor valueType. + * @member {google.api.MetricDescriptor.ValueType} valueType + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.valueType = 0; + + /** + * MetricDescriptor unit. + * @member {string} unit + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.unit = ""; + + /** + * MetricDescriptor description. + * @member {string} description + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.description = ""; + + /** + * MetricDescriptor displayName. + * @member {string} displayName + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.displayName = ""; + + /** + * MetricDescriptor metadata. + * @member {google.api.MetricDescriptor.IMetricDescriptorMetadata|null|undefined} metadata + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.metadata = null; + + /** + * MetricDescriptor launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.launchStage = 0; + + /** + * MetricDescriptor monitoredResourceTypes. + * @member {Array.} monitoredResourceTypes + * @memberof google.api.MetricDescriptor + * @instance + */ + MetricDescriptor.prototype.monitoredResourceTypes = $util.emptyArray; + + /** + * Creates a new MetricDescriptor instance using the specified properties. + * @function create + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.IMetricDescriptor=} [properties] Properties to set + * @returns {google.api.MetricDescriptor} MetricDescriptor instance + */ + MetricDescriptor.create = function create(properties) { + return new MetricDescriptor(properties); + }; + + /** + * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.labels != null && message.labels.length) + for (var i = 0; i < message.labels.length; ++i) + $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); + if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); + if (message.monitoredResourceTypes != null && message.monitoredResourceTypes.length) + for (var i = 0; i < message.monitoredResourceTypes.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.monitoredResourceTypes[i]); + return writer; + }; + + /** + * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.MetricDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MetricDescriptor} MetricDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptor.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 8: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.labels && message.labels.length)) + message.labels = []; + message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); + break; + } + case 3: { + message.metricKind = reader.int32(); + break; + } + case 4: { + message.valueType = reader.int32(); + break; + } + case 5: { + message.unit = reader.string(); + break; + } + case 6: { + message.description = reader.string(); + break; + } + case 7: { + message.displayName = reader.string(); + break; + } + case 10: { + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); + break; + } + case 12: { + message.launchStage = reader.int32(); + break; + } + case 13: { + if (!(message.monitoredResourceTypes && message.monitoredResourceTypes.length)) + message.monitoredResourceTypes = []; + message.monitoredResourceTypes.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MetricDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MetricDescriptor} MetricDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricDescriptor message. + * @function verify + * @memberof google.api.MetricDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!Array.isArray(message.labels)) + return "labels: array expected"; + for (var i = 0; i < message.labels.length; ++i) { + var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); + if (error) + return "labels." + error; + } + } + 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.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.unit != null && message.hasOwnProperty("unit")) + if (!$util.isString(message.unit)) + return "unit: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.monitoredResourceTypes != null && message.hasOwnProperty("monitoredResourceTypes")) { + if (!Array.isArray(message.monitoredResourceTypes)) + return "monitoredResourceTypes: array expected"; + for (var i = 0; i < message.monitoredResourceTypes.length; ++i) + if (!$util.isString(message.monitoredResourceTypes[i])) + return "monitoredResourceTypes: string[] expected"; + } + return null; + }; + + /** + * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MetricDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.MetricDescriptor} MetricDescriptor + */ + MetricDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor) + return object; + var message = new $root.google.api.MetricDescriptor(); + if (object.name != null) + message.name = String(object.name); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (!Array.isArray(object.labels)) + throw TypeError(".google.api.MetricDescriptor.labels: array expected"); + message.labels = []; + for (var i = 0; i < object.labels.length; ++i) { + if (typeof object.labels[i] !== "object") + throw TypeError(".google.api.MetricDescriptor.labels: object expected"); + message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); + } + } + 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; + } + 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.unit != null) + message.unit = String(object.unit); + if (object.description != null) + message.description = String(object.description); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.api.MetricDescriptor.metadata: object expected"); + message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); + } + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.monitoredResourceTypes) { + if (!Array.isArray(object.monitoredResourceTypes)) + throw TypeError(".google.api.MetricDescriptor.monitoredResourceTypes: array expected"); + message.monitoredResourceTypes = []; + for (var i = 0; i < object.monitoredResourceTypes.length; ++i) + message.monitoredResourceTypes[i] = String(object.monitoredResourceTypes[i]); + } + return message; + }; + + /** + * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MetricDescriptor + * @static + * @param {google.api.MetricDescriptor} message MetricDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.labels = []; + object.monitoredResourceTypes = []; + } + if (options.defaults) { + object.name = ""; + object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; + object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; + object.unit = ""; + object.description = ""; + object.displayName = ""; + object.type = ""; + object.metadata = null; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.labels && message.labels.length) { + object.labels = []; + for (var j = 0; j < message.labels.length; ++j) + object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); + } + 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.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.unit != null && message.hasOwnProperty("unit")) + object.unit = message.unit; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.monitoredResourceTypes && message.monitoredResourceTypes.length) { + object.monitoredResourceTypes = []; + for (var j = 0; j < message.monitoredResourceTypes.length; ++j) + object.monitoredResourceTypes[j] = message.monitoredResourceTypes[j]; + } + return object; + }; + + /** + * Converts this MetricDescriptor to JSON. + * @function toJSON + * @memberof google.api.MetricDescriptor + * @instance + * @returns {Object.} JSON object + */ + MetricDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricDescriptor + * @function getTypeUrl + * @memberof google.api.MetricDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MetricDescriptor"; + }; + + /** + * MetricKind enum. + * @name google.api.MetricDescriptor.MetricKind + * @enum {number} + * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value + * @property {number} GAUGE=1 GAUGE value + * @property {number} DELTA=2 DELTA value + * @property {number} CUMULATIVE=3 CUMULATIVE value + */ + MetricDescriptor.MetricKind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "GAUGE"] = 1; + values[valuesById[2] = "DELTA"] = 2; + values[valuesById[3] = "CUMULATIVE"] = 3; + return values; + })(); + + /** + * ValueType enum. + * @name google.api.MetricDescriptor.ValueType + * @enum {number} + * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + * @property {number} DOUBLE=3 DOUBLE value + * @property {number} STRING=4 STRING value + * @property {number} DISTRIBUTION=5 DISTRIBUTION value + * @property {number} MONEY=6 MONEY value + */ + MetricDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + values[valuesById[3] = "DOUBLE"] = 3; + values[valuesById[4] = "STRING"] = 4; + values[valuesById[5] = "DISTRIBUTION"] = 5; + values[valuesById[6] = "MONEY"] = 6; + return values; + })(); + + MetricDescriptor.MetricDescriptorMetadata = (function() { + + /** + * Properties of a MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @interface IMetricDescriptorMetadata + * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptorMetadata launchStage + * @property {google.protobuf.IDuration|null} [samplePeriod] MetricDescriptorMetadata samplePeriod + * @property {google.protobuf.IDuration|null} [ingestDelay] MetricDescriptorMetadata ingestDelay + * @property {Array.|null} [timeSeriesResourceHierarchyLevel] MetricDescriptorMetadata timeSeriesResourceHierarchyLevel + */ + + /** + * Constructs a new MetricDescriptorMetadata. + * @memberof google.api.MetricDescriptor + * @classdesc Represents a MetricDescriptorMetadata. + * @implements IMetricDescriptorMetadata + * @constructor + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set + */ + function MetricDescriptorMetadata(properties) { + this.timeSeriesResourceHierarchyLevel = []; + 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]]; + } + + /** + * MetricDescriptorMetadata launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.launchStage = 0; + + /** + * MetricDescriptorMetadata samplePeriod. + * @member {google.protobuf.IDuration|null|undefined} samplePeriod + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.samplePeriod = null; + + /** + * MetricDescriptorMetadata ingestDelay. + * @member {google.protobuf.IDuration|null|undefined} ingestDelay + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.ingestDelay = null; + + /** + * MetricDescriptorMetadata timeSeriesResourceHierarchyLevel. + * @member {Array.} timeSeriesResourceHierarchyLevel + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + */ + MetricDescriptorMetadata.prototype.timeSeriesResourceHierarchyLevel = $util.emptyArray; + + /** + * Creates a new MetricDescriptorMetadata instance using the specified properties. + * @function create + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata instance + */ + MetricDescriptorMetadata.create = function create(properties) { + return new MetricDescriptorMetadata(properties); + }; + + /** + * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @function encode + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptorMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); + if (message.samplePeriod != null && Object.hasOwnProperty.call(message, "samplePeriod")) + $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.ingestDelay != null && Object.hasOwnProperty.call(message, "ingestDelay")) + $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.timeSeriesResourceHierarchyLevel != null && message.timeSeriesResourceHierarchyLevel.length) { + writer.uint32(/* id 4, wireType 2 =*/34).fork(); + for (var i = 0; i < message.timeSeriesResourceHierarchyLevel.length; ++i) + writer.int32(message.timeSeriesResourceHierarchyLevel[i]); + writer.ldelim(); + } + return writer; + }; + + /** + * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MetricDescriptorMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptorMetadata.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.launchStage = reader.int32(); + break; + } + case 2: { + message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 3: { + message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.timeSeriesResourceHierarchyLevel && message.timeSeriesResourceHierarchyLevel.length)) + message.timeSeriesResourceHierarchyLevel = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.timeSeriesResourceHierarchyLevel.push(reader.int32()); + } else + message.timeSeriesResourceHierarchyLevel.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MetricDescriptorMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MetricDescriptorMetadata message. + * @function verify + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MetricDescriptorMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) { + var error = $root.google.protobuf.Duration.verify(message.samplePeriod); + if (error) + return "samplePeriod." + error; + } + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) { + var error = $root.google.protobuf.Duration.verify(message.ingestDelay); + if (error) + return "ingestDelay." + error; + } + if (message.timeSeriesResourceHierarchyLevel != null && message.hasOwnProperty("timeSeriesResourceHierarchyLevel")) { + if (!Array.isArray(message.timeSeriesResourceHierarchyLevel)) + return "timeSeriesResourceHierarchyLevel: array expected"; + for (var i = 0; i < message.timeSeriesResourceHierarchyLevel.length; ++i) + switch (message.timeSeriesResourceHierarchyLevel[i]) { + default: + return "timeSeriesResourceHierarchyLevel: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata + */ + MetricDescriptorMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MetricDescriptor.MetricDescriptorMetadata) + return object; + var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.samplePeriod != null) { + if (typeof object.samplePeriod !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.samplePeriod: object expected"); + message.samplePeriod = $root.google.protobuf.Duration.fromObject(object.samplePeriod); + } + if (object.ingestDelay != null) { + if (typeof object.ingestDelay !== "object") + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.ingestDelay: object expected"); + message.ingestDelay = $root.google.protobuf.Duration.fromObject(object.ingestDelay); + } + if (object.timeSeriesResourceHierarchyLevel) { + if (!Array.isArray(object.timeSeriesResourceHierarchyLevel)) + throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.timeSeriesResourceHierarchyLevel: array expected"); + message.timeSeriesResourceHierarchyLevel = []; + for (var i = 0; i < object.timeSeriesResourceHierarchyLevel.length; ++i) + switch (object.timeSeriesResourceHierarchyLevel[i]) { + default: + if (typeof object.timeSeriesResourceHierarchyLevel[i] === "number") { + message.timeSeriesResourceHierarchyLevel[i] = object.timeSeriesResourceHierarchyLevel[i]; + break; + } + case "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED": + case 0: + message.timeSeriesResourceHierarchyLevel[i] = 0; + break; + case "PROJECT": + case 1: + message.timeSeriesResourceHierarchyLevel[i] = 1; + break; + case "ORGANIZATION": + case 2: + message.timeSeriesResourceHierarchyLevel[i] = 2; + break; + case "FOLDER": + case 3: + message.timeSeriesResourceHierarchyLevel[i] = 3; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {google.api.MetricDescriptor.MetricDescriptorMetadata} message MetricDescriptorMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MetricDescriptorMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.timeSeriesResourceHierarchyLevel = []; + if (options.defaults) { + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.samplePeriod = null; + object.ingestDelay = null; + } + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) + object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); + if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) + object.ingestDelay = $root.google.protobuf.Duration.toObject(message.ingestDelay, options); + if (message.timeSeriesResourceHierarchyLevel && message.timeSeriesResourceHierarchyLevel.length) { + object.timeSeriesResourceHierarchyLevel = []; + for (var j = 0; j < message.timeSeriesResourceHierarchyLevel.length; ++j) + object.timeSeriesResourceHierarchyLevel[j] = options.enums === String ? $root.google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel[message.timeSeriesResourceHierarchyLevel[j]] === undefined ? message.timeSeriesResourceHierarchyLevel[j] : $root.google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel[message.timeSeriesResourceHierarchyLevel[j]] : message.timeSeriesResourceHierarchyLevel[j]; + } + return object; + }; + + /** + * Converts this MetricDescriptorMetadata to JSON. + * @function toJSON + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @instance + * @returns {Object.} JSON object + */ + MetricDescriptorMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MetricDescriptorMetadata + * @function getTypeUrl + * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MetricDescriptorMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MetricDescriptor.MetricDescriptorMetadata"; + }; + + /** + * TimeSeriesResourceHierarchyLevel enum. + * @name google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel + * @enum {number} + * @property {number} TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED=0 TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED value + * @property {number} PROJECT=1 PROJECT value + * @property {number} ORGANIZATION=2 ORGANIZATION value + * @property {number} FOLDER=3 FOLDER value + */ + MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "PROJECT"] = 1; + values[valuesById[2] = "ORGANIZATION"] = 2; + values[valuesById[3] = "FOLDER"] = 3; + return values; + })(); + + return MetricDescriptorMetadata; + })(); + + return MetricDescriptor; + })(); + + api.Metric = (function() { + + /** + * Properties of a Metric. + * @memberof google.api + * @interface IMetric + * @property {string|null} [type] Metric type + * @property {Object.|null} [labels] Metric labels + */ + + /** + * Constructs a new Metric. + * @memberof google.api + * @classdesc Represents a Metric. + * @implements IMetric + * @constructor + * @param {google.api.IMetric=} [properties] Properties to set + */ + function Metric(properties) { + this.labels = {}; + 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]]; + } + + /** + * Metric type. + * @member {string} type + * @memberof google.api.Metric + * @instance + */ + Metric.prototype.type = ""; + + /** + * Metric labels. + * @member {Object.} labels + * @memberof google.api.Metric + * @instance + */ + Metric.prototype.labels = $util.emptyObject; + + /** + * Creates a new Metric instance using the specified properties. + * @function create + * @memberof google.api.Metric + * @static + * @param {google.api.IMetric=} [properties] Properties to set + * @returns {google.api.Metric} Metric instance + */ + Metric.create = function create(properties) { + return new Metric(properties); + }; + + /** + * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @function encode + * @memberof google.api.Metric + * @static + * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) + for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + return writer; + }; + + /** + * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Metric + * @static + * @param {google.api.IMetric} message Metric message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Metric.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Metric message from the specified reader or buffer. + * @function decode + * @memberof google.api.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Metric(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.type = reader.string(); + break; + } + case 2: { + if (message.labels === $util.emptyObject) + message.labels = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.labels[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Metric message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Metric + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Metric} Metric + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Metric.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Metric message. + * @function verify + * @memberof google.api.Metric + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Metric.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.labels != null && message.hasOwnProperty("labels")) { + if (!$util.isObject(message.labels)) + return "labels: object expected"; + var key = Object.keys(message.labels); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.labels[key[i]])) + return "labels: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a Metric message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Metric + * @static + * @param {Object.} object Plain object + * @returns {google.api.Metric} Metric + */ + Metric.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Metric) + return object; + var message = new $root.google.api.Metric(); + if (object.type != null) + message.type = String(object.type); + if (object.labels) { + if (typeof object.labels !== "object") + throw TypeError(".google.api.Metric.labels: object expected"); + message.labels = {}; + for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) + message.labels[keys[i]] = String(object.labels[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a Metric message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Metric + * @static + * @param {google.api.Metric} message Metric + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Metric.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.labels = {}; + if (options.defaults) + object.type = ""; + var keys2; + if (message.labels && (keys2 = Object.keys(message.labels)).length) { + object.labels = {}; + for (var j = 0; j < keys2.length; ++j) + object.labels[keys2[j]] = message.labels[keys2[j]]; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + return object; + }; + + /** + * Converts this Metric to JSON. + * @function toJSON + * @memberof google.api.Metric + * @instance + * @returns {Object.} JSON object + */ + Metric.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Metric + * @function getTypeUrl + * @memberof google.api.Metric + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Metric"; + }; + + return Metric; + })(); + + api.LabelDescriptor = (function() { + + /** + * Properties of a LabelDescriptor. + * @memberof google.api + * @interface ILabelDescriptor + * @property {string|null} [key] LabelDescriptor key + * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType + * @property {string|null} [description] LabelDescriptor description + */ + + /** + * Constructs a new LabelDescriptor. + * @memberof google.api + * @classdesc Represents a LabelDescriptor. + * @implements ILabelDescriptor + * @constructor + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + */ + function LabelDescriptor(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]]; + } + + /** + * LabelDescriptor key. + * @member {string} key + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.key = ""; + + /** + * LabelDescriptor valueType. + * @member {google.api.LabelDescriptor.ValueType} valueType + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.valueType = 0; + + /** + * LabelDescriptor description. + * @member {string} description + * @memberof google.api.LabelDescriptor + * @instance + */ + LabelDescriptor.prototype.description = ""; + + /** + * Creates a new LabelDescriptor instance using the specified properties. + * @function create + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor=} [properties] Properties to set + * @returns {google.api.LabelDescriptor} LabelDescriptor instance + */ + LabelDescriptor.create = function create(properties) { + return new LabelDescriptor(properties); + }; + + /** + * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @function encode + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelDescriptor.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.key != null && Object.hasOwnProperty.call(message, "key")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); + if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + return writer; + }; + + /** + * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer. + * @function decode + * @memberof google.api.LabelDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.LabelDescriptor} LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelDescriptor.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.key = reader.string(); + break; + } + case 2: { + message.valueType = reader.int32(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.LabelDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.LabelDescriptor} LabelDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LabelDescriptor message. + * @function verify + * @memberof google.api.LabelDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LabelDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.key != null && message.hasOwnProperty("key")) + if (!$util.isString(message.key)) + return "key: string expected"; + if (message.valueType != null && message.hasOwnProperty("valueType")) + switch (message.valueType) { + default: + return "valueType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.LabelDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.LabelDescriptor} LabelDescriptor + */ + LabelDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.LabelDescriptor) + return object; + var message = new $root.google.api.LabelDescriptor(); + if (object.key != null) + message.key = String(object.key); + switch (object.valueType) { + default: + if (typeof object.valueType === "number") { + message.valueType = object.valueType; + break; + } + break; + case "STRING": + case 0: + message.valueType = 0; + break; + case "BOOL": + case 1: + message.valueType = 1; + break; + case "INT64": + case 2: + message.valueType = 2; + break; + } + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.LabelDescriptor + * @static + * @param {google.api.LabelDescriptor} message LabelDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LabelDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.key = ""; + object.valueType = options.enums === String ? "STRING" : 0; + object.description = ""; + } + if (message.key != null && message.hasOwnProperty("key")) + object.key = message.key; + if (message.valueType != null && message.hasOwnProperty("valueType")) + object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] === undefined ? message.valueType : $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this LabelDescriptor to JSON. + * @function toJSON + * @memberof google.api.LabelDescriptor + * @instance + * @returns {Object.} JSON object + */ + LabelDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LabelDescriptor + * @function getTypeUrl + * @memberof google.api.LabelDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LabelDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.LabelDescriptor"; + }; + + /** + * ValueType enum. + * @name google.api.LabelDescriptor.ValueType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} BOOL=1 BOOL value + * @property {number} INT64=2 INT64 value + */ + LabelDescriptor.ValueType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "BOOL"] = 1; + values[valuesById[2] = "INT64"] = 2; + return values; + })(); + + return LabelDescriptor; + })(); + + /** + * LaunchStage enum. + * @name google.api.LaunchStage + * @enum {number} + * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value + * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value + * @property {number} PRELAUNCH=7 PRELAUNCH value + * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value + * @property {number} ALPHA=2 ALPHA value + * @property {number} BETA=3 BETA value + * @property {number} GA=4 GA value + * @property {number} DEPRECATED=5 DEPRECATED value + */ + api.LaunchStage = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; + values[valuesById[6] = "UNIMPLEMENTED"] = 6; + values[valuesById[7] = "PRELAUNCH"] = 7; + values[valuesById[1] = "EARLY_ACCESS"] = 1; + values[valuesById[2] = "ALPHA"] = 2; + values[valuesById[3] = "BETA"] = 3; + values[valuesById[4] = "GA"] = 4; + values[valuesById[5] = "DEPRECATED"] = 5; + return values; + })(); + + api.Http = (function() { + + /** + * Properties of a Http. + * @memberof google.api + * @interface IHttp + * @property {Array.|null} [rules] Http rules + * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + */ + + /** + * Constructs a new Http. + * @memberof google.api + * @classdesc Represents a Http. + * @implements IHttp + * @constructor + * @param {google.api.IHttp=} [properties] Properties to set + */ + function Http(properties) { + this.rules = []; + 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]]; + } + + /** + * Http rules. + * @member {Array.} rules + * @memberof google.api.Http + * @instance + */ + Http.prototype.rules = $util.emptyArray; + + /** + * Http fullyDecodeReservedExpansion. + * @member {boolean} fullyDecodeReservedExpansion + * @memberof google.api.Http + * @instance + */ + Http.prototype.fullyDecodeReservedExpansion = false; + + /** + * Creates a new Http instance using the specified properties. + * @function create + * @memberof google.api.Http + * @static + * @param {google.api.IHttp=} [properties] Properties to set + * @returns {google.api.Http} Http instance + */ + Http.create = function create(properties) { + return new Http(properties); + }; + + /** + * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encode + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rules != null && message.rules.length) + for (var i = 0; i < message.rules.length; ++i) + $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); + return writer; + }; + + /** + * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Http + * @static + * @param {google.api.IHttp} message Http message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Http.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Http message from the specified reader or buffer. + * @function decode + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + 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]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(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]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + api.CommonLanguageSettings = (function() { + + /** + * Properties of a CommonLanguageSettings. + * @memberof google.api + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration + */ + + /** + * Constructs a new CommonLanguageSettings. + * @memberof google.api + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings + * @constructor + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + */ + function CommonLanguageSettings(properties) { + this.destinations = []; + 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]]; + } + + /** + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.referenceDocsUri = ""; + + /** + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.destinations = $util.emptyArray; + + /** + * CommonLanguageSettings selectiveGapicGeneration. + * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration + * @memberof google.api.CommonLanguageSettings + * @instance + */ + CommonLanguageSettings.prototype.selectiveGapicGeneration = null; + + /** + * Creates a new CommonLanguageSettings instance using the specified properties. + * @function create + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + */ + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); + }; + + /** + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); + if (message.destinations != null && message.destinations.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.destinations.length; ++i) + writer.int32(message.destinations[i]); + writer.ldelim(); + } + if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) + $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.referenceDocsUri = reader.string(); + break; + } + case 2: { + if (!(message.destinations && message.destinations.length)) + message.destinations = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.destinations.push(reader.int32()); + } else + message.destinations.push(reader.int32()); + break; + } + case 3: { + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CommonLanguageSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CommonLanguageSettings message. + * @function verify + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CommonLanguageSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + if (!$util.isString(message.referenceDocsUri)) + return "referenceDocsUri: string expected"; + if (message.destinations != null && message.hasOwnProperty("destinations")) { + if (!Array.isArray(message.destinations)) + return "destinations: array expected"; + for (var i = 0; i < message.destinations.length; ++i) + switch (message.destinations[i]) { + default: + return "destinations: enum value[] expected"; + case 0: + case 10: + case 20: + break; + } + } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { + var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration); + if (error) + return "selectiveGapicGeneration." + error; + } + return null; + }; + + /** + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + */ + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) + return object; + var message = new $root.google.api.CommonLanguageSettings(); + if (object.referenceDocsUri != null) + message.referenceDocsUri = String(object.referenceDocsUri); + if (object.destinations) { + if (!Array.isArray(object.destinations)) + throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); + message.destinations = []; + for (var i = 0; i < object.destinations.length; ++i) + switch (object.destinations[i]) { + default: + if (typeof object.destinations[i] === "number") { + message.destinations[i] = object.destinations[i]; + break; + } + case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": + case 0: + message.destinations[i] = 0; + break; + case "GITHUB": + case 10: + message.destinations[i] = 10; + break; + case "PACKAGE_MANAGER": + case 20: + message.destinations[i] = 20; + break; + } + } + if (object.selectiveGapicGeneration != null) { + if (typeof object.selectiveGapicGeneration !== "object") + throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); + message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration); + } + return message; + }; + + /** + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CommonLanguageSettings + * @static + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CommonLanguageSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.destinations = []; + if (options.defaults) { + object.referenceDocsUri = ""; + object.selectiveGapicGeneration = null; + } + if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) + object.referenceDocsUri = message.referenceDocsUri; + if (message.destinations && message.destinations.length) { + object.destinations = []; + for (var j = 0; j < message.destinations.length; ++j) + object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; + } + if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) + object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); + return object; + }; + + /** + * Converts this CommonLanguageSettings to JSON. + * @function toJSON + * @memberof google.api.CommonLanguageSettings + * @instance + * @returns {Object.} JSON object + */ + CommonLanguageSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CommonLanguageSettings + * @function getTypeUrl + * @memberof google.api.CommonLanguageSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + }; + + return CommonLanguageSettings; + })(); + + api.ClientLibrarySettings = (function() { + + /** + * Properties of a ClientLibrarySettings. + * @memberof google.api + * @interface IClientLibrarySettings + * @property {string|null} [version] ClientLibrarySettings version + * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage + * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums + * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings + * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings + * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings + * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings + * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings + * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings + * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings + * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings + */ + + /** + * Constructs a new ClientLibrarySettings. + * @memberof google.api + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings + * @constructor + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + */ + function ClientLibrarySettings(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]]; + } + + /** + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.version = ""; + + /** + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.launchStage = 0; + + /** + * ClientLibrarySettings restNumericEnums. + * @member {boolean} restNumericEnums + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.restNumericEnums = false; + + /** + * ClientLibrarySettings javaSettings. + * @member {google.api.IJavaSettings|null|undefined} javaSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.javaSettings = null; + + /** + * ClientLibrarySettings cppSettings. + * @member {google.api.ICppSettings|null|undefined} cppSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.cppSettings = null; + + /** + * ClientLibrarySettings phpSettings. + * @member {google.api.IPhpSettings|null|undefined} phpSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.phpSettings = null; + + /** + * ClientLibrarySettings pythonSettings. + * @member {google.api.IPythonSettings|null|undefined} pythonSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.pythonSettings = null; + + /** + * ClientLibrarySettings nodeSettings. + * @member {google.api.INodeSettings|null|undefined} nodeSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.nodeSettings = null; + + /** + * ClientLibrarySettings dotnetSettings. + * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.dotnetSettings = null; + + /** + * ClientLibrarySettings rubySettings. + * @member {google.api.IRubySettings|null|undefined} rubySettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.rubySettings = null; + + /** + * ClientLibrarySettings goSettings. + * @member {google.api.IGoSettings|null|undefined} goSettings + * @memberof google.api.ClientLibrarySettings + * @instance + */ + ClientLibrarySettings.prototype.goSettings = null; + + /** + * Creates a new ClientLibrarySettings instance using the specified properties. + * @function create + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + */ + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); + }; + + /** + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.version != null && Object.hasOwnProperty.call(message, "version")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); + if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); + if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); + if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) + $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) + $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) + $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); + if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) + $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) + $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); + if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) + $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); + if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) + $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); + if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) + $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.version = reader.string(); + break; + } + case 2: { + message.launchStage = reader.int32(); + break; + } + case 3: { + message.restNumericEnums = reader.bool(); + break; + } + case 21: { + message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); + break; + } + case 22: { + message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); + break; + } + case 23: { + message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); + break; + } + case 24: { + message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); + break; + } + case 25: { + message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); + break; + } + case 26: { + message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); + break; + } + case 27: { + message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); + break; + } + case 28: { + message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ClientLibrarySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ClientLibrarySettings message. + * @function verify + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ClientLibrarySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.version != null && message.hasOwnProperty("version")) + if (!$util.isString(message.version)) + return "version: string expected"; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + switch (message.launchStage) { + default: + return "launchStage: enum value expected"; + case 0: + case 6: + case 7: + case 1: + case 2: + case 3: + case 4: + case 5: + break; + } + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + if (typeof message.restNumericEnums !== "boolean") + return "restNumericEnums: boolean expected"; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { + var error = $root.google.api.JavaSettings.verify(message.javaSettings); + if (error) + return "javaSettings." + error; + } + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { + var error = $root.google.api.CppSettings.verify(message.cppSettings); + if (error) + return "cppSettings." + error; + } + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { + var error = $root.google.api.PhpSettings.verify(message.phpSettings); + if (error) + return "phpSettings." + error; + } + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { + var error = $root.google.api.PythonSettings.verify(message.pythonSettings); + if (error) + return "pythonSettings." + error; + } + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { + var error = $root.google.api.NodeSettings.verify(message.nodeSettings); + if (error) + return "nodeSettings." + error; + } + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { + var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); + if (error) + return "dotnetSettings." + error; + } + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { + var error = $root.google.api.RubySettings.verify(message.rubySettings); + if (error) + return "rubySettings." + error; + } + if (message.goSettings != null && message.hasOwnProperty("goSettings")) { + var error = $root.google.api.GoSettings.verify(message.goSettings); + if (error) + return "goSettings." + error; + } + return null; + }; + + /** + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + */ + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) + return object; + var message = new $root.google.api.ClientLibrarySettings(); + if (object.version != null) + message.version = String(object.version); + switch (object.launchStage) { + default: + if (typeof object.launchStage === "number") { + message.launchStage = object.launchStage; + break; + } + break; + case "LAUNCH_STAGE_UNSPECIFIED": + case 0: + message.launchStage = 0; + break; + case "UNIMPLEMENTED": + case 6: + message.launchStage = 6; + break; + case "PRELAUNCH": + case 7: + message.launchStage = 7; + break; + case "EARLY_ACCESS": + case 1: + message.launchStage = 1; + break; + case "ALPHA": + case 2: + message.launchStage = 2; + break; + case "BETA": + case 3: + message.launchStage = 3; + break; + case "GA": + case 4: + message.launchStage = 4; + break; + case "DEPRECATED": + case 5: + message.launchStage = 5; + break; + } + if (object.restNumericEnums != null) + message.restNumericEnums = Boolean(object.restNumericEnums); + if (object.javaSettings != null) { + if (typeof object.javaSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); + message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); + } + if (object.cppSettings != null) { + if (typeof object.cppSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); + message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); + } + if (object.phpSettings != null) { + if (typeof object.phpSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); + message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); + } + if (object.pythonSettings != null) { + if (typeof object.pythonSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); + message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); + } + if (object.nodeSettings != null) { + if (typeof object.nodeSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); + message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); + } + if (object.dotnetSettings != null) { + if (typeof object.dotnetSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); + message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); + } + if (object.rubySettings != null) { + if (typeof object.rubySettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); + message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); + } + if (object.goSettings != null) { + if (typeof object.goSettings !== "object") + throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); + message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + } + return message; + }; + + /** + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ClientLibrarySettings + * @static + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ClientLibrarySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.version = ""; + object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; + object.restNumericEnums = false; + object.javaSettings = null; + object.cppSettings = null; + object.phpSettings = null; + object.pythonSettings = null; + object.nodeSettings = null; + object.dotnetSettings = null; + object.rubySettings = null; + object.goSettings = null; + } + if (message.version != null && message.hasOwnProperty("version")) + object.version = message.version; + if (message.launchStage != null && message.hasOwnProperty("launchStage")) + object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; + if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) + object.restNumericEnums = message.restNumericEnums; + if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) + object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); + if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) + object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); + if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) + object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); + if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) + object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); + if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) + object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); + if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) + object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); + if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) + object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); + if (message.goSettings != null && message.hasOwnProperty("goSettings")) + object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); + return object; + }; + + /** + * Converts this ClientLibrarySettings to JSON. + * @function toJSON + * @memberof google.api.ClientLibrarySettings + * @instance + * @returns {Object.} JSON object + */ + ClientLibrarySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ClientLibrarySettings + * @function getTypeUrl + * @memberof google.api.ClientLibrarySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + }; + + return ClientLibrarySettings; + })(); + + api.Publishing = (function() { + + /** + * Properties of a Publishing. + * @memberof google.api + * @interface IPublishing + * @property {Array.|null} [methodSettings] Publishing methodSettings + * @property {string|null} [newIssueUri] Publishing newIssueUri + * @property {string|null} [documentationUri] Publishing documentationUri + * @property {string|null} [apiShortName] Publishing apiShortName + * @property {string|null} [githubLabel] Publishing githubLabel + * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams + * @property {string|null} [docTagPrefix] Publishing docTagPrefix + * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization + * @property {Array.|null} [librarySettings] Publishing librarySettings + * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri + * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri + */ + + /** + * Constructs a new Publishing. + * @memberof google.api + * @classdesc Represents a Publishing. + * @implements IPublishing + * @constructor + * @param {google.api.IPublishing=} [properties] Properties to set + */ + function Publishing(properties) { + this.methodSettings = []; + this.codeownerGithubTeams = []; + this.librarySettings = []; + 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]]; + } + + /** + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.methodSettings = $util.emptyArray; + + /** + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.newIssueUri = ""; + + /** + * Publishing documentationUri. + * @member {string} documentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.documentationUri = ""; + + /** + * Publishing apiShortName. + * @member {string} apiShortName + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.apiShortName = ""; + + /** + * Publishing githubLabel. + * @member {string} githubLabel + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.githubLabel = ""; + + /** + * Publishing codeownerGithubTeams. + * @member {Array.} codeownerGithubTeams + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.codeownerGithubTeams = $util.emptyArray; + + /** + * Publishing docTagPrefix. + * @member {string} docTagPrefix + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.docTagPrefix = ""; + + /** + * Publishing organization. + * @member {google.api.ClientLibraryOrganization} organization + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.organization = 0; + + /** + * Publishing librarySettings. + * @member {Array.} librarySettings + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.librarySettings = $util.emptyArray; + + /** + * Publishing protoReferenceDocumentationUri. + * @member {string} protoReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.protoReferenceDocumentationUri = ""; + + /** + * Publishing restReferenceDocumentationUri. + * @member {string} restReferenceDocumentationUri + * @memberof google.api.Publishing + * @instance + */ + Publishing.prototype.restReferenceDocumentationUri = ""; + + /** + * Creates a new Publishing instance using the specified properties. + * @function create + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance + */ + Publishing.create = function create(properties) { + return new Publishing(properties); + }; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encode + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methodSettings != null && message.methodSettings.length) + for (var i = 0; i < message.methodSettings.length; ++i) + $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) + writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); + if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) + writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); + if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) + writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); + if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) + writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); + if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); + if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) + writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); + if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) + writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); + if (message.librarySettings != null && message.librarySettings.length) + for (var i = 0; i < message.librarySettings.length; ++i) + $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); + if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) + writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); + if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) + writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); + return writer; + }; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.Publishing + * @static + * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Publishing.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @function decode + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); + break; + } + case 101: { + message.newIssueUri = reader.string(); + break; + } + case 102: { + message.documentationUri = reader.string(); + break; + } + case 103: { + message.apiShortName = reader.string(); + break; + } + case 104: { + message.githubLabel = reader.string(); + break; + } + case 105: { + if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) + message.codeownerGithubTeams = []; + message.codeownerGithubTeams.push(reader.string()); + break; + } + case 106: { + message.docTagPrefix = reader.string(); + break; + } + case 107: { + message.organization = reader.int32(); + break; + } + case 109: { + if (!(message.librarySettings && message.librarySettings.length)) + message.librarySettings = []; + message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); + break; + } + case 110: { + message.protoReferenceDocumentationUri = reader.string(); + break; + } + case 111: { + message.restReferenceDocumentationUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Publishing + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Publishing} Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Publishing.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Publishing message. + * @function verify + * @memberof google.api.Publishing + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Publishing.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { + if (!Array.isArray(message.methodSettings)) + return "methodSettings: array expected"; + for (var i = 0; i < message.methodSettings.length; ++i) { + var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); + if (error) + return "methodSettings." + error; + } + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + if (!$util.isString(message.newIssueUri)) + return "newIssueUri: string expected"; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + if (!$util.isString(message.documentationUri)) + return "documentationUri: string expected"; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + if (!$util.isString(message.apiShortName)) + return "apiShortName: string expected"; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + if (!$util.isString(message.githubLabel)) + return "githubLabel: string expected"; + if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { + if (!Array.isArray(message.codeownerGithubTeams)) + return "codeownerGithubTeams: array expected"; + for (var i = 0; i < message.codeownerGithubTeams.length; ++i) + if (!$util.isString(message.codeownerGithubTeams[i])) + return "codeownerGithubTeams: string[] expected"; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + if (!$util.isString(message.docTagPrefix)) + return "docTagPrefix: string expected"; + if (message.organization != null && message.hasOwnProperty("organization")) + switch (message.organization) { + default: + return "organization: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; + } + if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { + if (!Array.isArray(message.librarySettings)) + return "librarySettings: array expected"; + for (var i = 0; i < message.librarySettings.length; ++i) { + var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); + if (error) + return "librarySettings." + error; + } + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + if (!$util.isString(message.protoReferenceDocumentationUri)) + return "protoReferenceDocumentationUri: string expected"; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + if (!$util.isString(message.restReferenceDocumentationUri)) + return "restReferenceDocumentationUri: string expected"; + return null; + }; + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Publishing + * @static + * @param {Object.} object Plain object + * @returns {google.api.Publishing} Publishing + */ + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) + return object; + var message = new $root.google.api.Publishing(); + if (object.methodSettings) { + if (!Array.isArray(object.methodSettings)) + throw TypeError(".google.api.Publishing.methodSettings: array expected"); + message.methodSettings = []; + for (var i = 0; i < object.methodSettings.length; ++i) { + if (typeof object.methodSettings[i] !== "object") + throw TypeError(".google.api.Publishing.methodSettings: object expected"); + message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); + } + } + if (object.newIssueUri != null) + message.newIssueUri = String(object.newIssueUri); + if (object.documentationUri != null) + message.documentationUri = String(object.documentationUri); + if (object.apiShortName != null) + message.apiShortName = String(object.apiShortName); + if (object.githubLabel != null) + message.githubLabel = String(object.githubLabel); + if (object.codeownerGithubTeams) { + if (!Array.isArray(object.codeownerGithubTeams)) + throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); + message.codeownerGithubTeams = []; + for (var i = 0; i < object.codeownerGithubTeams.length; ++i) + message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); + } + if (object.docTagPrefix != null) + message.docTagPrefix = String(object.docTagPrefix); + switch (object.organization) { + default: + if (typeof object.organization === "number") { + message.organization = object.organization; + break; + } + break; + case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": + case 0: + message.organization = 0; + break; + case "CLOUD": + case 1: + message.organization = 1; + break; + case "ADS": + case 2: + message.organization = 2; + break; + case "PHOTOS": + case 3: + message.organization = 3; + break; + case "STREET_VIEW": + case 4: + message.organization = 4; + break; + case "SHOPPING": + case 5: + message.organization = 5; + break; + case "GEO": + case 6: + message.organization = 6; + break; + case "GENERATIVE_AI": + case 7: + message.organization = 7; + break; + } + if (object.librarySettings) { + if (!Array.isArray(object.librarySettings)) + throw TypeError(".google.api.Publishing.librarySettings: array expected"); + message.librarySettings = []; + for (var i = 0; i < object.librarySettings.length; ++i) { + if (typeof object.librarySettings[i] !== "object") + throw TypeError(".google.api.Publishing.librarySettings: object expected"); + message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); + } + } + if (object.protoReferenceDocumentationUri != null) + message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); + if (object.restReferenceDocumentationUri != null) + message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); + return message; + }; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Publishing + * @static + * @param {google.api.Publishing} message Publishing + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Publishing.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.methodSettings = []; + object.codeownerGithubTeams = []; + object.librarySettings = []; + } + if (options.defaults) { + object.newIssueUri = ""; + object.documentationUri = ""; + object.apiShortName = ""; + object.githubLabel = ""; + object.docTagPrefix = ""; + object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; + object.protoReferenceDocumentationUri = ""; + object.restReferenceDocumentationUri = ""; + } + if (message.methodSettings && message.methodSettings.length) { + object.methodSettings = []; + for (var j = 0; j < message.methodSettings.length; ++j) + object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); + } + if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) + object.newIssueUri = message.newIssueUri; + if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) + object.documentationUri = message.documentationUri; + if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) + object.apiShortName = message.apiShortName; + if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) + object.githubLabel = message.githubLabel; + if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { + object.codeownerGithubTeams = []; + for (var j = 0; j < message.codeownerGithubTeams.length; ++j) + object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; + } + if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) + object.docTagPrefix = message.docTagPrefix; + if (message.organization != null && message.hasOwnProperty("organization")) + object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; + if (message.librarySettings && message.librarySettings.length) { + object.librarySettings = []; + for (var j = 0; j < message.librarySettings.length; ++j) + object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); + } + if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) + object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; + if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) + object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; + return object; + }; + + /** + * Converts this Publishing to JSON. + * @function toJSON + * @memberof google.api.Publishing + * @instance + * @returns {Object.} JSON object + */ + Publishing.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Publishing + * @function getTypeUrl + * @memberof google.api.Publishing + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Publishing"; + }; + + return Publishing; + })(); + + api.JavaSettings = (function() { + + /** + * Properties of a JavaSettings. + * @memberof google.api + * @interface IJavaSettings + * @property {string|null} [libraryPackage] JavaSettings libraryPackage + * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames + * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common + */ + + /** + * Constructs a new JavaSettings. + * @memberof google.api + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings + * @constructor + * @param {google.api.IJavaSettings=} [properties] Properties to set + */ + function JavaSettings(properties) { + this.serviceClassNames = {}; + 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]]; + } + + /** + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.libraryPackage = ""; + + /** + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.serviceClassNames = $util.emptyObject; + + /** + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings + * @instance + */ + JavaSettings.prototype.common = null; + + /** + * Creates a new JavaSettings instance using the specified properties. + * @function create + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance + */ + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); + }; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encode + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); + if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) + for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.libraryPackage = reader.string(); + break; + } + case 2: { + if (message.serviceClassNames === $util.emptyObject) + message.serviceClassNames = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.serviceClassNames[key] = value; + break; + } + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.JavaSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.JavaSettings} JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + JavaSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a JavaSettings message. + * @function verify + * @memberof google.api.JavaSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + JavaSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + if (!$util.isString(message.libraryPackage)) + return "libraryPackage: string expected"; + if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { + if (!$util.isObject(message.serviceClassNames)) + return "serviceClassNames: object expected"; + var key = Object.keys(message.serviceClassNames); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.serviceClassNames[key[i]])) + return "serviceClassNames: string{k:string} expected"; + } + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.JavaSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.JavaSettings} JavaSettings + */ + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) + return object; + var message = new $root.google.api.JavaSettings(); + if (object.libraryPackage != null) + message.libraryPackage = String(object.libraryPackage); + if (object.serviceClassNames) { + if (typeof object.serviceClassNames !== "object") + throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); + message.serviceClassNames = {}; + for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) + message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); + } + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.JavaSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.JavaSettings + * @static + * @param {google.api.JavaSettings} message JavaSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + JavaSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; + if (options.defaults) { + object.libraryPackage = ""; + object.common = null; + } + if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) + object.libraryPackage = message.libraryPackage; + var keys2; + if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { + object.serviceClassNames = {}; + for (var j = 0; j < keys2.length; ++j) + object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this JavaSettings to JSON. + * @function toJSON + * @memberof google.api.JavaSettings + * @instance + * @returns {Object.} JSON object + */ + JavaSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for JavaSettings + * @function getTypeUrl + * @memberof google.api.JavaSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.JavaSettings"; + }; + + return JavaSettings; + })(); + + api.CppSettings = (function() { + + /** + * Properties of a CppSettings. + * @memberof google.api + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + */ + + /** + * Constructs a new CppSettings. + * @memberof google.api + * @classdesc Represents a CppSettings. + * @implements ICppSettings + * @constructor + * @param {google.api.ICppSettings=} [properties] Properties to set + */ + function CppSettings(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]]; + } + + /** + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings + * @instance + */ + CppSettings.prototype.common = null; + + /** + * Creates a new CppSettings instance using the specified properties. + * @function create + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance + */ + CppSettings.create = function create(properties) { + return new CppSettings(properties); + }; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encode + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CppSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CppSettings} CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CppSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CppSettings message. + * @function verify + * @memberof google.api.CppSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CppSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CppSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.CppSettings} CppSettings + */ + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) + return object; + var message = new $root.google.api.CppSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.CppSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CppSettings + * @static + * @param {google.api.CppSettings} message CppSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CppSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this CppSettings to JSON. + * @function toJSON + * @memberof google.api.CppSettings + * @instance + * @returns {Object.} JSON object + */ + CppSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CppSettings + * @function getTypeUrl + * @memberof google.api.CppSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CppSettings"; + }; + + return CppSettings; + })(); + + api.PhpSettings = (function() { + + /** + * Properties of a PhpSettings. + * @memberof google.api + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + */ + + /** + * Constructs a new PhpSettings. + * @memberof google.api + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings + * @constructor + * @param {google.api.IPhpSettings=} [properties] Properties to set + */ + function PhpSettings(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]]; + } + + /** + * PhpSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PhpSettings + * @instance + */ + PhpSettings.prototype.common = null; + + /** + * Creates a new PhpSettings instance using the specified properties. + * @function create + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance + */ + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); + }; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PhpSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PhpSettings} PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PhpSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PhpSettings message. + * @function verify + * @memberof google.api.PhpSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PhpSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PhpSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PhpSettings} PhpSettings + */ + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) + return object; + var message = new $root.google.api.PhpSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PhpSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PhpSettings + * @static + * @param {google.api.PhpSettings} message PhpSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PhpSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this PhpSettings to JSON. + * @function toJSON + * @memberof google.api.PhpSettings + * @instance + * @returns {Object.} JSON object + */ + PhpSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PhpSettings + * @function getTypeUrl + * @memberof google.api.PhpSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PhpSettings"; + }; + + return PhpSettings; + })(); + + api.PythonSettings = (function() { + + /** + * Properties of a PythonSettings. + * @memberof google.api + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures + */ + + /** + * Constructs a new PythonSettings. + * @memberof google.api + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings + * @constructor + * @param {google.api.IPythonSettings=} [properties] Properties to set + */ + function PythonSettings(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]]; + } + + /** + * PythonSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.common = null; + + /** + * PythonSettings experimentalFeatures. + * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures + * @memberof google.api.PythonSettings + * @instance + */ + PythonSettings.prototype.experimentalFeatures = null; + + /** + * Creates a new PythonSettings instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance + */ + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); + }; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) + $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings} PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PythonSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PythonSettings message. + * @function verify + * @memberof google.api.PythonSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PythonSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { + var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures); + if (error) + return "experimentalFeatures." + error; + } + return null; + }; + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings} PythonSettings + */ + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) + return object; + var message = new $root.google.api.PythonSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.PythonSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.experimentalFeatures != null) { + if (typeof object.experimentalFeatures !== "object") + throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); + message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); + } + return message; + }; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings + * @static + * @param {google.api.PythonSettings} message PythonSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PythonSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.common = null; + object.experimentalFeatures = null; + } + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) + object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); + return object; + }; + + /** + * Converts this PythonSettings to JSON. + * @function toJSON + * @memberof google.api.PythonSettings + * @instance + * @returns {Object.} JSON object + */ + PythonSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PythonSettings + * @function getTypeUrl + * @memberof google.api.PythonSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings"; + }; + + PythonSettings.ExperimentalFeatures = (function() { + + /** + * Properties of an ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @interface IExperimentalFeatures + * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled + * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled + * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled + */ + + /** + * Constructs a new ExperimentalFeatures. + * @memberof google.api.PythonSettings + * @classdesc Represents an ExperimentalFeatures. + * @implements IExperimentalFeatures + * @constructor + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + */ + function ExperimentalFeatures(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]]; + } + + /** + * ExperimentalFeatures restAsyncIoEnabled. + * @member {boolean} restAsyncIoEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.restAsyncIoEnabled = false; + + /** + * ExperimentalFeatures protobufPythonicTypesEnabled. + * @member {boolean} protobufPythonicTypesEnabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; + + /** + * ExperimentalFeatures unversionedPackageDisabled. + * @member {boolean} unversionedPackageDisabled + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + */ + ExperimentalFeatures.prototype.unversionedPackageDisabled = false; + + /** + * Creates a new ExperimentalFeatures instance using the specified properties. + * @function create + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance + */ + ExperimentalFeatures.create = function create(properties) { + return new ExperimentalFeatures(properties); + }; + + /** + * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); + if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); + if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); + return writer; + }; + + /** + * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer. + * @function decode + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.restAsyncIoEnabled = reader.bool(); + break; + } + case 2: { + message.protobufPythonicTypesEnabled = reader.bool(); + break; + } + case 3: { + message.unversionedPackageDisabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExperimentalFeatures message. + * @function verify + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExperimentalFeatures.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + if (typeof message.restAsyncIoEnabled !== "boolean") + return "restAsyncIoEnabled: boolean expected"; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + if (typeof message.protobufPythonicTypesEnabled !== "boolean") + return "protobufPythonicTypesEnabled: boolean expected"; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + if (typeof message.unversionedPackageDisabled !== "boolean") + return "unversionedPackageDisabled: boolean expected"; + return null; + }; + + /** + * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {Object.} object Plain object + * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures + */ + ExperimentalFeatures.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) + return object; + var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); + if (object.restAsyncIoEnabled != null) + message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); + if (object.protobufPythonicTypesEnabled != null) + message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); + if (object.unversionedPackageDisabled != null) + message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); + return message; + }; + + /** + * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExperimentalFeatures.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.restAsyncIoEnabled = false; + object.protobufPythonicTypesEnabled = false; + object.unversionedPackageDisabled = false; + } + if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) + object.restAsyncIoEnabled = message.restAsyncIoEnabled; + if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) + object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; + if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) + object.unversionedPackageDisabled = message.unversionedPackageDisabled; + return object; + }; + + /** + * Converts this ExperimentalFeatures to JSON. + * @function toJSON + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @instance + * @returns {Object.} JSON object + */ + ExperimentalFeatures.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExperimentalFeatures + * @function getTypeUrl + * @memberof google.api.PythonSettings.ExperimentalFeatures + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; + }; + + return ExperimentalFeatures; + })(); + + return PythonSettings; + })(); + + api.NodeSettings = (function() { + + /** + * Properties of a NodeSettings. + * @memberof google.api + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + */ + + /** + * Constructs a new NodeSettings. + * @memberof google.api + * @classdesc Represents a NodeSettings. + * @implements INodeSettings + * @constructor + * @param {google.api.INodeSettings=} [properties] Properties to set + */ + function NodeSettings(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]]; + } + + /** + * NodeSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.NodeSettings + * @instance + */ + NodeSettings.prototype.common = null; + + /** + * Creates a new NodeSettings instance using the specified properties. + * @function create + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance + */ + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); + }; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encode + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.NodeSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.NodeSettings} NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodeSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodeSettings message. + * @function verify + * @memberof google.api.NodeSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodeSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.NodeSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.NodeSettings} NodeSettings + */ + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) + return object; + var message = new $root.google.api.NodeSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.NodeSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.NodeSettings + * @static + * @param {google.api.NodeSettings} message NodeSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodeSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this NodeSettings to JSON. + * @function toJSON + * @memberof google.api.NodeSettings + * @instance + * @returns {Object.} JSON object + */ + NodeSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodeSettings + * @function getTypeUrl + * @memberof google.api.NodeSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.NodeSettings"; + }; + + return NodeSettings; + })(); + + api.DotnetSettings = (function() { + + /** + * Properties of a DotnetSettings. + * @memberof google.api + * @interface IDotnetSettings + * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common + * @property {Object.|null} [renamedServices] DotnetSettings renamedServices + * @property {Object.|null} [renamedResources] DotnetSettings renamedResources + * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources + * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases + * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures + */ + + /** + * Constructs a new DotnetSettings. + * @memberof google.api + * @classdesc Represents a DotnetSettings. + * @implements IDotnetSettings + * @constructor + * @param {google.api.IDotnetSettings=} [properties] Properties to set + */ + function DotnetSettings(properties) { + this.renamedServices = {}; + this.renamedResources = {}; + this.ignoredResources = []; + this.forcedNamespaceAliases = []; + this.handwrittenSignatures = []; + 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]]; + } + + /** + * DotnetSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.common = null; + + /** + * DotnetSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedServices = $util.emptyObject; + + /** + * DotnetSettings renamedResources. + * @member {Object.} renamedResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.renamedResources = $util.emptyObject; + + /** + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; + + /** + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + + /** + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings + * @instance + */ + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @function create + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance + */ + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); + }; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encode + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) + for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); + if (message.ignoredResources != null && message.ignoredResources.length) + for (var i = 0; i < message.ignoredResources.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); + if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); + if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); + return writer; + }; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } + case 3: { + if (message.renamedResources === $util.emptyObject) + message.renamedResources = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedResources[key] = value; + break; + } + case 4: { + if (!(message.ignoredResources && message.ignoredResources.length)) + message.ignoredResources = []; + message.ignoredResources.push(reader.string()); + break; + } + case 5: { + if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) + message.forcedNamespaceAliases = []; + message.forcedNamespaceAliases.push(reader.string()); + break; + } + case 6: { + if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) + message.handwrittenSignatures = []; + message.handwrittenSignatures.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.DotnetSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.DotnetSettings} DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DotnetSettings message. + * @function verify + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DotnetSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { + if (!$util.isObject(message.renamedResources)) + return "renamedResources: object expected"; + var key = Object.keys(message.renamedResources); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedResources[key[i]])) + return "renamedResources: string{k:string} expected"; + } + if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { + if (!Array.isArray(message.ignoredResources)) + return "ignoredResources: array expected"; + for (var i = 0; i < message.ignoredResources.length; ++i) + if (!$util.isString(message.ignoredResources[i])) + return "ignoredResources: string[] expected"; + } + if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { + if (!Array.isArray(message.forcedNamespaceAliases)) + return "forcedNamespaceAliases: array expected"; + for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) + if (!$util.isString(message.forcedNamespaceAliases[i])) + return "forcedNamespaceAliases: string[] expected"; + } + if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { + if (!Array.isArray(message.handwrittenSignatures)) + return "handwrittenSignatures: array expected"; + for (var i = 0; i < message.handwrittenSignatures.length; ++i) + if (!$util.isString(message.handwrittenSignatures[i])) + return "handwrittenSignatures: string[] expected"; + } + return null; + }; + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.DotnetSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.DotnetSettings} DotnetSettings + */ + DotnetSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.DotnetSettings) + return object; + var message = new $root.google.api.DotnetSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.DotnetSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + if (object.renamedResources) { + if (typeof object.renamedResources !== "object") + throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); + message.renamedResources = {}; + for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) + message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); + } + if (object.ignoredResources) { + if (!Array.isArray(object.ignoredResources)) + throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); + message.ignoredResources = []; + for (var i = 0; i < object.ignoredResources.length; ++i) + message.ignoredResources[i] = String(object.ignoredResources[i]); + } + if (object.forcedNamespaceAliases) { + if (!Array.isArray(object.forcedNamespaceAliases)) + throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); + message.forcedNamespaceAliases = []; + for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) + message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); + } + if (object.handwrittenSignatures) { + if (!Array.isArray(object.handwrittenSignatures)) + throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); + message.handwrittenSignatures = []; + for (var i = 0; i < object.handwrittenSignatures.length; ++i) + message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); + } + return message; + }; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.DotnetSettings + * @static + * @param {google.api.DotnetSettings} message DotnetSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DotnetSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.ignoredResources = []; + object.forcedNamespaceAliases = []; + object.handwrittenSignatures = []; + } + if (options.objects || options.defaults) { + object.renamedServices = {}; + object.renamedResources = {}; + } + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { + object.renamedResources = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; + } + if (message.ignoredResources && message.ignoredResources.length) { + object.ignoredResources = []; + for (var j = 0; j < message.ignoredResources.length; ++j) + object.ignoredResources[j] = message.ignoredResources[j]; + } + if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { + object.forcedNamespaceAliases = []; + for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) + object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; + } + if (message.handwrittenSignatures && message.handwrittenSignatures.length) { + object.handwrittenSignatures = []; + for (var j = 0; j < message.handwrittenSignatures.length; ++j) + object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; + } + return object; + }; + + /** + * Converts this DotnetSettings to JSON. + * @function toJSON + * @memberof google.api.DotnetSettings + * @instance + * @returns {Object.} JSON object + */ + DotnetSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DotnetSettings + * @function getTypeUrl + * @memberof google.api.DotnetSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.DotnetSettings"; + }; + + return DotnetSettings; + })(); + + api.RubySettings = (function() { + + /** + * Properties of a RubySettings. + * @memberof google.api + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + */ + + /** + * Constructs a new RubySettings. + * @memberof google.api + * @classdesc Represents a RubySettings. + * @implements IRubySettings + * @constructor + * @param {google.api.IRubySettings=} [properties] Properties to set + */ + function RubySettings(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]]; + } + + /** + * RubySettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.RubySettings + * @instance + */ + RubySettings.prototype.common = null; + + /** + * Creates a new RubySettings instance using the specified properties. + * @function create + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance + */ + RubySettings.create = function create(properties) { + return new RubySettings(properties); + }; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encode + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.RubySettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.RubySettings} RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RubySettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RubySettings message. + * @function verify + * @memberof google.api.RubySettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RubySettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + return null; + }; + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.RubySettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.RubySettings} RubySettings + */ + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) + return object; + var message = new $root.google.api.RubySettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.RubySettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + return message; + }; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.RubySettings + * @static + * @param {google.api.RubySettings} message RubySettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RubySettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + return object; + }; + + /** + * Converts this RubySettings to JSON. + * @function toJSON + * @memberof google.api.RubySettings + * @instance + * @returns {Object.} JSON object + */ + RubySettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RubySettings + * @function getTypeUrl + * @memberof google.api.RubySettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.RubySettings"; + }; + + return RubySettings; + })(); + + api.GoSettings = (function() { + + /** + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common + * @property {Object.|null} [renamedServices] GoSettings renamedServices + */ + + /** + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set + */ + function GoSettings(properties) { + this.renamedServices = {}; + 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]]; + } + + /** + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.common = null; + + /** + * GoSettings renamedServices. + * @member {Object.} renamedServices + * @memberof google.api.GoSettings + * @instance + */ + GoSettings.prototype.renamedServices = $util.emptyObject; + + /** + * Creates a new GoSettings instance using the specified properties. + * @function create + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance + */ + GoSettings.create = function create(properties) { + return new GoSettings(properties); + }; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encode + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.common != null && Object.hasOwnProperty.call(message, "common")) + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) + for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + break; + } + case 2: { + if (message.renamedServices === $util.emptyObject) + message.renamedServices = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.renamedServices[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.GoSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.GoSettings} GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GoSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GoSettings message. + * @function verify + * @memberof google.api.GoSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GoSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; + } + if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { + if (!$util.isObject(message.renamedServices)) + return "renamedServices: object expected"; + var key = Object.keys(message.renamedServices); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.renamedServices[key[i]])) + return "renamedServices: string{k:string} expected"; + } + return null; + }; + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.GoSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.GoSettings} GoSettings + */ + GoSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.GoSettings) + return object; + var message = new $root.google.api.GoSettings(); + if (object.common != null) { + if (typeof object.common !== "object") + throw TypeError(".google.api.GoSettings.common: object expected"); + message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); + } + if (object.renamedServices) { + if (typeof object.renamedServices !== "object") + throw TypeError(".google.api.GoSettings.renamedServices: object expected"); + message.renamedServices = {}; + for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) + message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.GoSettings + * @static + * @param {google.api.GoSettings} message GoSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GoSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.renamedServices = {}; + if (options.defaults) + object.common = null; + if (message.common != null && message.hasOwnProperty("common")) + object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); + var keys2; + if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { + object.renamedServices = {}; + for (var j = 0; j < keys2.length; ++j) + object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; + } + return object; + }; + + /** + * Converts this GoSettings to JSON. + * @function toJSON + * @memberof google.api.GoSettings + * @instance + * @returns {Object.} JSON object + */ + GoSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GoSettings + * @function getTypeUrl + * @memberof google.api.GoSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.GoSettings"; + }; + + return GoSettings; + })(); + + api.MethodSettings = (function() { + + /** + * Properties of a MethodSettings. + * @memberof google.api + * @interface IMethodSettings + * @property {string|null} [selector] MethodSettings selector + * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning + * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields + */ + + /** + * Constructs a new MethodSettings. + * @memberof google.api + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings + * @constructor + * @param {google.api.IMethodSettings=} [properties] Properties to set + */ + function MethodSettings(properties) { + this.autoPopulatedFields = []; + 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]]; + } + + /** + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.selector = ""; + + /** + * MethodSettings longRunning. + * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.longRunning = null; + + /** + * MethodSettings autoPopulatedFields. + * @member {Array.} autoPopulatedFields + * @memberof google.api.MethodSettings + * @instance + */ + MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance + */ + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); + }; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) + $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); + return writer; + }; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + break; + } + case 3: { + if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) + message.autoPopulatedFields = []; + message.autoPopulatedFields.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings} MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodSettings.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodSettings message. + * @function verify + * @memberof google.api.MethodSettings + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodSettings.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) { + var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); + if (error) + return "longRunning." + error; + } + if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { + if (!Array.isArray(message.autoPopulatedFields)) + return "autoPopulatedFields: array expected"; + for (var i = 0; i < message.autoPopulatedFields.length; ++i) + if (!$util.isString(message.autoPopulatedFields[i])) + return "autoPopulatedFields: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings} MethodSettings + */ + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) + return object; + var message = new $root.google.api.MethodSettings(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.longRunning != null) { + if (typeof object.longRunning !== "object") + throw TypeError(".google.api.MethodSettings.longRunning: object expected"); + message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); + } + if (object.autoPopulatedFields) { + if (!Array.isArray(object.autoPopulatedFields)) + throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); + message.autoPopulatedFields = []; + for (var i = 0; i < object.autoPopulatedFields.length; ++i) + message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings + * @static + * @param {google.api.MethodSettings} message MethodSettings + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodSettings.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.autoPopulatedFields = []; + if (options.defaults) { + object.selector = ""; + object.longRunning = null; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.longRunning != null && message.hasOwnProperty("longRunning")) + object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); + if (message.autoPopulatedFields && message.autoPopulatedFields.length) { + object.autoPopulatedFields = []; + for (var j = 0; j < message.autoPopulatedFields.length; ++j) + object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; + } + return object; + }; + + /** + * Converts this MethodSettings to JSON. + * @function toJSON + * @memberof google.api.MethodSettings + * @instance + * @returns {Object.} JSON object + */ + MethodSettings.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodSettings + * @function getTypeUrl + * @memberof google.api.MethodSettings + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings"; + }; + + MethodSettings.LongRunning = (function() { + + /** + * Properties of a LongRunning. + * @memberof google.api.MethodSettings + * @interface ILongRunning + * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay + * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier + * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay + * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout + */ + + /** + * Constructs a new LongRunning. + * @memberof google.api.MethodSettings + * @classdesc Represents a LongRunning. + * @implements ILongRunning + * @constructor + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + */ + function LongRunning(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]]; + } + + /** + * LongRunning initialPollDelay. + * @member {google.protobuf.IDuration|null|undefined} initialPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.initialPollDelay = null; + + /** + * LongRunning pollDelayMultiplier. + * @member {number} pollDelayMultiplier + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.pollDelayMultiplier = 0; + + /** + * LongRunning maxPollDelay. + * @member {google.protobuf.IDuration|null|undefined} maxPollDelay + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.maxPollDelay = null; + + /** + * LongRunning totalPollTimeout. + * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout + * @memberof google.api.MethodSettings.LongRunning + * @instance + */ + LongRunning.prototype.totalPollTimeout = null; + + /** + * Creates a new LongRunning instance using the specified properties. + * @function create + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set + * @returns {google.api.MethodSettings.LongRunning} LongRunning instance + */ + LongRunning.create = function create(properties) { + return new LongRunning(properties); + }; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) + $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); + if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) + $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) + $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LongRunning.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @function decode + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.pollDelayMultiplier = reader.float(); + break; + } + case 3: { + message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.MethodSettings.LongRunning} LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LongRunning.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LongRunning message. + * @function verify + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LongRunning.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); + if (error) + return "initialPollDelay." + error; + } + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + if (typeof message.pollDelayMultiplier !== "number") + return "pollDelayMultiplier: number expected"; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { + var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); + if (error) + return "maxPollDelay." + error; + } + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { + var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); + if (error) + return "totalPollTimeout." + error; + } + return null; + }; + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {Object.} object Plain object + * @returns {google.api.MethodSettings.LongRunning} LongRunning + */ + LongRunning.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings.LongRunning) + return object; + var message = new $root.google.api.MethodSettings.LongRunning(); + if (object.initialPollDelay != null) { + if (typeof object.initialPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); + message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); + } + if (object.pollDelayMultiplier != null) + message.pollDelayMultiplier = Number(object.pollDelayMultiplier); + if (object.maxPollDelay != null) { + if (typeof object.maxPollDelay !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); + message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); + } + if (object.totalPollTimeout != null) { + if (typeof object.totalPollTimeout !== "object") + throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); + message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); + } + return message; + }; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {google.api.MethodSettings.LongRunning} message LongRunning + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LongRunning.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.initialPollDelay = null; + object.pollDelayMultiplier = 0; + object.maxPollDelay = null; + object.totalPollTimeout = null; + } + if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) + object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); + if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) + object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; + if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) + object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); + if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) + object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); + return object; + }; + + /** + * Converts this LongRunning to JSON. + * @function toJSON + * @memberof google.api.MethodSettings.LongRunning + * @instance + * @returns {Object.} JSON object + */ + LongRunning.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LongRunning + * @function getTypeUrl + * @memberof google.api.MethodSettings.LongRunning + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; + }; + + return LongRunning; + })(); + + return MethodSettings; + })(); + + /** + * ClientLibraryOrganization enum. + * @name google.api.ClientLibraryOrganization + * @enum {number} + * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value + * @property {number} CLOUD=1 CLOUD value + * @property {number} ADS=2 ADS value + * @property {number} PHOTOS=3 PHOTOS value + * @property {number} STREET_VIEW=4 STREET_VIEW value + * @property {number} SHOPPING=5 SHOPPING value + * @property {number} GEO=6 GEO value + * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value + */ + api.ClientLibraryOrganization = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; + values[valuesById[1] = "CLOUD"] = 1; + values[valuesById[2] = "ADS"] = 2; + values[valuesById[3] = "PHOTOS"] = 3; + values[valuesById[4] = "STREET_VIEW"] = 4; + values[valuesById[5] = "SHOPPING"] = 5; + values[valuesById[6] = "GEO"] = 6; + values[valuesById[7] = "GENERATIVE_AI"] = 7; + return values; + })(); + + /** + * ClientLibraryDestination enum. + * @name google.api.ClientLibraryDestination + * @enum {number} + * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value + * @property {number} GITHUB=10 GITHUB value + * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value + */ + api.ClientLibraryDestination = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; + values[valuesById[10] = "GITHUB"] = 10; + values[valuesById[20] = "PACKAGE_MANAGER"] = 20; + return values; + })(); + + api.SelectiveGapicGeneration = (function() { + + /** + * Properties of a SelectiveGapicGeneration. + * @memberof google.api + * @interface ISelectiveGapicGeneration + * @property {Array.|null} [methods] SelectiveGapicGeneration methods + * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal + */ + + /** + * Constructs a new SelectiveGapicGeneration. + * @memberof google.api + * @classdesc Represents a SelectiveGapicGeneration. + * @implements ISelectiveGapicGeneration + * @constructor + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + */ + function SelectiveGapicGeneration(properties) { + this.methods = []; + 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]]; + } + + /** + * SelectiveGapicGeneration methods. + * @member {Array.} methods + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.methods = $util.emptyArray; + + /** + * SelectiveGapicGeneration generateOmittedAsInternal. + * @member {boolean} generateOmittedAsInternal + * @memberof google.api.SelectiveGapicGeneration + * @instance + */ + SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; + + /** + * Creates a new SelectiveGapicGeneration instance using the specified properties. + * @function create + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance + */ + SelectiveGapicGeneration.create = function create(properties) { + return new SelectiveGapicGeneration(properties); + }; + + /** + * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.methods != null && message.methods.length) + for (var i = 0; i < message.methods.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); + if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); + return writer; + }; + + /** + * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. + * @function decode + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.methods && message.methods.length)) + message.methods = []; + message.methods.push(reader.string()); + break; + } + case 2: { + message.generateOmittedAsInternal = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SelectiveGapicGeneration message. + * @function verify + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SelectiveGapicGeneration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.methods != null && message.hasOwnProperty("methods")) { + if (!Array.isArray(message.methods)) + return "methods: array expected"; + for (var i = 0; i < message.methods.length; ++i) + if (!$util.isString(message.methods[i])) + return "methods: string[] expected"; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + if (typeof message.generateOmittedAsInternal !== "boolean") + return "generateOmittedAsInternal: boolean expected"; + return null; + }; + + /** + * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {Object.} object Plain object + * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration + */ + SelectiveGapicGeneration.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.SelectiveGapicGeneration) + return object; + var message = new $root.google.api.SelectiveGapicGeneration(); + if (object.methods) { + if (!Array.isArray(object.methods)) + throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); + message.methods = []; + for (var i = 0; i < object.methods.length; ++i) + message.methods[i] = String(object.methods[i]); + } + if (object.generateOmittedAsInternal != null) + message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); + return message; + }; + + /** + * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SelectiveGapicGeneration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.methods = []; + if (options.defaults) + object.generateOmittedAsInternal = false; + if (message.methods && message.methods.length) { + object.methods = []; + for (var j = 0; j < message.methods.length; ++j) + object.methods[j] = message.methods[j]; + } + if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) + object.generateOmittedAsInternal = message.generateOmittedAsInternal; + return object; + }; + + /** + * Converts this SelectiveGapicGeneration to JSON. + * @function toJSON + * @memberof google.api.SelectiveGapicGeneration + * @instance + * @returns {Object.} JSON object + */ + SelectiveGapicGeneration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SelectiveGapicGeneration + * @function getTypeUrl + * @memberof google.api.SelectiveGapicGeneration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; + }; + + return SelectiveGapicGeneration; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + 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]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * Edition enum. + * @name google.protobuf.Edition + * @enum {number} + * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value + * @property {number} EDITION_LEGACY=900 EDITION_LEGACY value + * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value + * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value + * @property {number} EDITION_2023=1000 EDITION_2023 value + * @property {number} EDITION_2024=1001 EDITION_2024 value + * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value + * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value + * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value + * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value + * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value + * @property {number} EDITION_MAX=2147483647 EDITION_MAX value + */ + protobuf.Edition = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EDITION_UNKNOWN"] = 0; + values[valuesById[900] = "EDITION_LEGACY"] = 900; + values[valuesById[998] = "EDITION_PROTO2"] = 998; + values[valuesById[999] = "EDITION_PROTO3"] = 999; + values[valuesById[1000] = "EDITION_2023"] = 1000; + values[valuesById[1001] = "EDITION_2024"] = 1001; + values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; + values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; + values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; + values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; + values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; + values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; + return values; + })(); + + protobuf.FileDescriptorProto = (function() { + + /** + * Properties of a FileDescriptorProto. + * @memberof google.protobuf + * @interface IFileDescriptorProto + * @property {string|null} [name] FileDescriptorProto name + * @property {string|null} ["package"] FileDescriptorProto package + * @property {Array.|null} [dependency] FileDescriptorProto dependency + * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency + * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency + * @property {Array.|null} [optionDependency] FileDescriptorProto optionDependency + * @property {Array.|null} [messageType] FileDescriptorProto messageType + * @property {Array.|null} [enumType] FileDescriptorProto enumType + * @property {Array.|null} [service] FileDescriptorProto service + * @property {Array.|null} [extension] FileDescriptorProto extension + * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options + * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo + * @property {string|null} [syntax] FileDescriptorProto syntax + * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition + */ + + /** + * Constructs a new FileDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorProto. + * @implements IFileDescriptorProto + * @constructor + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + */ + function FileDescriptorProto(properties) { + this.dependency = []; + this.publicDependency = []; + this.weakDependency = []; + this.optionDependency = []; + this.messageType = []; + this.enumType = []; + this.service = []; + this.extension = []; + 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]]; + } + + /** + * FileDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.name = ""; + + /** + * FileDescriptorProto package. + * @member {string} package + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype["package"] = ""; + + /** + * FileDescriptorProto dependency. + * @member {Array.} dependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.dependency = $util.emptyArray; + + /** + * FileDescriptorProto publicDependency. + * @member {Array.} publicDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.publicDependency = $util.emptyArray; + + /** + * FileDescriptorProto weakDependency. + * @member {Array.} weakDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.weakDependency = $util.emptyArray; + + /** + * FileDescriptorProto optionDependency. + * @member {Array.} optionDependency + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.optionDependency = $util.emptyArray; + + /** + * FileDescriptorProto messageType. + * @member {Array.} messageType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.messageType = $util.emptyArray; + + /** + * FileDescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * FileDescriptorProto service. + * @member {Array.} service + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.service = $util.emptyArray; + + /** + * FileDescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.extension = $util.emptyArray; + + /** + * FileDescriptorProto options. + * @member {google.protobuf.IFileOptions|null|undefined} options + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.options = null; + + /** + * FileDescriptorProto sourceCodeInfo. + * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.sourceCodeInfo = null; + + /** + * FileDescriptorProto syntax. + * @member {string} syntax + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.syntax = ""; + + /** + * FileDescriptorProto edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FileDescriptorProto + * @instance + */ + FileDescriptorProto.prototype.edition = 0; + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance + */ + FileDescriptorProto.create = function create(properties) { + return new FileDescriptorProto(properties); + }; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); + if (message.dependency != null && message.dependency.length) + for (var i = 0; i < message.dependency.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); + if (message.messageType != null && message.messageType.length) + for (var i = 0; i < message.messageType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.service != null && message.service.length) + for (var i = 0; i < message.service.length; ++i) + $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) + $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.publicDependency != null && message.publicDependency.length) + for (var i = 0; i < message.publicDependency.length; ++i) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); + if (message.weakDependency != null && message.weakDependency.length) + for (var i = 0; i < message.weakDependency.length; ++i) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); + if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); + if (message.optionDependency != null && message.optionDependency.length) + for (var i = 0; i < message.optionDependency.length; ++i) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); + return writer; + }; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 15: { + if (!(message.optionDependency && message.optionDependency.length)) + message.optionDependency = []; + message.optionDependency.push(reader.string()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 14: { + message.edition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorProto message. + * @function verify + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message["package"] != null && message.hasOwnProperty("package")) + if (!$util.isString(message["package"])) + return "package: string expected"; + if (message.dependency != null && message.hasOwnProperty("dependency")) { + if (!Array.isArray(message.dependency)) + return "dependency: array expected"; + for (var i = 0; i < message.dependency.length; ++i) + if (!$util.isString(message.dependency[i])) + return "dependency: string[] expected"; + } + if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { + if (!Array.isArray(message.publicDependency)) + return "publicDependency: array expected"; + for (var i = 0; i < message.publicDependency.length; ++i) + if (!$util.isInteger(message.publicDependency[i])) + return "publicDependency: integer[] expected"; + } + if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { + if (!Array.isArray(message.weakDependency)) + return "weakDependency: array expected"; + for (var i = 0; i < message.weakDependency.length; ++i) + if (!$util.isInteger(message.weakDependency[i])) + return "weakDependency: integer[] expected"; + } + if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { + if (!Array.isArray(message.optionDependency)) + return "optionDependency: array expected"; + for (var i = 0; i < message.optionDependency.length; ++i) + if (!$util.isString(message.optionDependency[i])) + return "optionDependency: string[] expected"; + } + if (message.messageType != null && message.hasOwnProperty("messageType")) { + if (!Array.isArray(message.messageType)) + return "messageType: array expected"; + for (var i = 0; i < message.messageType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); + if (error) + return "messageType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.service != null && message.hasOwnProperty("service")) { + if (!Array.isArray(message.service)) + return "service: array expected"; + for (var i = 0; i < message.service.length; ++i) { + var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); + if (error) + return "service." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FileOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { + var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); + if (error) + return "sourceCodeInfo." + error; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + if (!$util.isString(message.syntax)) + return "syntax: string expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto + */ + FileDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorProto) + return object; + var message = new $root.google.protobuf.FileDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object["package"] != null) + message["package"] = String(object["package"]); + if (object.dependency) { + if (!Array.isArray(object.dependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); + message.dependency = []; + for (var i = 0; i < object.dependency.length; ++i) + message.dependency[i] = String(object.dependency[i]); + } + if (object.publicDependency) { + if (!Array.isArray(object.publicDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); + message.publicDependency = []; + for (var i = 0; i < object.publicDependency.length; ++i) + message.publicDependency[i] = object.publicDependency[i] | 0; + } + if (object.weakDependency) { + if (!Array.isArray(object.weakDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); + message.weakDependency = []; + for (var i = 0; i < object.weakDependency.length; ++i) + message.weakDependency[i] = object.weakDependency[i] | 0; + } + if (object.optionDependency) { + if (!Array.isArray(object.optionDependency)) + throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); + message.optionDependency = []; + for (var i = 0; i < object.optionDependency.length; ++i) + message.optionDependency[i] = String(object.optionDependency[i]); + } + if (object.messageType) { + if (!Array.isArray(object.messageType)) + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); + message.messageType = []; + for (var i = 0; i < object.messageType.length; ++i) { + if (typeof object.messageType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); + message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.service) { + if (!Array.isArray(object.service)) + throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); + message.service = []; + for (var i = 0; i < object.service.length; ++i) { + if (typeof object.service[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); + message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FileOptions.fromObject(object.options); + } + if (object.sourceCodeInfo != null) { + if (typeof object.sourceCodeInfo !== "object") + throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); + } + if (object.syntax != null) + message.syntax = String(object.syntax); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.dependency = []; + object.messageType = []; + object.enumType = []; + object.service = []; + object.extension = []; + object.publicDependency = []; + object.weakDependency = []; + object.optionDependency = []; + } + if (options.defaults) { + object.name = ""; + object["package"] = ""; + object.options = null; + object.sourceCodeInfo = null; + object.syntax = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message["package"] != null && message.hasOwnProperty("package")) + object["package"] = message["package"]; + if (message.dependency && message.dependency.length) { + object.dependency = []; + for (var j = 0; j < message.dependency.length; ++j) + object.dependency[j] = message.dependency[j]; + } + if (message.messageType && message.messageType.length) { + object.messageType = []; + for (var j = 0; j < message.messageType.length; ++j) + object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.service && message.service.length) { + object.service = []; + for (var j = 0; j < message.service.length; ++j) + object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); + if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) + object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); + if (message.publicDependency && message.publicDependency.length) { + object.publicDependency = []; + for (var j = 0; j < message.publicDependency.length; ++j) + object.publicDependency[j] = message.publicDependency[j]; + } + if (message.weakDependency && message.weakDependency.length) { + object.weakDependency = []; + for (var j = 0; j < message.weakDependency.length; ++j) + object.weakDependency[j] = message.weakDependency[j]; + } + if (message.syntax != null && message.hasOwnProperty("syntax")) + object.syntax = message.syntax; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + if (message.optionDependency && message.optionDependency.length) { + object.optionDependency = []; + for (var j = 0; j < message.optionDependency.length; ++j) + object.optionDependency[j] = message.optionDependency[j]; + } + return object; + }; + + /** + * Converts this FileDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; + }; + + return FileDescriptorProto; + })(); + + protobuf.DescriptorProto = (function() { + + /** + * Properties of a DescriptorProto. + * @memberof google.protobuf + * @interface IDescriptorProto + * @property {string|null} [name] DescriptorProto name + * @property {Array.|null} [field] DescriptorProto field + * @property {Array.|null} [extension] DescriptorProto extension + * @property {Array.|null} [nestedType] DescriptorProto nestedType + * @property {Array.|null} [enumType] DescriptorProto enumType + * @property {Array.|null} [extensionRange] DescriptorProto extensionRange + * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl + * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options + * @property {Array.|null} [reservedRange] DescriptorProto reservedRange + * @property {Array.|null} [reservedName] DescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility + */ + + /** + * Constructs a new DescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a DescriptorProto. + * @implements IDescriptorProto + * @constructor + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + */ + function DescriptorProto(properties) { + this.field = []; + this.extension = []; + this.nestedType = []; + this.enumType = []; + this.extensionRange = []; + this.oneofDecl = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * DescriptorProto name. + * @member {string} name + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.name = ""; + + /** + * DescriptorProto field. + * @member {Array.} field + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.field = $util.emptyArray; + + /** + * DescriptorProto extension. + * @member {Array.} extension + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extension = $util.emptyArray; + + /** + * DescriptorProto nestedType. + * @member {Array.} nestedType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.nestedType = $util.emptyArray; + + /** + * DescriptorProto enumType. + * @member {Array.} enumType + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.enumType = $util.emptyArray; + + /** + * DescriptorProto extensionRange. + * @member {Array.} extensionRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.extensionRange = $util.emptyArray; + + /** + * DescriptorProto oneofDecl. + * @member {Array.} oneofDecl + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.oneofDecl = $util.emptyArray; + + /** + * DescriptorProto options. + * @member {google.protobuf.IMessageOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.options = null; + + /** + * DescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * DescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * DescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.DescriptorProto + * @instance + */ + DescriptorProto.prototype.visibility = 0; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto} DescriptorProto instance + */ + DescriptorProto.create = function create(properties) { + return new DescriptorProto(properties); + }; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.field != null && message.field.length) + for (var i = 0; i < message.field.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nestedType != null && message.nestedType.length) + for (var i = 0; i < message.nestedType.length; ++i) + $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.enumType != null && message.enumType.length) + for (var i = 0; i < message.enumType.length; ++i) + $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.extensionRange != null && message.extensionRange.length) + for (var i = 0; i < message.extensionRange.length; ++i) + $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.extension != null && message.extension.length) + for (var i = 0; i < message.extension.length; ++i) + $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.oneofDecl != null && message.oneofDecl.length) + for (var i = 0; i < message.oneofDecl.length; ++i) + $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); + return writer; + }; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + case 11: { + message.visibility = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(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]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(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]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @property {Array.|null} [declaration] ExtensionRangeOptions declaration + * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features + * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification + */ + + /** + * Constructs a new ExtensionRangeOptions. + * @memberof google.protobuf + * @classdesc Represents an ExtensionRangeOptions. + * @implements IExtensionRangeOptions + * @constructor + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + */ + function ExtensionRangeOptions(properties) { + this.uninterpretedOption = []; + this.declaration = []; + 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]]; + } + + /** + * ExtensionRangeOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ExtensionRangeOptions declaration. + * @member {Array.} declaration + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.declaration = $util.emptyArray; + + /** + * ExtensionRangeOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.features = null; + + /** + * ExtensionRangeOptions verification. + * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + */ + ExtensionRangeOptions.prototype.verification = 1; + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance + */ + ExtensionRangeOptions.create = function create(properties) { + return new ExtensionRangeOptions(properties); + }; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.declaration != null && message.declaration.length) + for (var i = 0; i < message.declaration.length; ++i) + $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 2: { + if (!(message.declaration && message.declaration.length)) + message.declaration = []; + message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.verification = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRangeOptions message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRangeOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message.declaration != null && message.hasOwnProperty("declaration")) { + if (!Array.isArray(message.declaration)) + return "declaration: array expected"; + for (var i = 0; i < message.declaration.length; ++i) { + var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); + if (error) + return "declaration." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.verification != null && message.hasOwnProperty("verification")) + switch (message.verification) { + default: + return "verification: enum value expected"; + case 0: + case 1: + break; + } + return null; + }; + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions + */ + ExtensionRangeOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions(); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object.declaration) { + if (!Array.isArray(object.declaration)) + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); + message.declaration = []; + for (var i = 0; i < object.declaration.length; ++i) { + if (typeof object.declaration[i] !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); + message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + switch (object.verification) { + case "DECLARATION": + case 0: + message.verification = 0; + break; + default: + if (typeof object.verification === "number") { + message.verification = object.verification; + break; + } + break; + case "UNVERIFIED": + case 1: + message.verification = 1; + break; + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRangeOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.declaration = []; + object.uninterpretedOption = []; + } + if (options.defaults) { + object.verification = options.enums === String ? "UNVERIFIED" : 1; + object.features = null; + } + if (message.declaration && message.declaration.length) { + object.declaration = []; + for (var j = 0; j < message.declaration.length; ++j) + object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); + } + if (message.verification != null && message.hasOwnProperty("verification")) + object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions + * @instance + * @returns {Object.} JSON object + */ + ExtensionRangeOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; + }; + + ExtensionRangeOptions.Declaration = (function() { + + /** + * Properties of a Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @interface IDeclaration + * @property {number|null} [number] Declaration number + * @property {string|null} [fullName] Declaration fullName + * @property {string|null} [type] Declaration type + * @property {boolean|null} [reserved] Declaration reserved + * @property {boolean|null} [repeated] Declaration repeated + */ + + /** + * Constructs a new Declaration. + * @memberof google.protobuf.ExtensionRangeOptions + * @classdesc Represents a Declaration. + * @implements IDeclaration + * @constructor + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + */ + function Declaration(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]]; + } + + /** + * Declaration number. + * @member {number} number + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.number = 0; + + /** + * Declaration fullName. + * @member {string} fullName + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.fullName = ""; + + /** + * Declaration type. + * @member {string} type + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.type = ""; + + /** + * Declaration reserved. + * @member {boolean} reserved + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.reserved = false; + + /** + * Declaration repeated. + * @member {boolean} repeated + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + */ + Declaration.prototype.repeated = false; + + /** + * Creates a new Declaration instance using the specified properties. + * @function create + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance + */ + Declaration.create = function create(properties) { + return new Declaration(properties); + }; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); + if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); + if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); + return writer; + }; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Declaration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.number = reader.int32(); + break; + } + case 2: { + message.fullName = reader.string(); + break; + } + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.reserved = reader.bool(); + break; + } + case 6: { + message.repeated = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Declaration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Declaration message. + * @function verify + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Declaration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.fullName != null && message.hasOwnProperty("fullName")) + if (!$util.isString(message.fullName)) + return "fullName: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.reserved != null && message.hasOwnProperty("reserved")) + if (typeof message.reserved !== "boolean") + return "reserved: boolean expected"; + if (message.repeated != null && message.hasOwnProperty("repeated")) + if (typeof message.repeated !== "boolean") + return "repeated: boolean expected"; + return null; + }; + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration + */ + Declaration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) + return object; + var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); + if (object.number != null) + message.number = object.number | 0; + if (object.fullName != null) + message.fullName = String(object.fullName); + if (object.type != null) + message.type = String(object.type); + if (object.reserved != null) + message.reserved = Boolean(object.reserved); + if (object.repeated != null) + message.repeated = Boolean(object.repeated); + return message; + }; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Declaration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.number = 0; + object.fullName = ""; + object.type = ""; + object.reserved = false; + object.repeated = false; + } + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.fullName != null && message.hasOwnProperty("fullName")) + object.fullName = message.fullName; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.reserved != null && message.hasOwnProperty("reserved")) + object.reserved = message.reserved; + if (message.repeated != null && message.hasOwnProperty("repeated")) + object.repeated = message.repeated; + return object; + }; + + /** + * Converts this Declaration to JSON. + * @function toJSON + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @instance + * @returns {Object.} JSON object + */ + Declaration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Declaration + * @function getTypeUrl + * @memberof google.protobuf.ExtensionRangeOptions.Declaration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; + }; + + return Declaration; + })(); + + /** + * VerificationState enum. + * @name google.protobuf.ExtensionRangeOptions.VerificationState + * @enum {number} + * @property {number} DECLARATION=0 DECLARATION value + * @property {number} UNVERIFIED=1 UNVERIFIED value + */ + ExtensionRangeOptions.VerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DECLARATION"] = 0; + values[valuesById[1] = "UNVERIFIED"] = 1; + return values; + })(); + + return ExtensionRangeOptions; + })(); + + protobuf.FieldDescriptorProto = (function() { + + /** + * Properties of a FieldDescriptorProto. + * @memberof google.protobuf + * @interface IFieldDescriptorProto + * @property {string|null} [name] FieldDescriptorProto name + * @property {number|null} [number] FieldDescriptorProto number + * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label + * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type + * @property {string|null} [typeName] FieldDescriptorProto typeName + * @property {string|null} [extendee] FieldDescriptorProto extendee + * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue + * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex + * @property {string|null} [jsonName] FieldDescriptorProto jsonName + * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options + * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional + */ + + /** + * Constructs a new FieldDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a FieldDescriptorProto. + * @implements IFieldDescriptorProto + * @constructor + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + */ + function FieldDescriptorProto(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]]; + } + + /** + * FieldDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.name = ""; + + /** + * FieldDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.number = 0; + + /** + * FieldDescriptorProto label. + * @member {google.protobuf.FieldDescriptorProto.Label} label + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.label = 1; + + /** + * FieldDescriptorProto type. + * @member {google.protobuf.FieldDescriptorProto.Type} type + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.type = 1; + + /** + * FieldDescriptorProto typeName. + * @member {string} typeName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.typeName = ""; + + /** + * FieldDescriptorProto extendee. + * @member {string} extendee + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.extendee = ""; + + /** + * FieldDescriptorProto defaultValue. + * @member {string} defaultValue + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.defaultValue = ""; + + /** + * FieldDescriptorProto oneofIndex. + * @member {number} oneofIndex + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.oneofIndex = 0; + + /** + * FieldDescriptorProto jsonName. + * @member {string} jsonName + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.jsonName = ""; + + /** + * FieldDescriptorProto options. + * @member {google.protobuf.IFieldOptions|null|undefined} options + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.options = null; + + /** + * FieldDescriptorProto proto3Optional. + * @member {boolean} proto3Optional + * @memberof google.protobuf.FieldDescriptorProto + * @instance + */ + FieldDescriptorProto.prototype.proto3Optional = false; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance + */ + FieldDescriptorProto.create = function create(properties) { + return new FieldDescriptorProto(properties); + }; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); + if (message.label != null && Object.hasOwnProperty.call(message, "label")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); + if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); + if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); + if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); + if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); + return writer; + }; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 3: + case 2: + break; + } + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + case 10: + case 11: + case 12: + case 13: + case 14: + case 15: + case 16: + case 17: + case 18: + break; + } + if (message.typeName != null && message.hasOwnProperty("typeName")) + if (!$util.isString(message.typeName)) + return "typeName: string expected"; + if (message.extendee != null && message.hasOwnProperty("extendee")) + if (!$util.isString(message.extendee)) + return "extendee: string expected"; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + if (!$util.isString(message.defaultValue)) + return "defaultValue: string expected"; + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + if (!$util.isInteger(message.oneofIndex)) + return "oneofIndex: integer expected"; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + if (!$util.isString(message.jsonName)) + return "jsonName: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.FieldOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + if (typeof message.proto3Optional !== "boolean") + return "proto3Optional: boolean expected"; + return null; + }; + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + */ + FieldDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldDescriptorProto) + return object; + var message = new $root.google.protobuf.FieldDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + switch (object.label) { + default: + if (typeof object.label === "number") { + message.label = object.label; + break; + } + break; + case "LABEL_OPTIONAL": + case 1: + message.label = 1; + break; + case "LABEL_REPEATED": + case 3: + message.label = 3; + break; + case "LABEL_REQUIRED": + case 2: + message.label = 2; + break; + } + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; + } + break; + case "TYPE_DOUBLE": + case 1: + message.type = 1; + break; + case "TYPE_FLOAT": + case 2: + message.type = 2; + break; + case "TYPE_INT64": + case 3: + message.type = 3; + break; + case "TYPE_UINT64": + case 4: + message.type = 4; + break; + case "TYPE_INT32": + case 5: + message.type = 5; + break; + case "TYPE_FIXED64": + case 6: + message.type = 6; + break; + case "TYPE_FIXED32": + case 7: + message.type = 7; + break; + case "TYPE_BOOL": + case 8: + message.type = 8; + break; + case "TYPE_STRING": + case 9: + message.type = 9; + break; + case "TYPE_GROUP": + case 10: + message.type = 10; + break; + case "TYPE_MESSAGE": + case 11: + message.type = 11; + break; + case "TYPE_BYTES": + case 12: + message.type = 12; + break; + case "TYPE_UINT32": + case 13: + message.type = 13; + break; + case "TYPE_ENUM": + case 14: + message.type = 14; + break; + case "TYPE_SFIXED32": + case 15: + message.type = 15; + break; + case "TYPE_SFIXED64": + case 16: + message.type = 16; + break; + case "TYPE_SINT32": + case 17: + message.type = 17; + break; + case "TYPE_SINT64": + case 18: + message.type = 18; + break; + } + if (object.typeName != null) + message.typeName = String(object.typeName); + if (object.extendee != null) + message.extendee = String(object.extendee); + if (object.defaultValue != null) + message.defaultValue = String(object.defaultValue); + if (object.oneofIndex != null) + message.oneofIndex = object.oneofIndex | 0; + if (object.jsonName != null) + message.jsonName = String(object.jsonName); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); + } + if (object.proto3Optional != null) + message.proto3Optional = Boolean(object.proto3Optional); + return message; + }; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.extendee = ""; + object.number = 0; + object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; + object.type = options.enums === String ? "TYPE_DOUBLE" : 1; + object.typeName = ""; + object.defaultValue = ""; + object.options = null; + object.oneofIndex = 0; + object.jsonName = ""; + object.proto3Optional = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.extendee != null && message.hasOwnProperty("extendee")) + object.extendee = message.extendee; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.label != null && message.hasOwnProperty("label")) + object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; + if (message.typeName != null && message.hasOwnProperty("typeName")) + object.typeName = message.typeName; + if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) + object.defaultValue = message.defaultValue; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); + if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) + object.oneofIndex = message.oneofIndex; + if (message.jsonName != null && message.hasOwnProperty("jsonName")) + object.jsonName = message.jsonName; + if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) + object.proto3Optional = message.proto3Optional; + return object; + }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.FieldDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + FieldDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; + }; + + /** + * Type enum. + * @name google.protobuf.FieldDescriptorProto.Type + * @enum {number} + * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value + * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value + * @property {number} TYPE_INT64=3 TYPE_INT64 value + * @property {number} TYPE_UINT64=4 TYPE_UINT64 value + * @property {number} TYPE_INT32=5 TYPE_INT32 value + * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value + * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value + * @property {number} TYPE_BOOL=8 TYPE_BOOL value + * @property {number} TYPE_STRING=9 TYPE_STRING value + * @property {number} TYPE_GROUP=10 TYPE_GROUP value + * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value + * @property {number} TYPE_BYTES=12 TYPE_BYTES value + * @property {number} TYPE_UINT32=13 TYPE_UINT32 value + * @property {number} TYPE_ENUM=14 TYPE_ENUM value + * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value + * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value + * @property {number} TYPE_SINT32=17 TYPE_SINT32 value + * @property {number} TYPE_SINT64=18 TYPE_SINT64 value + */ + FieldDescriptorProto.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "TYPE_DOUBLE"] = 1; + values[valuesById[2] = "TYPE_FLOAT"] = 2; + values[valuesById[3] = "TYPE_INT64"] = 3; + values[valuesById[4] = "TYPE_UINT64"] = 4; + values[valuesById[5] = "TYPE_INT32"] = 5; + values[valuesById[6] = "TYPE_FIXED64"] = 6; + values[valuesById[7] = "TYPE_FIXED32"] = 7; + values[valuesById[8] = "TYPE_BOOL"] = 8; + values[valuesById[9] = "TYPE_STRING"] = 9; + values[valuesById[10] = "TYPE_GROUP"] = 10; + values[valuesById[11] = "TYPE_MESSAGE"] = 11; + values[valuesById[12] = "TYPE_BYTES"] = 12; + values[valuesById[13] = "TYPE_UINT32"] = 13; + values[valuesById[14] = "TYPE_ENUM"] = 14; + values[valuesById[15] = "TYPE_SFIXED32"] = 15; + values[valuesById[16] = "TYPE_SFIXED64"] = 16; + values[valuesById[17] = "TYPE_SINT32"] = 17; + values[valuesById[18] = "TYPE_SINT64"] = 18; + return values; + })(); + + /** + * Label enum. + * @name google.protobuf.FieldDescriptorProto.Label + * @enum {number} + * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value + * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value + * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value + */ + FieldDescriptorProto.Label = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "LABEL_OPTIONAL"] = 1; + values[valuesById[3] = "LABEL_REPEATED"] = 3; + values[valuesById[2] = "LABEL_REQUIRED"] = 2; + return values; + })(); + + return FieldDescriptorProto; + })(); + + protobuf.OneofDescriptorProto = (function() { + + /** + * Properties of an OneofDescriptorProto. + * @memberof google.protobuf + * @interface IOneofDescriptorProto + * @property {string|null} [name] OneofDescriptorProto name + * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options + */ + + /** + * Constructs a new OneofDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an OneofDescriptorProto. + * @implements IOneofDescriptorProto + * @constructor + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + */ + function OneofDescriptorProto(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]]; + } + + /** + * OneofDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.name = ""; + + /** + * OneofDescriptorProto options. + * @member {google.protobuf.IOneofOptions|null|undefined} options + * @memberof google.protobuf.OneofDescriptorProto + * @instance + */ + OneofDescriptorProto.prototype.options = null; + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance + */ + OneofDescriptorProto.create = function create(properties) { + return new OneofDescriptorProto(properties); + }; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + 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]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * EnumDescriptorProto visibility. + * @member {google.protobuf.SymbolVisibility} visibility + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.visibility = 0; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + case 6: { + message.visibility = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + switch (message.visibility) { + default: + return "visibility: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + switch (object.visibility) { + default: + if (typeof object.visibility === "number") { + message.visibility = object.visibility; + break; + } + break; + case "VISIBILITY_UNSET": + case 0: + message.visibility = 0; + break; + case "VISIBILITY_LOCAL": + case 1: + message.visibility = 1; + break; + case "VISIBILITY_EXPORT": + case 2: + message.visibility = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + if (message.visibility != null && message.hasOwnProperty("visibility")) + object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(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]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(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]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + 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]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(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]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [deprecated] FileOptions deprecated + * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas + * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix + * @property {string|null} [csharpNamespace] FileOptions csharpNamespace + * @property {string|null} [swiftPrefix] FileOptions swiftPrefix + * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix + * @property {string|null} [phpNamespace] FileOptions phpNamespace + * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace + * @property {string|null} [rubyPackage] FileOptions rubyPackage + * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features + * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption + * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition + */ + + /** + * Constructs a new FileOptions. + * @memberof google.protobuf + * @classdesc Represents a FileOptions. + * @implements IFileOptions + * @constructor + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + */ + function FileOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.resourceDefinition"] = []; + 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]]; + } + + /** + * FileOptions javaPackage. + * @member {string} javaPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaPackage = ""; + + /** + * FileOptions javaOuterClassname. + * @member {string} javaOuterClassname + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaOuterClassname = ""; + + /** + * FileOptions javaMultipleFiles. + * @member {boolean} javaMultipleFiles + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaMultipleFiles = false; + + /** + * FileOptions javaGenerateEqualsAndHash. + * @member {boolean} javaGenerateEqualsAndHash + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenerateEqualsAndHash = false; + + /** + * FileOptions javaStringCheckUtf8. + * @member {boolean} javaStringCheckUtf8 + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaStringCheckUtf8 = false; + + /** + * FileOptions optimizeFor. + * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.optimizeFor = 1; + + /** + * FileOptions goPackage. + * @member {string} goPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.goPackage = ""; + + /** + * FileOptions ccGenericServices. + * @member {boolean} ccGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccGenericServices = false; + + /** + * FileOptions javaGenericServices. + * @member {boolean} javaGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.javaGenericServices = false; + + /** + * FileOptions pyGenericServices. + * @member {boolean} pyGenericServices + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.pyGenericServices = false; + + /** + * FileOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.deprecated = false; + + /** + * FileOptions ccEnableArenas. + * @member {boolean} ccEnableArenas + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.ccEnableArenas = true; + + /** + * FileOptions objcClassPrefix. + * @member {string} objcClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.objcClassPrefix = ""; + + /** + * FileOptions csharpNamespace. + * @member {string} csharpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.csharpNamespace = ""; + + /** + * FileOptions swiftPrefix. + * @member {string} swiftPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.swiftPrefix = ""; + + /** + * FileOptions phpClassPrefix. + * @member {string} phpClassPrefix + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpClassPrefix = ""; + + /** + * FileOptions phpNamespace. + * @member {string} phpNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpNamespace = ""; + + /** + * FileOptions phpMetadataNamespace. + * @member {string} phpMetadataNamespace + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.phpMetadataNamespace = ""; + + /** + * FileOptions rubyPackage. + * @member {string} rubyPackage + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.rubyPackage = ""; + + /** + * FileOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.features = null; + + /** + * FileOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FileOptions .google.api.resourceDefinition. + * @member {Array.} .google.api.resourceDefinition + * @memberof google.protobuf.FileOptions + * @instance + */ + FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; + + /** + * Creates a new FileOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions=} [properties] Properties to set + * @returns {google.protobuf.FileOptions} FileOptions instance + */ + FileOptions.create = function create(properties) { + return new FileOptions(properties); + }; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); + if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); + if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) + writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); + if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); + if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); + if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); + if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) + writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); + if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) + writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); + if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) + writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); + if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) + writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); + if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) + writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); + if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) + writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); + if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) + writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); + if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) + writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); + if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) + writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); + if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) + writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); + if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) + writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); + if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) + writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 23: { + message.deprecated = reader.bool(); + break; + } + case 31: { + message.ccEnableArenas = reader.bool(); + break; + } + case 36: { + message.objcClassPrefix = reader.string(); + break; + } + case 37: { + message.csharpNamespace = reader.string(); + break; + } + case 39: { + message.swiftPrefix = reader.string(); + break; + } + case 40: { + message.phpClassPrefix = reader.string(); + break; + } + case 41: { + message.phpNamespace = reader.string(); + break; + } + case 44: { + message.phpMetadataNamespace = reader.string(); + break; + } + case 45: { + message.rubyPackage = reader.string(); + break; + } + case 50: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) + message[".google.api.resourceDefinition"] = []; + message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileOptions} FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileOptions message. + * @function verify + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + if (!$util.isString(message.javaPackage)) + return "javaPackage: string expected"; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + if (!$util.isString(message.javaOuterClassname)) + return "javaOuterClassname: string expected"; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + if (typeof message.javaMultipleFiles !== "boolean") + return "javaMultipleFiles: boolean expected"; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + if (typeof message.javaGenerateEqualsAndHash !== "boolean") + return "javaGenerateEqualsAndHash: boolean expected"; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + if (typeof message.javaStringCheckUtf8 !== "boolean") + return "javaStringCheckUtf8: boolean expected"; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + switch (message.optimizeFor) { + default: + return "optimizeFor: enum value expected"; + case 1: + case 2: + case 3: + break; + } + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + if (!$util.isString(message.goPackage)) + return "goPackage: string expected"; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + if (typeof message.ccGenericServices !== "boolean") + return "ccGenericServices: boolean expected"; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + if (typeof message.javaGenericServices !== "boolean") + return "javaGenericServices: boolean expected"; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + if (typeof message.pyGenericServices !== "boolean") + return "pyGenericServices: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + if (typeof message.ccEnableArenas !== "boolean") + return "ccEnableArenas: boolean expected"; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + if (!$util.isString(message.objcClassPrefix)) + return "objcClassPrefix: string expected"; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + if (!$util.isString(message.csharpNamespace)) + return "csharpNamespace: string expected"; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + if (!$util.isString(message.swiftPrefix)) + return "swiftPrefix: string expected"; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + if (!$util.isString(message.phpClassPrefix)) + return "phpClassPrefix: string expected"; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + if (!$util.isString(message.phpNamespace)) + return "phpNamespace: string expected"; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + if (!$util.isString(message.phpMetadataNamespace)) + return "phpMetadataNamespace: string expected"; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + if (!$util.isString(message.rubyPackage)) + return "rubyPackage: string expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { + if (!Array.isArray(message[".google.api.resourceDefinition"])) + return ".google.api.resourceDefinition: array expected"; + for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); + if (error) + return ".google.api.resourceDefinition." + error; + } + } + return null; + }; + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileOptions} FileOptions + */ + FileOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileOptions) + return object; + var message = new $root.google.protobuf.FileOptions(); + if (object.javaPackage != null) + message.javaPackage = String(object.javaPackage); + if (object.javaOuterClassname != null) + message.javaOuterClassname = String(object.javaOuterClassname); + if (object.javaMultipleFiles != null) + message.javaMultipleFiles = Boolean(object.javaMultipleFiles); + if (object.javaGenerateEqualsAndHash != null) + message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); + if (object.javaStringCheckUtf8 != null) + message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); + switch (object.optimizeFor) { + default: + if (typeof object.optimizeFor === "number") { + message.optimizeFor = object.optimizeFor; + break; + } + break; + case "SPEED": + case 1: + message.optimizeFor = 1; + break; + case "CODE_SIZE": + case 2: + message.optimizeFor = 2; + break; + case "LITE_RUNTIME": + case 3: + message.optimizeFor = 3; + break; + } + if (object.goPackage != null) + message.goPackage = String(object.goPackage); + if (object.ccGenericServices != null) + message.ccGenericServices = Boolean(object.ccGenericServices); + if (object.javaGenericServices != null) + message.javaGenericServices = Boolean(object.javaGenericServices); + if (object.pyGenericServices != null) + message.pyGenericServices = Boolean(object.pyGenericServices); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.ccEnableArenas != null) + message.ccEnableArenas = Boolean(object.ccEnableArenas); + if (object.objcClassPrefix != null) + message.objcClassPrefix = String(object.objcClassPrefix); + if (object.csharpNamespace != null) + message.csharpNamespace = String(object.csharpNamespace); + if (object.swiftPrefix != null) + message.swiftPrefix = String(object.swiftPrefix); + if (object.phpClassPrefix != null) + message.phpClassPrefix = String(object.phpClassPrefix); + if (object.phpNamespace != null) + message.phpNamespace = String(object.phpNamespace); + if (object.phpMetadataNamespace != null) + message.phpMetadataNamespace = String(object.phpMetadataNamespace); + if (object.rubyPackage != null) + message.rubyPackage = String(object.rubyPackage); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FileOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resourceDefinition"]) { + if (!Array.isArray(object[".google.api.resourceDefinition"])) + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); + message[".google.api.resourceDefinition"] = []; + for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { + if (typeof object[".google.api.resourceDefinition"][i] !== "object") + throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); + message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileOptions + * @static + * @param {google.protobuf.FileOptions} message FileOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.resourceDefinition"] = []; + } + if (options.defaults) { + object.javaPackage = ""; + object.javaOuterClassname = ""; + object.optimizeFor = options.enums === String ? "SPEED" : 1; + object.javaMultipleFiles = false; + object.goPackage = ""; + object.ccGenericServices = false; + object.javaGenericServices = false; + object.pyGenericServices = false; + object.javaGenerateEqualsAndHash = false; + object.deprecated = false; + object.javaStringCheckUtf8 = false; + object.ccEnableArenas = true; + object.objcClassPrefix = ""; + object.csharpNamespace = ""; + object.swiftPrefix = ""; + object.phpClassPrefix = ""; + object.phpNamespace = ""; + object.phpMetadataNamespace = ""; + object.rubyPackage = ""; + object.features = null; + } + if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) + object.javaPackage = message.javaPackage; + if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) + object.javaOuterClassname = message.javaOuterClassname; + if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) + object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; + if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) + object.javaMultipleFiles = message.javaMultipleFiles; + if (message.goPackage != null && message.hasOwnProperty("goPackage")) + object.goPackage = message.goPackage; + if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) + object.ccGenericServices = message.ccGenericServices; + if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) + object.javaGenericServices = message.javaGenericServices; + if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) + object.pyGenericServices = message.pyGenericServices; + if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) + object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) + object.javaStringCheckUtf8 = message.javaStringCheckUtf8; + if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) + object.ccEnableArenas = message.ccEnableArenas; + if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) + object.objcClassPrefix = message.objcClassPrefix; + if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) + object.csharpNamespace = message.csharpNamespace; + if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) + object.swiftPrefix = message.swiftPrefix; + if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) + object.phpClassPrefix = message.phpClassPrefix; + if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) + object.phpNamespace = message.phpNamespace; + if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) + object.phpMetadataNamespace = message.phpMetadataNamespace; + if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) + object.rubyPackage = message.rubyPackage; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { + object[".google.api.resourceDefinition"] = []; + for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) + object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); + } + return object; + }; + + /** + * Converts this FileOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FileOptions + * @instance + * @returns {Object.} JSON object + */ + FileOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileOptions + * @function getTypeUrl + * @memberof google.protobuf.FileOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileOptions"; + }; + + /** + * OptimizeMode enum. + * @name google.protobuf.FileOptions.OptimizeMode + * @enum {number} + * @property {number} SPEED=1 SPEED value + * @property {number} CODE_SIZE=2 CODE_SIZE value + * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value + */ + FileOptions.OptimizeMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[1] = "SPEED"] = 1; + values[valuesById[2] = "CODE_SIZE"] = 2; + values[valuesById[3] = "LITE_RUNTIME"] = 3; + return values; + })(); + + return FileOptions; + })(); + + protobuf.MessageOptions = (function() { + + /** + * Properties of a MessageOptions. + * @memberof google.protobuf + * @interface IMessageOptions + * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat + * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor + * @property {boolean|null} [deprecated] MessageOptions deprecated + * @property {boolean|null} [mapEntry] MessageOptions mapEntry + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features + * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption + * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource + */ + + /** + * Constructs a new MessageOptions. + * @memberof google.protobuf + * @classdesc Represents a MessageOptions. + * @implements IMessageOptions + * @constructor + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + */ + function MessageOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * MessageOptions messageSetWireFormat. + * @member {boolean} messageSetWireFormat + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.messageSetWireFormat = false; + + /** + * MessageOptions noStandardDescriptorAccessor. + * @member {boolean} noStandardDescriptorAccessor + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.noStandardDescriptorAccessor = false; + + /** + * MessageOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecated = false; + + /** + * MessageOptions mapEntry. + * @member {boolean} mapEntry + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.mapEntry = false; + + /** + * MessageOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * MessageOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.features = null; + + /** + * MessageOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MessageOptions .google.api.resource. + * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource + * @memberof google.protobuf.MessageOptions + * @instance + */ + MessageOptions.prototype[".google.api.resource"] = null; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions=} [properties] Properties to set + * @returns {google.protobuf.MessageOptions} MessageOptions instance + */ + MessageOptions.create = function create(properties) { + return new MessageOptions(properties); + }; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); + if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) + writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) + $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 11: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 12: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1053: { + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MessageOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MessageOptions} MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MessageOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MessageOptions message. + * @function verify + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MessageOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + if (typeof message.messageSetWireFormat !== "boolean") + return "messageSetWireFormat: boolean expected"; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + if (typeof message.noStandardDescriptorAccessor !== "boolean") + return "noStandardDescriptorAccessor: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + if (typeof message.mapEntry !== "boolean") + return "mapEntry: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { + var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); + if (error) + return ".google.api.resource." + error; + } + return null; + }; + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MessageOptions} MessageOptions + */ + MessageOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MessageOptions) + return object; + var message = new $root.google.protobuf.MessageOptions(); + if (object.messageSetWireFormat != null) + message.messageSetWireFormat = Boolean(object.messageSetWireFormat); + if (object.noStandardDescriptorAccessor != null) + message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.mapEntry != null) + message.mapEntry = Boolean(object.mapEntry); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MessageOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.resource"] != null) { + if (typeof object[".google.api.resource"] !== "object") + throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); + message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); + } + return message; + }; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MessageOptions + * @static + * @param {google.protobuf.MessageOptions} message MessageOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MessageOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.messageSetWireFormat = false; + object.noStandardDescriptorAccessor = false; + object.deprecated = false; + object.mapEntry = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + object[".google.api.resource"] = null; + } + if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) + object.messageSetWireFormat = message.messageSetWireFormat; + if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) + object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) + object.mapEntry = message.mapEntry; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) + object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); + return object; + }; + + /** + * Converts this MessageOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MessageOptions + * @instance + * @returns {Object.} JSON object + */ + MessageOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MessageOptions + * @function getTypeUrl + * @memberof google.protobuf.MessageOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MessageOptions"; + }; + + return MessageOptions; + })(); + + protobuf.FieldOptions = (function() { + + /** + * Properties of a FieldOptions. + * @memberof google.protobuf + * @interface IFieldOptions + * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype + * @property {boolean|null} [packed] FieldOptions packed + * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype + * @property {boolean|null} [lazy] FieldOptions lazy + * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy + * @property {boolean|null} [deprecated] FieldOptions deprecated + * @property {boolean|null} [weak] FieldOptions weak + * @property {boolean|null} [debugRedact] FieldOptions debugRedact + * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention + * @property {Array.|null} [targets] FieldOptions targets + * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults + * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport + * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption + * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior + * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference + */ + + /** + * Constructs a new FieldOptions. + * @memberof google.protobuf + * @classdesc Represents a FieldOptions. + * @implements IFieldOptions + * @constructor + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + */ + function FieldOptions(properties) { + this.targets = []; + this.editionDefaults = []; + this.uninterpretedOption = []; + this[".google.api.fieldBehavior"] = []; + 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]]; + } + + /** + * FieldOptions ctype. + * @member {google.protobuf.FieldOptions.CType} ctype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.ctype = 0; + + /** + * FieldOptions packed. + * @member {boolean} packed + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.packed = false; + + /** + * FieldOptions jstype. + * @member {google.protobuf.FieldOptions.JSType} jstype + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.jstype = 0; + + /** + * FieldOptions lazy. + * @member {boolean} lazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.lazy = false; + + /** + * FieldOptions unverifiedLazy. + * @member {boolean} unverifiedLazy + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.unverifiedLazy = false; + + /** + * FieldOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.deprecated = false; + + /** + * FieldOptions weak. + * @member {boolean} weak + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.weak = false; + + /** + * FieldOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.debugRedact = false; + + /** + * FieldOptions retention. + * @member {google.protobuf.FieldOptions.OptionRetention} retention + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.retention = 0; + + /** + * FieldOptions targets. + * @member {Array.} targets + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.targets = $util.emptyArray; + + /** + * FieldOptions editionDefaults. + * @member {Array.} editionDefaults + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.editionDefaults = $util.emptyArray; + + /** + * FieldOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.features = null; + + /** + * FieldOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.featureSupport = null; + + /** + * FieldOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * FieldOptions .google.api.fieldBehavior. + * @member {Array.} .google.api.fieldBehavior + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; + + /** + * FieldOptions .google.api.resourceReference. + * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference + * @memberof google.protobuf.FieldOptions + * @instance + */ + FieldOptions.prototype[".google.api.resourceReference"] = null; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions} FieldOptions instance + */ + FieldOptions.create = function create(properties) { + return new FieldOptions(properties); + }; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); + if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); + if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); + if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) + writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); + if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) + writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); + if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) + writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); + if (message.targets != null && message.targets.length) + for (var i = 0; i < message.targets.length; ++i) + writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); + if (message.editionDefaults != null && message.editionDefaults.length) + for (var i = 0; i < message.editionDefaults.length; ++i) + $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 16: { + message.debugRedact = reader.bool(); + break; + } + case 17: { + message.retention = reader.int32(); + break; + } + case 19: { + if (!(message.targets && message.targets.length)) + message.targets = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.targets.push(reader.int32()); + } else + message.targets.push(reader.int32()); + break; + } + case 20: { + if (!(message.editionDefaults && message.editionDefaults.length)) + message.editionDefaults = []; + message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); + break; + } + case 21: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 22: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1052: { + if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) + message[".google.api.fieldBehavior"] = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message[".google.api.fieldBehavior"].push(reader.int32()); + } else + message[".google.api.fieldBehavior"].push(reader.int32()); + break; + } + case 1055: { + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldOptions message. + * @function verify + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.ctype != null && message.hasOwnProperty("ctype")) + switch (message.ctype) { + default: + return "ctype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.packed != null && message.hasOwnProperty("packed")) + if (typeof message.packed !== "boolean") + return "packed: boolean expected"; + if (message.jstype != null && message.hasOwnProperty("jstype")) + switch (message.jstype) { + default: + return "jstype: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.lazy != null && message.hasOwnProperty("lazy")) + if (typeof message.lazy !== "boolean") + return "lazy: boolean expected"; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + if (typeof message.unverifiedLazy !== "boolean") + return "unverifiedLazy: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.weak != null && message.hasOwnProperty("weak")) + if (typeof message.weak !== "boolean") + return "weak: boolean expected"; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.retention != null && message.hasOwnProperty("retention")) + switch (message.retention) { + default: + return "retention: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.targets != null && message.hasOwnProperty("targets")) { + if (!Array.isArray(message.targets)) + return "targets: array expected"; + for (var i = 0; i < message.targets.length; ++i) + switch (message.targets[i]) { + default: + return "targets: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + case 9: + break; + } + } + if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { + if (!Array.isArray(message.editionDefaults)) + return "editionDefaults: array expected"; + for (var i = 0; i < message.editionDefaults.length; ++i) { + var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); + if (error) + return "editionDefaults." + error; + } + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { + if (!Array.isArray(message[".google.api.fieldBehavior"])) + return ".google.api.fieldBehavior: array expected"; + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + switch (message[".google.api.fieldBehavior"][i]) { + default: + return ".google.api.fieldBehavior: enum value[] expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + break; + } + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { + var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); + if (error) + return ".google.api.resourceReference." + error; + } + return null; + }; + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions} FieldOptions + */ + FieldOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions) + return object; + var message = new $root.google.protobuf.FieldOptions(); + switch (object.ctype) { + default: + if (typeof object.ctype === "number") { + message.ctype = object.ctype; + break; + } + break; + case "STRING": + case 0: + message.ctype = 0; + break; + case "CORD": + case 1: + message.ctype = 1; + break; + case "STRING_PIECE": + case 2: + message.ctype = 2; + break; + } + if (object.packed != null) + message.packed = Boolean(object.packed); + switch (object.jstype) { + default: + if (typeof object.jstype === "number") { + message.jstype = object.jstype; + break; + } + break; + case "JS_NORMAL": + case 0: + message.jstype = 0; + break; + case "JS_STRING": + case 1: + message.jstype = 1; + break; + case "JS_NUMBER": + case 2: + message.jstype = 2; + break; + } + if (object.lazy != null) + message.lazy = Boolean(object.lazy); + if (object.unverifiedLazy != null) + message.unverifiedLazy = Boolean(object.unverifiedLazy); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.weak != null) + message.weak = Boolean(object.weak); + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + switch (object.retention) { + default: + if (typeof object.retention === "number") { + message.retention = object.retention; + break; + } + break; + case "RETENTION_UNKNOWN": + case 0: + message.retention = 0; + break; + case "RETENTION_RUNTIME": + case 1: + message.retention = 1; + break; + case "RETENTION_SOURCE": + case 2: + message.retention = 2; + break; + } + if (object.targets) { + if (!Array.isArray(object.targets)) + throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); + message.targets = []; + for (var i = 0; i < object.targets.length; ++i) + switch (object.targets[i]) { + default: + if (typeof object.targets[i] === "number") { + message.targets[i] = object.targets[i]; + break; + } + case "TARGET_TYPE_UNKNOWN": + case 0: + message.targets[i] = 0; + break; + case "TARGET_TYPE_FILE": + case 1: + message.targets[i] = 1; + break; + case "TARGET_TYPE_EXTENSION_RANGE": + case 2: + message.targets[i] = 2; + break; + case "TARGET_TYPE_MESSAGE": + case 3: + message.targets[i] = 3; + break; + case "TARGET_TYPE_FIELD": + case 4: + message.targets[i] = 4; + break; + case "TARGET_TYPE_ONEOF": + case 5: + message.targets[i] = 5; + break; + case "TARGET_TYPE_ENUM": + case 6: + message.targets[i] = 6; + break; + case "TARGET_TYPE_ENUM_ENTRY": + case 7: + message.targets[i] = 7; + break; + case "TARGET_TYPE_SERVICE": + case 8: + message.targets[i] = 8; + break; + case "TARGET_TYPE_METHOD": + case 9: + message.targets[i] = 9; + break; + } + } + if (object.editionDefaults) { + if (!Array.isArray(object.editionDefaults)) + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); + message.editionDefaults = []; + for (var i = 0; i < object.editionDefaults.length; ++i) { + if (typeof object.editionDefaults[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); + message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); + } + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.FieldOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.fieldBehavior"]) { + if (!Array.isArray(object[".google.api.fieldBehavior"])) + throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); + message[".google.api.fieldBehavior"] = []; + for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) + switch (object[".google.api.fieldBehavior"][i]) { + default: + if (typeof object[".google.api.fieldBehavior"][i] === "number") { + message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; + break; + } + case "FIELD_BEHAVIOR_UNSPECIFIED": + case 0: + message[".google.api.fieldBehavior"][i] = 0; + break; + case "OPTIONAL": + case 1: + message[".google.api.fieldBehavior"][i] = 1; + break; + case "REQUIRED": + case 2: + message[".google.api.fieldBehavior"][i] = 2; + break; + case "OUTPUT_ONLY": + case 3: + message[".google.api.fieldBehavior"][i] = 3; + break; + case "INPUT_ONLY": + case 4: + message[".google.api.fieldBehavior"][i] = 4; + break; + case "IMMUTABLE": + case 5: + message[".google.api.fieldBehavior"][i] = 5; + break; + case "UNORDERED_LIST": + case 6: + message[".google.api.fieldBehavior"][i] = 6; + break; + case "NON_EMPTY_DEFAULT": + case 7: + message[".google.api.fieldBehavior"][i] = 7; + break; + case "IDENTIFIER": + case 8: + message[".google.api.fieldBehavior"][i] = 8; + break; + } + } + if (object[".google.api.resourceReference"] != null) { + if (typeof object[".google.api.resourceReference"] !== "object") + throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); + message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); + } + return message; + }; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.FieldOptions} message FieldOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.targets = []; + object.editionDefaults = []; + object.uninterpretedOption = []; + object[".google.api.fieldBehavior"] = []; + } + if (options.defaults) { + object.ctype = options.enums === String ? "STRING" : 0; + object.packed = false; + object.deprecated = false; + object.lazy = false; + object.jstype = options.enums === String ? "JS_NORMAL" : 0; + object.weak = false; + object.unverifiedLazy = false; + object.debugRedact = false; + object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; + object.features = null; + object.featureSupport = null; + object[".google.api.resourceReference"] = null; + } + if (message.ctype != null && message.hasOwnProperty("ctype")) + object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; + if (message.packed != null && message.hasOwnProperty("packed")) + object.packed = message.packed; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.lazy != null && message.hasOwnProperty("lazy")) + object.lazy = message.lazy; + if (message.jstype != null && message.hasOwnProperty("jstype")) + object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; + if (message.weak != null && message.hasOwnProperty("weak")) + object.weak = message.weak; + if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) + object.unverifiedLazy = message.unverifiedLazy; + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.retention != null && message.hasOwnProperty("retention")) + object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; + if (message.targets && message.targets.length) { + object.targets = []; + for (var j = 0; j < message.targets.length; ++j) + object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; + } + if (message.editionDefaults && message.editionDefaults.length) { + object.editionDefaults = []; + for (var j = 0; j < message.editionDefaults.length; ++j) + object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); + } + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { + object[".google.api.fieldBehavior"] = []; + for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) + object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; + } + if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) + object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); + return object; + }; + + /** + * Converts this FieldOptions to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions + * @instance + * @returns {Object.} JSON object + */ + FieldOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldOptions + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions"; + }; + + /** + * CType enum. + * @name google.protobuf.FieldOptions.CType + * @enum {number} + * @property {number} STRING=0 STRING value + * @property {number} CORD=1 CORD value + * @property {number} STRING_PIECE=2 STRING_PIECE value + */ + FieldOptions.CType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STRING"] = 0; + values[valuesById[1] = "CORD"] = 1; + values[valuesById[2] = "STRING_PIECE"] = 2; + return values; + })(); + + /** + * JSType enum. + * @name google.protobuf.FieldOptions.JSType + * @enum {number} + * @property {number} JS_NORMAL=0 JS_NORMAL value + * @property {number} JS_STRING=1 JS_STRING value + * @property {number} JS_NUMBER=2 JS_NUMBER value + */ + FieldOptions.JSType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JS_NORMAL"] = 0; + values[valuesById[1] = "JS_STRING"] = 1; + values[valuesById[2] = "JS_NUMBER"] = 2; + return values; + })(); + + /** + * OptionRetention enum. + * @name google.protobuf.FieldOptions.OptionRetention + * @enum {number} + * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value + * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value + * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value + */ + FieldOptions.OptionRetention = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; + values[valuesById[1] = "RETENTION_RUNTIME"] = 1; + values[valuesById[2] = "RETENTION_SOURCE"] = 2; + return values; + })(); + + /** + * OptionTargetType enum. + * @name google.protobuf.FieldOptions.OptionTargetType + * @enum {number} + * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value + * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value + * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value + * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value + * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value + * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value + * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value + * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value + * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value + * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value + */ + FieldOptions.OptionTargetType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; + values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; + values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; + values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; + values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; + values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; + values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; + values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; + values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; + return values; + })(); + + FieldOptions.EditionDefault = (function() { + + /** + * Properties of an EditionDefault. + * @memberof google.protobuf.FieldOptions + * @interface IEditionDefault + * @property {google.protobuf.Edition|null} [edition] EditionDefault edition + * @property {string|null} [value] EditionDefault value + */ + + /** + * Constructs a new EditionDefault. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents an EditionDefault. + * @implements IEditionDefault + * @constructor + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + */ + function EditionDefault(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]]; + } + + /** + * EditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.edition = 0; + + /** + * EditionDefault value. + * @member {string} value + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + */ + EditionDefault.prototype.value = ""; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance + */ + EditionDefault.create = function create(properties) { + return new EditionDefault(properties); + }; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + return writer; + }; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 2: { + message.value = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EditionDefault message. + * @function verify + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.value != null && message.hasOwnProperty("value")) + if (!$util.isString(message.value)) + return "value: string expected"; + return null; + }; + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault + */ + EditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) + return object; + var message = new $root.google.protobuf.FieldOptions.EditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.value != null) + message.value = String(object.value); + return message; + }; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.value = ""; + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.value != null && message.hasOwnProperty("value")) + object.value = message.value; + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + return object; + }; + + /** + * Converts this EditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.EditionDefault + * @instance + * @returns {Object.} JSON object + */ + EditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.EditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; + }; + + return EditionDefault; + })(); + + FieldOptions.FeatureSupport = (function() { + + /** + * Properties of a FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @interface IFeatureSupport + * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced + * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated + * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning + * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved + */ + + /** + * Constructs a new FeatureSupport. + * @memberof google.protobuf.FieldOptions + * @classdesc Represents a FeatureSupport. + * @implements IFeatureSupport + * @constructor + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + */ + function FeatureSupport(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]]; + } + + /** + * FeatureSupport editionIntroduced. + * @member {google.protobuf.Edition} editionIntroduced + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionIntroduced = 0; + + /** + * FeatureSupport editionDeprecated. + * @member {google.protobuf.Edition} editionDeprecated + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionDeprecated = 0; + + /** + * FeatureSupport deprecationWarning. + * @member {string} deprecationWarning + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.deprecationWarning = ""; + + /** + * FeatureSupport editionRemoved. + * @member {google.protobuf.Edition} editionRemoved + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + */ + FeatureSupport.prototype.editionRemoved = 0; + + /** + * Creates a new FeatureSupport instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance + */ + FeatureSupport.create = function create(properties) { + return new FeatureSupport(properties); + }; + + /** + * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); + if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); + if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); + if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); + return writer; + }; + + /** + * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.editionIntroduced = reader.int32(); + break; + } + case 2: { + message.editionDeprecated = reader.int32(); + break; + } + case 3: { + message.deprecationWarning = reader.string(); + break; + } + case 4: { + message.editionRemoved = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSupport.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSupport message. + * @function verify + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSupport.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + switch (message.editionIntroduced) { + default: + return "editionIntroduced: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + switch (message.editionDeprecated) { + default: + return "editionDeprecated: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + if (!$util.isString(message.deprecationWarning)) + return "deprecationWarning: string expected"; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + switch (message.editionRemoved) { + default: + return "editionRemoved: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport + */ + FeatureSupport.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) + return object; + var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); + switch (object.editionIntroduced) { + default: + if (typeof object.editionIntroduced === "number") { + message.editionIntroduced = object.editionIntroduced; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionIntroduced = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionIntroduced = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionIntroduced = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionIntroduced = 999; + break; + case "EDITION_2023": + case 1000: + message.editionIntroduced = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionIntroduced = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionIntroduced = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionIntroduced = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionIntroduced = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionIntroduced = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionIntroduced = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionIntroduced = 2147483647; + break; + } + switch (object.editionDeprecated) { + default: + if (typeof object.editionDeprecated === "number") { + message.editionDeprecated = object.editionDeprecated; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionDeprecated = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionDeprecated = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionDeprecated = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionDeprecated = 999; + break; + case "EDITION_2023": + case 1000: + message.editionDeprecated = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionDeprecated = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionDeprecated = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionDeprecated = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionDeprecated = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionDeprecated = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionDeprecated = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionDeprecated = 2147483647; + break; + } + if (object.deprecationWarning != null) + message.deprecationWarning = String(object.deprecationWarning); + switch (object.editionRemoved) { + default: + if (typeof object.editionRemoved === "number") { + message.editionRemoved = object.editionRemoved; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.editionRemoved = 0; + break; + case "EDITION_LEGACY": + case 900: + message.editionRemoved = 900; + break; + case "EDITION_PROTO2": + case 998: + message.editionRemoved = 998; + break; + case "EDITION_PROTO3": + case 999: + message.editionRemoved = 999; + break; + case "EDITION_2023": + case 1000: + message.editionRemoved = 1000; + break; + case "EDITION_2024": + case 1001: + message.editionRemoved = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.editionRemoved = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.editionRemoved = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.editionRemoved = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.editionRemoved = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.editionRemoved = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.editionRemoved = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSupport.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.deprecationWarning = ""; + object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) + object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; + if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) + object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; + if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) + object.deprecationWarning = message.deprecationWarning; + if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) + object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; + return object; + }; + + /** + * Converts this FeatureSupport to JSON. + * @function toJSON + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @instance + * @returns {Object.} JSON object + */ + FeatureSupport.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSupport + * @function getTypeUrl + * @memberof google.protobuf.FieldOptions.FeatureSupport + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; + }; + + return FeatureSupport; + })(); + + return FieldOptions; + })(); + + protobuf.OneofOptions = (function() { + + /** + * Properties of an OneofOptions. + * @memberof google.protobuf + * @interface IOneofOptions + * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features + * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption + */ + + /** + * Constructs a new OneofOptions. + * @memberof google.protobuf + * @classdesc Represents an OneofOptions. + * @implements IOneofOptions + * @constructor + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + */ + function OneofOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * OneofOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.features = null; + + /** + * OneofOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.OneofOptions + * @instance + */ + OneofOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions=} [properties] Properties to set + * @returns {google.protobuf.OneofOptions} OneofOptions instance + */ + OneofOptions.create = function create(properties) { + return new OneofOptions(properties); + }; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofOptions} OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofOptions message. + * @function verify + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofOptions} OneofOptions + */ + OneofOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofOptions) + return object; + var message = new $root.google.protobuf.OneofOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.OneofOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofOptions + * @static + * @param {google.protobuf.OneofOptions} message OneofOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) + object.features = null; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this OneofOptions to JSON. + * @function toJSON + * @memberof google.protobuf.OneofOptions + * @instance + * @returns {Object.} JSON object + */ + OneofOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofOptions + * @function getTypeUrl + * @memberof google.protobuf.OneofOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofOptions"; + }; + + return OneofOptions; + })(); + + protobuf.EnumOptions = (function() { + + /** + * Properties of an EnumOptions. + * @memberof google.protobuf + * @interface IEnumOptions + * @property {boolean|null} [allowAlias] EnumOptions allowAlias + * @property {boolean|null} [deprecated] EnumOptions deprecated + * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts + * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features + * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption + */ + + /** + * Constructs a new EnumOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumOptions. + * @implements IEnumOptions + * @constructor + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + */ + function EnumOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * EnumOptions allowAlias. + * @member {boolean} allowAlias + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.allowAlias = false; + + /** + * EnumOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecated = false; + + /** + * EnumOptions deprecatedLegacyJsonFieldConflicts. + * @member {boolean} deprecatedLegacyJsonFieldConflicts + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; + + /** + * EnumOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.features = null; + + /** + * EnumOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumOptions + * @instance + */ + EnumOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumOptions} EnumOptions instance + */ + EnumOptions.create = function create(properties) { + return new EnumOptions(properties); + }; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); + if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 6: { + message.deprecatedLegacyJsonFieldConflicts = reader.bool(); + break; + } + case 7: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumOptions} EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumOptions message. + * @function verify + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + if (typeof message.allowAlias !== "boolean") + return "allowAlias: boolean expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") + return "deprecatedLegacyJsonFieldConflicts: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumOptions} EnumOptions + */ + EnumOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumOptions) + return object; + var message = new $root.google.protobuf.EnumOptions(); + if (object.allowAlias != null) + message.allowAlias = Boolean(object.allowAlias); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.deprecatedLegacyJsonFieldConflicts != null) + message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumOptions + * @static + * @param {google.protobuf.EnumOptions} message EnumOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.allowAlias = false; + object.deprecated = false; + object.deprecatedLegacyJsonFieldConflicts = false; + object.features = null; + } + if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) + object.allowAlias = message.allowAlias; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) + object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumOptions + * @instance + * @returns {Object.} JSON object + */ + EnumOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumOptions"; + }; + + return EnumOptions; + })(); + + protobuf.EnumValueOptions = (function() { + + /** + * Properties of an EnumValueOptions. + * @memberof google.protobuf + * @interface IEnumValueOptions + * @property {boolean|null} [deprecated] EnumValueOptions deprecated + * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features + * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact + * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport + * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption + */ + + /** + * Constructs a new EnumValueOptions. + * @memberof google.protobuf + * @classdesc Represents an EnumValueOptions. + * @implements IEnumValueOptions + * @constructor + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + */ + function EnumValueOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * EnumValueOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.deprecated = false; + + /** + * EnumValueOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.features = null; + + /** + * EnumValueOptions debugRedact. + * @member {boolean} debugRedact + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.debugRedact = false; + + /** + * EnumValueOptions featureSupport. + * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.featureSupport = null; + + /** + * EnumValueOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.EnumValueOptions + * @instance + */ + EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance + */ + EnumValueOptions.create = function create(properties) { + return new EnumValueOptions(properties); + }; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); + if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) + $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 2: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 3: { + message.debugRedact = reader.bool(); + break; + } + case 4: { + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueOptions message. + * @function verify + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + if (typeof message.debugRedact !== "boolean") + return "debugRedact: boolean expected"; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { + var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); + if (error) + return "featureSupport." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + return null; + }; + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueOptions} EnumValueOptions + */ + EnumValueOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueOptions) + return object; + var message = new $root.google.protobuf.EnumValueOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.debugRedact != null) + message.debugRedact = Boolean(object.debugRedact); + if (object.featureSupport != null) { + if (typeof object.featureSupport !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); + message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {google.protobuf.EnumValueOptions} message EnumValueOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object.debugRedact = false; + object.featureSupport = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) + object.debugRedact = message.debugRedact; + if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) + object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + return object; + }; + + /** + * Converts this EnumValueOptions to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueOptions + * @instance + * @returns {Object.} JSON object + */ + EnumValueOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueOptions + * @function getTypeUrl + * @memberof google.protobuf.EnumValueOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; + }; + + return EnumValueOptions; + })(); + + protobuf.ServiceOptions = (function() { + + /** + * Properties of a ServiceOptions. + * @memberof google.protobuf + * @interface IServiceOptions + * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features + * @property {boolean|null} [deprecated] ServiceOptions deprecated + * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption + * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost + * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes + * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion + */ + + /** + * Constructs a new ServiceOptions. + * @memberof google.protobuf + * @classdesc Represents a ServiceOptions. + * @implements IServiceOptions + * @constructor + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + */ + function ServiceOptions(properties) { + this.uninterpretedOption = []; + 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]]; + } + + /** + * ServiceOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.features = null; + + /** + * ServiceOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.deprecated = false; + + /** + * ServiceOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * ServiceOptions .google.api.defaultHost. + * @member {string} .google.api.defaultHost + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.defaultHost"] = ""; + + /** + * ServiceOptions .google.api.oauthScopes. + * @member {string} .google.api.oauthScopes + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.oauthScopes"] = ""; + + /** + * ServiceOptions .google.api.apiVersion. + * @member {string} .google.api.apiVersion + * @memberof google.protobuf.ServiceOptions + * @instance + */ + ServiceOptions.prototype[".google.api.apiVersion"] = ""; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions=} [properties] Properties to set + * @returns {google.protobuf.ServiceOptions} ServiceOptions instance + */ + ServiceOptions.create = function create(properties) { + return new ServiceOptions(properties); + }; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) + writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); + if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) + writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); + if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) + writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 34: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 33: { + message.deprecated = reader.bool(); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 1049: { + message[".google.api.defaultHost"] = reader.string(); + break; + } + case 1050: { + message[".google.api.oauthScopes"] = reader.string(); + break; + } + case 525000001: { + message[".google.api.apiVersion"] = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceOptions message. + * @function verify + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + if (!$util.isString(message[".google.api.defaultHost"])) + return ".google.api.defaultHost: string expected"; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + if (!$util.isString(message[".google.api.oauthScopes"])) + return ".google.api.oauthScopes: string expected"; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + if (!$util.isString(message[".google.api.apiVersion"])) + return ".google.api.apiVersion: string expected"; + return null; + }; + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceOptions} ServiceOptions + */ + ServiceOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceOptions) + return object; + var message = new $root.google.protobuf.ServiceOptions(); + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.defaultHost"] != null) + message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); + if (object[".google.api.oauthScopes"] != null) + message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); + if (object[".google.api.apiVersion"] != null) + message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); + return message; + }; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.ServiceOptions} message ServiceOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.uninterpretedOption = []; + if (options.defaults) { + object.deprecated = false; + object.features = null; + object[".google.api.defaultHost"] = ""; + object[".google.api.oauthScopes"] = ""; + object[".google.api.apiVersion"] = ""; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) + object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; + if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) + object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; + if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) + object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + 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]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + 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]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(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]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.FeatureSet = (function() { + + /** + * Properties of a FeatureSet. + * @memberof google.protobuf + * @interface IFeatureSet + * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence + * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType + * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding + * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation + * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding + * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat + * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle + * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility + */ + + /** + * Constructs a new FeatureSet. + * @memberof google.protobuf + * @classdesc Represents a FeatureSet. + * @implements IFeatureSet + * @constructor + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + */ + function FeatureSet(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]]; + } + + /** + * FeatureSet fieldPresence. + * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.fieldPresence = 0; + + /** + * FeatureSet enumType. + * @member {google.protobuf.FeatureSet.EnumType} enumType + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enumType = 0; + + /** + * FeatureSet repeatedFieldEncoding. + * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.repeatedFieldEncoding = 0; + + /** + * FeatureSet utf8Validation. + * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.utf8Validation = 0; + + /** + * FeatureSet messageEncoding. + * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.messageEncoding = 0; + + /** + * FeatureSet jsonFormat. + * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.jsonFormat = 0; + + /** + * FeatureSet enforceNamingStyle. + * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.enforceNamingStyle = 0; + + /** + * FeatureSet defaultSymbolVisibility. + * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility + * @memberof google.protobuf.FeatureSet + * @instance + */ + FeatureSet.prototype.defaultSymbolVisibility = 0; + + /** + * Creates a new FeatureSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet} FeatureSet instance + */ + FeatureSet.create = function create(properties) { + return new FeatureSet(properties); + }; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); + if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); + if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); + if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); + if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); + if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) + writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); + if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); + if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) + writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); + return writer; + }; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.fieldPresence = reader.int32(); + break; + } + case 2: { + message.enumType = reader.int32(); + break; + } + case 3: { + message.repeatedFieldEncoding = reader.int32(); + break; + } + case 4: { + message.utf8Validation = reader.int32(); + break; + } + case 5: { + message.messageEncoding = reader.int32(); + break; + } + case 6: { + message.jsonFormat = reader.int32(); + break; + } + case 7: { + message.enforceNamingStyle = reader.int32(); + break; + } + case 8: { + message.defaultSymbolVisibility = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet} FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSet message. + * @function verify + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + switch (message.fieldPresence) { + default: + return "fieldPresence: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.enumType != null && message.hasOwnProperty("enumType")) + switch (message.enumType) { + default: + return "enumType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + switch (message.repeatedFieldEncoding) { + default: + return "repeatedFieldEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + switch (message.utf8Validation) { + default: + return "utf8Validation: enum value expected"; + case 0: + case 2: + case 3: + break; + } + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + switch (message.messageEncoding) { + default: + return "messageEncoding: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + switch (message.jsonFormat) { + default: + return "jsonFormat: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + switch (message.enforceNamingStyle) { + default: + return "enforceNamingStyle: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + switch (message.defaultSymbolVisibility) { + default: + return "defaultSymbolVisibility: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + return null; + }; + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet} FeatureSet + */ + FeatureSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet) + return object; + var message = new $root.google.protobuf.FeatureSet(); + switch (object.fieldPresence) { + default: + if (typeof object.fieldPresence === "number") { + message.fieldPresence = object.fieldPresence; + break; + } + break; + case "FIELD_PRESENCE_UNKNOWN": + case 0: + message.fieldPresence = 0; + break; + case "EXPLICIT": + case 1: + message.fieldPresence = 1; + break; + case "IMPLICIT": + case 2: + message.fieldPresence = 2; + break; + case "LEGACY_REQUIRED": + case 3: + message.fieldPresence = 3; + break; + } + switch (object.enumType) { + default: + if (typeof object.enumType === "number") { + message.enumType = object.enumType; + break; + } + break; + case "ENUM_TYPE_UNKNOWN": + case 0: + message.enumType = 0; + break; + case "OPEN": + case 1: + message.enumType = 1; + break; + case "CLOSED": + case 2: + message.enumType = 2; + break; + } + switch (object.repeatedFieldEncoding) { + default: + if (typeof object.repeatedFieldEncoding === "number") { + message.repeatedFieldEncoding = object.repeatedFieldEncoding; + break; + } + break; + case "REPEATED_FIELD_ENCODING_UNKNOWN": + case 0: + message.repeatedFieldEncoding = 0; + break; + case "PACKED": + case 1: + message.repeatedFieldEncoding = 1; + break; + case "EXPANDED": + case 2: + message.repeatedFieldEncoding = 2; + break; + } + switch (object.utf8Validation) { + default: + if (typeof object.utf8Validation === "number") { + message.utf8Validation = object.utf8Validation; + break; + } + break; + case "UTF8_VALIDATION_UNKNOWN": + case 0: + message.utf8Validation = 0; + break; + case "VERIFY": + case 2: + message.utf8Validation = 2; + break; + case "NONE": + case 3: + message.utf8Validation = 3; + break; + } + switch (object.messageEncoding) { + default: + if (typeof object.messageEncoding === "number") { + message.messageEncoding = object.messageEncoding; + break; + } + break; + case "MESSAGE_ENCODING_UNKNOWN": + case 0: + message.messageEncoding = 0; + break; + case "LENGTH_PREFIXED": + case 1: + message.messageEncoding = 1; + break; + case "DELIMITED": + case 2: + message.messageEncoding = 2; + break; + } + switch (object.jsonFormat) { + default: + if (typeof object.jsonFormat === "number") { + message.jsonFormat = object.jsonFormat; + break; + } + break; + case "JSON_FORMAT_UNKNOWN": + case 0: + message.jsonFormat = 0; + break; + case "ALLOW": + case 1: + message.jsonFormat = 1; + break; + case "LEGACY_BEST_EFFORT": + case 2: + message.jsonFormat = 2; + break; + } + switch (object.enforceNamingStyle) { + default: + if (typeof object.enforceNamingStyle === "number") { + message.enforceNamingStyle = object.enforceNamingStyle; + break; + } + break; + case "ENFORCE_NAMING_STYLE_UNKNOWN": + case 0: + message.enforceNamingStyle = 0; + break; + case "STYLE2024": + case 1: + message.enforceNamingStyle = 1; + break; + case "STYLE_LEGACY": + case 2: + message.enforceNamingStyle = 2; + break; + } + switch (object.defaultSymbolVisibility) { + default: + if (typeof object.defaultSymbolVisibility === "number") { + message.defaultSymbolVisibility = object.defaultSymbolVisibility; + break; + } + break; + case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": + case 0: + message.defaultSymbolVisibility = 0; + break; + case "EXPORT_ALL": + case 1: + message.defaultSymbolVisibility = 1; + break; + case "EXPORT_TOP_LEVEL": + case 2: + message.defaultSymbolVisibility = 2; + break; + case "LOCAL_ALL": + case 3: + message.defaultSymbolVisibility = 3; + break; + case "STRICT": + case 4: + message.defaultSymbolVisibility = 4; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet + * @static + * @param {google.protobuf.FeatureSet} message FeatureSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; + object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; + object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; + object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; + object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; + object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; + object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; + object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN" : 0; + } + if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) + object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; + if (message.enumType != null && message.hasOwnProperty("enumType")) + object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; + if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) + object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; + if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) + object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; + if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) + object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; + if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) + object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; + if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) + object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; + if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) + object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; + return object; + }; + + /** + * Converts this FeatureSet to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet + * @instance + * @returns {Object.} JSON object + */ + FeatureSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSet + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet"; + }; + + /** + * FieldPresence enum. + * @name google.protobuf.FeatureSet.FieldPresence + * @enum {number} + * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value + * @property {number} EXPLICIT=1 EXPLICIT value + * @property {number} IMPLICIT=2 IMPLICIT value + * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value + */ + FeatureSet.FieldPresence = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; + values[valuesById[1] = "EXPLICIT"] = 1; + values[valuesById[2] = "IMPLICIT"] = 2; + values[valuesById[3] = "LEGACY_REQUIRED"] = 3; + return values; + })(); + + /** + * EnumType enum. + * @name google.protobuf.FeatureSet.EnumType + * @enum {number} + * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value + * @property {number} OPEN=1 OPEN value + * @property {number} CLOSED=2 CLOSED value + */ + FeatureSet.EnumType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; + values[valuesById[1] = "OPEN"] = 1; + values[valuesById[2] = "CLOSED"] = 2; + return values; + })(); + + /** + * RepeatedFieldEncoding enum. + * @name google.protobuf.FeatureSet.RepeatedFieldEncoding + * @enum {number} + * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value + * @property {number} PACKED=1 PACKED value + * @property {number} EXPANDED=2 EXPANDED value + */ + FeatureSet.RepeatedFieldEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "PACKED"] = 1; + values[valuesById[2] = "EXPANDED"] = 2; + return values; + })(); + + /** + * Utf8Validation enum. + * @name google.protobuf.FeatureSet.Utf8Validation + * @enum {number} + * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value + * @property {number} VERIFY=2 VERIFY value + * @property {number} NONE=3 NONE value + */ + FeatureSet.Utf8Validation = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; + values[valuesById[2] = "VERIFY"] = 2; + values[valuesById[3] = "NONE"] = 3; + return values; + })(); + + /** + * MessageEncoding enum. + * @name google.protobuf.FeatureSet.MessageEncoding + * @enum {number} + * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value + * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value + * @property {number} DELIMITED=2 DELIMITED value + */ + FeatureSet.MessageEncoding = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; + values[valuesById[1] = "LENGTH_PREFIXED"] = 1; + values[valuesById[2] = "DELIMITED"] = 2; + return values; + })(); + + /** + * JsonFormat enum. + * @name google.protobuf.FeatureSet.JsonFormat + * @enum {number} + * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value + * @property {number} ALLOW=1 ALLOW value + * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value + */ + FeatureSet.JsonFormat = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; + values[valuesById[1] = "ALLOW"] = 1; + values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; + return values; + })(); + + /** + * EnforceNamingStyle enum. + * @name google.protobuf.FeatureSet.EnforceNamingStyle + * @enum {number} + * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value + * @property {number} STYLE2024=1 STYLE2024 value + * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value + */ + FeatureSet.EnforceNamingStyle = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; + values[valuesById[1] = "STYLE2024"] = 1; + values[valuesById[2] = "STYLE_LEGACY"] = 2; + return values; + })(); + + FeatureSet.VisibilityFeature = (function() { + + /** + * Properties of a VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @interface IVisibilityFeature + */ + + /** + * Constructs a new VisibilityFeature. + * @memberof google.protobuf.FeatureSet + * @classdesc Represents a VisibilityFeature. + * @implements IVisibilityFeature + * @constructor + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + */ + function VisibilityFeature(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 VisibilityFeature instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance + */ + VisibilityFeature.create = function create(properties) { + return new VisibilityFeature(properties); + }; + + /** + * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a VisibilityFeature message. + * @function verify + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + VisibilityFeature.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature + */ + VisibilityFeature.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) + return object; + return new $root.google.protobuf.FeatureSet.VisibilityFeature(); + }; + + /** + * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + VisibilityFeature.toObject = function toObject() { + return {}; + }; + + /** + * Converts this VisibilityFeature to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @instance + * @returns {Object.} JSON object + */ + VisibilityFeature.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for VisibilityFeature + * @function getTypeUrl + * @memberof google.protobuf.FeatureSet.VisibilityFeature + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; + }; + + /** + * DefaultSymbolVisibility enum. + * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility + * @enum {number} + * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value + * @property {number} EXPORT_ALL=1 EXPORT_ALL value + * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value + * @property {number} LOCAL_ALL=3 LOCAL_ALL value + * @property {number} STRICT=4 STRICT value + */ + VisibilityFeature.DefaultSymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; + values[valuesById[1] = "EXPORT_ALL"] = 1; + values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; + values[valuesById[3] = "LOCAL_ALL"] = 3; + values[valuesById[4] = "STRICT"] = 4; + return values; + })(); + + return VisibilityFeature; + })(); + + return FeatureSet; + })(); + + protobuf.FeatureSetDefaults = (function() { + + /** + * Properties of a FeatureSetDefaults. + * @memberof google.protobuf + * @interface IFeatureSetDefaults + * @property {Array.|null} [defaults] FeatureSetDefaults defaults + * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition + * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition + */ + + /** + * Constructs a new FeatureSetDefaults. + * @memberof google.protobuf + * @classdesc Represents a FeatureSetDefaults. + * @implements IFeatureSetDefaults + * @constructor + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + */ + function FeatureSetDefaults(properties) { + this.defaults = []; + 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]]; + } + + /** + * FeatureSetDefaults defaults. + * @member {Array.} defaults + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.defaults = $util.emptyArray; + + /** + * FeatureSetDefaults minimumEdition. + * @member {google.protobuf.Edition} minimumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.minimumEdition = 0; + + /** + * FeatureSetDefaults maximumEdition. + * @member {google.protobuf.Edition} maximumEdition + * @memberof google.protobuf.FeatureSetDefaults + * @instance + */ + FeatureSetDefaults.prototype.maximumEdition = 0; + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance + */ + FeatureSetDefaults.create = function create(properties) { + return new FeatureSetDefaults(properties); + }; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.defaults != null && message.defaults.length) + for (var i = 0; i < message.defaults.length; ++i) + $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); + if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); + return writer; + }; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.defaults && message.defaults.length)) + message.defaults = []; + message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); + break; + } + case 4: { + message.minimumEdition = reader.int32(); + break; + } + case 5: { + message.maximumEdition = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetDefaults message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.defaults != null && message.hasOwnProperty("defaults")) { + if (!Array.isArray(message.defaults)) + return "defaults: array expected"; + for (var i = 0; i < message.defaults.length; ++i) { + var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); + if (error) + return "defaults." + error; + } + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + switch (message.minimumEdition) { + default: + return "minimumEdition: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + switch (message.maximumEdition) { + default: + return "maximumEdition: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + return null; + }; + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults + */ + FeatureSetDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults(); + if (object.defaults) { + if (!Array.isArray(object.defaults)) + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); + message.defaults = []; + for (var i = 0; i < object.defaults.length; ++i) { + if (typeof object.defaults[i] !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); + message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); + } + } + switch (object.minimumEdition) { + default: + if (typeof object.minimumEdition === "number") { + message.minimumEdition = object.minimumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.minimumEdition = 0; + break; + case "EDITION_LEGACY": + case 900: + message.minimumEdition = 900; + break; + case "EDITION_PROTO2": + case 998: + message.minimumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.minimumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.minimumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.minimumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.minimumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.minimumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.minimumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.minimumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.minimumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.minimumEdition = 2147483647; + break; + } + switch (object.maximumEdition) { + default: + if (typeof object.maximumEdition === "number") { + message.maximumEdition = object.maximumEdition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.maximumEdition = 0; + break; + case "EDITION_LEGACY": + case 900: + message.maximumEdition = 900; + break; + case "EDITION_PROTO2": + case 998: + message.maximumEdition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.maximumEdition = 999; + break; + case "EDITION_2023": + case 1000: + message.maximumEdition = 1000; + break; + case "EDITION_2024": + case 1001: + message.maximumEdition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.maximumEdition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.maximumEdition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.maximumEdition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.maximumEdition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.maximumEdition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.maximumEdition = 2147483647; + break; + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.defaults = []; + if (options.defaults) { + object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; + } + if (message.defaults && message.defaults.length) { + object.defaults = []; + for (var j = 0; j < message.defaults.length; ++j) + object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); + } + if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) + object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; + if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) + object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; + return object; + }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults + * @instance + * @returns {Object.} JSON object + */ + FeatureSetDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetDefaults + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; + }; + + FeatureSetDefaults.FeatureSetEditionDefault = (function() { + + /** + * Properties of a FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @interface IFeatureSetEditionDefault + * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition + * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures + * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures + */ + + /** + * Constructs a new FeatureSetEditionDefault. + * @memberof google.protobuf.FeatureSetDefaults + * @classdesc Represents a FeatureSetEditionDefault. + * @implements IFeatureSetEditionDefault + * @constructor + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + */ + function FeatureSetEditionDefault(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]]; + } + + /** + * FeatureSetEditionDefault edition. + * @member {google.protobuf.Edition} edition + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.edition = 0; + + /** + * FeatureSetEditionDefault overridableFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.overridableFeatures = null; + + /** + * FeatureSetEditionDefault fixedFeatures. + * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + */ + FeatureSetEditionDefault.prototype.fixedFeatures = null; + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @function create + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance + */ + FeatureSetEditionDefault.create = function create(properties) { + return new FeatureSetEditionDefault(properties); + }; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); + if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) + $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) + $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 3: { + message.edition = reader.int32(); + break; + } + case 4: { + message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 5: { + message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FeatureSetEditionDefault message. + * @function verify + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FeatureSetEditionDefault.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.edition != null && message.hasOwnProperty("edition")) + switch (message.edition) { + default: + return "edition: enum value expected"; + case 0: + case 900: + case 998: + case 999: + case 1000: + case 1001: + case 1: + case 2: + case 99997: + case 99998: + case 99999: + case 2147483647: + break; + } + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures); + if (error) + return "overridableFeatures." + error; + } + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { + var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures); + if (error) + return "fixedFeatures." + error; + } + return null; + }; + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault + */ + FeatureSetEditionDefault.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) + return object; + var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); + switch (object.edition) { + default: + if (typeof object.edition === "number") { + message.edition = object.edition; + break; + } + break; + case "EDITION_UNKNOWN": + case 0: + message.edition = 0; + break; + case "EDITION_LEGACY": + case 900: + message.edition = 900; + break; + case "EDITION_PROTO2": + case 998: + message.edition = 998; + break; + case "EDITION_PROTO3": + case 999: + message.edition = 999; + break; + case "EDITION_2023": + case 1000: + message.edition = 1000; + break; + case "EDITION_2024": + case 1001: + message.edition = 1001; + break; + case "EDITION_1_TEST_ONLY": + case 1: + message.edition = 1; + break; + case "EDITION_2_TEST_ONLY": + case 2: + message.edition = 2; + break; + case "EDITION_99997_TEST_ONLY": + case 99997: + message.edition = 99997; + break; + case "EDITION_99998_TEST_ONLY": + case 99998: + message.edition = 99998; + break; + case "EDITION_99999_TEST_ONLY": + case 99999: + message.edition = 99999; + break; + case "EDITION_MAX": + case 2147483647: + message.edition = 2147483647; + break; + } + if (object.overridableFeatures != null) { + if (typeof object.overridableFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); + message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures); + } + if (object.fixedFeatures != null) { + if (typeof object.fixedFeatures !== "object") + throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); + message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures); + } + return message; + }; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FeatureSetEditionDefault.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; + object.overridableFeatures = null; + object.fixedFeatures = null; + } + if (message.edition != null && message.hasOwnProperty("edition")) + object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; + if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) + object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); + if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) + object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); + return object; + }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @function toJSON + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @instance + * @returns {Object.} JSON object + */ + FeatureSetEditionDefault.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @function getTypeUrl + * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; + }; + + return FeatureSetEditionDefault; + })(); + + return FeatureSetDefaults; + })(); + + protobuf.SourceCodeInfo = (function() { + + /** + * Properties of a SourceCodeInfo. + * @memberof google.protobuf + * @interface ISourceCodeInfo + * @property {Array.|null} [location] SourceCodeInfo location + */ + + /** + * Constructs a new SourceCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a SourceCodeInfo. + * @implements ISourceCodeInfo + * @constructor + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + */ + function SourceCodeInfo(properties) { + this.location = []; + 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]]; + } + + /** + * SourceCodeInfo location. + * @member {Array.} location + * @memberof google.protobuf.SourceCodeInfo + * @instance + */ + SourceCodeInfo.prototype.location = $util.emptyArray; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance + */ + SourceCodeInfo.create = function create(properties) { + return new SourceCodeInfo(properties); + }; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && message.location.length) + for (var i = 0; i < message.location.length; ++i) + $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + 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]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + 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]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + 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]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + /** + * SymbolVisibility enum. + * @name google.protobuf.SymbolVisibility + * @enum {number} + * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value + * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value + * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value + */ + protobuf.SymbolVisibility = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VISIBILITY_UNSET"] = 0; + values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; + values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; + return values; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(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]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Any = (function() { + + /** + * Properties of an Any. + * @memberof google.protobuf + * @interface IAny + * @property {string|null} [type_url] Any type_url + * @property {Uint8Array|null} [value] Any value + */ + + /** + * Constructs a new Any. + * @memberof google.protobuf + * @classdesc Represents an Any. + * @implements IAny + * @constructor + * @param {google.protobuf.IAny=} [properties] Properties to set + */ + function Any(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]]; + } + + /** + * Any type_url. + * @member {string} type_url + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.type_url = ""; + + /** + * Any value. + * @member {Uint8Array} value + * @memberof google.protobuf.Any + * @instance + */ + Any.prototype.value = $util.newBuffer([]); + + /** + * Creates a new Any instance using the specified properties. + * @function create + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny=} [properties] Properties to set + * @returns {google.protobuf.Any} Any instance + */ + Any.create = function create(properties) { + return new Any(properties); + }; + + /** + * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); + return writer; + }; + + /** + * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.IAny} message Any message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Any.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Any message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type_url = reader.string(); + break; + } + case 2: { + message.value = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Any message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Any + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Any} Any + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Any.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Any message. + * @function verify + * @memberof google.protobuf.Any + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Any.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type_url != null && message.hasOwnProperty("type_url")) + if (!$util.isString(message.type_url)) + return "type_url: string expected"; + if (message.value != null && message.hasOwnProperty("value")) + if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) + return "value: buffer expected"; + return null; + }; + + /** + * Creates an Any message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Any + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Any} Any + */ + Any.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Any) + return object; + var message = new $root.google.protobuf.Any(); + if (object.type_url != null) + message.type_url = String(object.type_url); + if (object.value != null) + if (typeof object.value === "string") + $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); + else if (object.value.length >= 0) + message.value = object.value; + return message; + }; + + /** + * Creates a plain object from an Any message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Any + * @static + * @param {google.protobuf.Any} message Any + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Any.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type_url = ""; + if (options.bytes === String) + object.value = ""; + else { + object.value = []; + if (options.bytes !== Array) + object.value = $util.newBuffer(object.value); + } + } + if (message.type_url != null && message.hasOwnProperty("type_url")) + object.type_url = message.type_url; + if (message.value != null && message.hasOwnProperty("value")) + object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; + return object; + }; + + /** + * Converts this Any to JSON. + * @function toJSON + * @memberof google.protobuf.Any + * @instance + * @returns {Object.} JSON object + */ + Any.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Any + * @function getTypeUrl + * @memberof google.protobuf.Any + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Any"; + }; + + return Any; + })(); + + protobuf.Timestamp = (function() { + + /** + * Properties of a Timestamp. + * @memberof google.protobuf + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos + */ + + /** + * Constructs a new Timestamp. + * @memberof google.protobuf + * @classdesc Represents a Timestamp. + * @implements ITimestamp + * @constructor + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + */ + function Timestamp(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]]; + } + + /** + * Timestamp seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Timestamp nanos. + * @member {number} nanos + * @memberof google.protobuf.Timestamp + * @instance + */ + Timestamp.prototype.nanos = 0; + + /** + * Creates a new Timestamp instance using the specified properties. + * @function create + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance + */ + Timestamp.create = function create(properties) { + return new Timestamp(properties); + }; + + /** + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Timestamp + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Timestamp} Timestamp + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Timestamp.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Timestamp message. + * @function verify + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Timestamp.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Timestamp + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Timestamp} Timestamp + */ + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) + return object; + var message = new $root.google.protobuf.Timestamp(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Timestamp + * @static + * @param {google.protobuf.Timestamp} message Timestamp + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Timestamp.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Timestamp to JSON. + * @function toJSON + * @memberof google.protobuf.Timestamp + * @instance + * @returns {Object.} JSON object + */ + Timestamp.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Timestamp + * @function getTypeUrl + * @memberof google.protobuf.Timestamp + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Timestamp"; + }; + + return Timestamp; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(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 Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + protobuf.FieldMask = (function() { + + /** + * Properties of a FieldMask. + * @memberof google.protobuf + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths + */ + + /** + * Constructs a new FieldMask. + * @memberof google.protobuf + * @classdesc Represents a FieldMask. + * @implements IFieldMask + * @constructor + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + */ + function FieldMask(properties) { + this.paths = []; + 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]]; + } + + /** + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask + * @instance + */ + FieldMask.prototype.paths = $util.emptyArray; + + /** + * Creates a new FieldMask instance using the specified properties. + * @function create + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance + */ + FieldMask.create = function create(properties) { + return new FieldMask(properties); + }; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); + return writer; + }; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldMask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldMask} FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldMask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldMask message. + * @function verify + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldMask.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } + return null; + }; + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FieldMask + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FieldMask} FieldMask + */ + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) + return object; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } + return message; + }; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FieldMask + * @static + * @param {google.protobuf.FieldMask} message FieldMask + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldMask.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; + } + return object; + }; + + /** + * Converts this FieldMask to JSON. + * @function toJSON + * @memberof google.protobuf.FieldMask + * @instance + * @returns {Object.} JSON object + */ + FieldMask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldMask + * @function getTypeUrl + * @memberof google.protobuf.FieldMask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FieldMask"; + }; + + return FieldMask; + })(); + + return protobuf; + })(); + + google.rpc = (function() { + + /** + * Namespace rpc. + * @memberof google + * @namespace + */ + var rpc = {}; + + rpc.ErrorInfo = (function() { + + /** + * Properties of an ErrorInfo. + * @memberof google.rpc + * @interface IErrorInfo + * @property {string|null} [reason] ErrorInfo reason + * @property {string|null} [domain] ErrorInfo domain + * @property {Object.|null} [metadata] ErrorInfo metadata + */ + + /** + * Constructs a new ErrorInfo. + * @memberof google.rpc + * @classdesc Represents an ErrorInfo. + * @implements IErrorInfo + * @constructor + * @param {google.rpc.IErrorInfo=} [properties] Properties to set + */ + function ErrorInfo(properties) { + this.metadata = {}; + 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]]; + } + + /** + * ErrorInfo reason. + * @member {string} reason + * @memberof google.rpc.ErrorInfo + * @instance + */ + ErrorInfo.prototype.reason = ""; + + /** + * ErrorInfo domain. + * @member {string} domain + * @memberof google.rpc.ErrorInfo + * @instance + */ + ErrorInfo.prototype.domain = ""; + + /** + * ErrorInfo metadata. + * @member {Object.} metadata + * @memberof google.rpc.ErrorInfo + * @instance + */ + ErrorInfo.prototype.metadata = $util.emptyObject; + + /** + * Creates a new ErrorInfo instance using the specified properties. + * @function create + * @memberof google.rpc.ErrorInfo + * @static + * @param {google.rpc.IErrorInfo=} [properties] Properties to set + * @returns {google.rpc.ErrorInfo} ErrorInfo instance + */ + ErrorInfo.create = function create(properties) { + return new ErrorInfo(properties); + }; + + /** + * Encodes the specified ErrorInfo message. Does not implicitly {@link google.rpc.ErrorInfo.verify|verify} messages. + * @function encode + * @memberof google.rpc.ErrorInfo + * @static + * @param {google.rpc.IErrorInfo} message ErrorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.reason); + if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.domain); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) + writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); + return writer; + }; + + /** + * Encodes the specified ErrorInfo message, length delimited. Does not implicitly {@link google.rpc.ErrorInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.ErrorInfo + * @static + * @param {google.rpc.IErrorInfo} message ErrorInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorInfo message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.ErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.ErrorInfo} ErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.ErrorInfo(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.reason = reader.string(); + break; + } + case 2: { + message.domain = reader.string(); + break; + } + case 3: { + if (message.metadata === $util.emptyObject) + message.metadata = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.metadata[key] = value; + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.ErrorInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.ErrorInfo} ErrorInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorInfo message. + * @function verify + * @memberof google.rpc.ErrorInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.reason != null && message.hasOwnProperty("reason")) + if (!$util.isString(message.reason)) + return "reason: string expected"; + if (message.domain != null && message.hasOwnProperty("domain")) + if (!$util.isString(message.domain)) + return "domain: string expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + if (!$util.isObject(message.metadata)) + return "metadata: object expected"; + var key = Object.keys(message.metadata); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.metadata[key[i]])) + return "metadata: string{k:string} expected"; + } + return null; + }; + + /** + * Creates an ErrorInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.ErrorInfo + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.ErrorInfo} ErrorInfo + */ + ErrorInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.ErrorInfo) + return object; + var message = new $root.google.rpc.ErrorInfo(); + if (object.reason != null) + message.reason = String(object.reason); + if (object.domain != null) + message.domain = String(object.domain); + if (object.metadata) { + if (typeof object.metadata !== "object") + throw TypeError(".google.rpc.ErrorInfo.metadata: object expected"); + message.metadata = {}; + for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) + message.metadata[keys[i]] = String(object.metadata[keys[i]]); + } + return message; + }; + + /** + * Creates a plain object from an ErrorInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.ErrorInfo + * @static + * @param {google.rpc.ErrorInfo} message ErrorInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.metadata = {}; + if (options.defaults) { + object.reason = ""; + object.domain = ""; + } + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = message.reason; + if (message.domain != null && message.hasOwnProperty("domain")) + object.domain = message.domain; + var keys2; + if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { + object.metadata = {}; + for (var j = 0; j < keys2.length; ++j) + object.metadata[keys2[j]] = message.metadata[keys2[j]]; + } + return object; + }; + + /** + * Converts this ErrorInfo to JSON. + * @function toJSON + * @memberof google.rpc.ErrorInfo + * @instance + * @returns {Object.} JSON object + */ + ErrorInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorInfo + * @function getTypeUrl + * @memberof google.rpc.ErrorInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.ErrorInfo"; + }; + + return ErrorInfo; + })(); + + rpc.RetryInfo = (function() { + + /** + * Properties of a RetryInfo. + * @memberof google.rpc + * @interface IRetryInfo + * @property {google.protobuf.IDuration|null} [retryDelay] RetryInfo retryDelay + */ + + /** + * Constructs a new RetryInfo. + * @memberof google.rpc + * @classdesc Represents a RetryInfo. + * @implements IRetryInfo + * @constructor + * @param {google.rpc.IRetryInfo=} [properties] Properties to set + */ + function RetryInfo(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]]; + } + + /** + * RetryInfo retryDelay. + * @member {google.protobuf.IDuration|null|undefined} retryDelay + * @memberof google.rpc.RetryInfo + * @instance + */ + RetryInfo.prototype.retryDelay = null; + + /** + * Creates a new RetryInfo instance using the specified properties. + * @function create + * @memberof google.rpc.RetryInfo + * @static + * @param {google.rpc.IRetryInfo=} [properties] Properties to set + * @returns {google.rpc.RetryInfo} RetryInfo instance + */ + RetryInfo.create = function create(properties) { + return new RetryInfo(properties); + }; + + /** + * Encodes the specified RetryInfo message. Does not implicitly {@link google.rpc.RetryInfo.verify|verify} messages. + * @function encode + * @memberof google.rpc.RetryInfo + * @static + * @param {google.rpc.IRetryInfo} message RetryInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetryInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.retryDelay != null && Object.hasOwnProperty.call(message, "retryDelay")) + $root.google.protobuf.Duration.encode(message.retryDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified RetryInfo message, length delimited. Does not implicitly {@link google.rpc.RetryInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.RetryInfo + * @static + * @param {google.rpc.IRetryInfo} message RetryInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RetryInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RetryInfo message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.RetryInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.RetryInfo} RetryInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetryInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.RetryInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.retryDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RetryInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.RetryInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.RetryInfo} RetryInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RetryInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RetryInfo message. + * @function verify + * @memberof google.rpc.RetryInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RetryInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.retryDelay != null && message.hasOwnProperty("retryDelay")) { + var error = $root.google.protobuf.Duration.verify(message.retryDelay); + if (error) + return "retryDelay." + error; + } + return null; + }; + + /** + * Creates a RetryInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.RetryInfo + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.RetryInfo} RetryInfo + */ + RetryInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.RetryInfo) + return object; + var message = new $root.google.rpc.RetryInfo(); + if (object.retryDelay != null) { + if (typeof object.retryDelay !== "object") + throw TypeError(".google.rpc.RetryInfo.retryDelay: object expected"); + message.retryDelay = $root.google.protobuf.Duration.fromObject(object.retryDelay); + } + return message; + }; + + /** + * Creates a plain object from a RetryInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.RetryInfo + * @static + * @param {google.rpc.RetryInfo} message RetryInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RetryInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.retryDelay = null; + if (message.retryDelay != null && message.hasOwnProperty("retryDelay")) + object.retryDelay = $root.google.protobuf.Duration.toObject(message.retryDelay, options); + return object; + }; + + /** + * Converts this RetryInfo to JSON. + * @function toJSON + * @memberof google.rpc.RetryInfo + * @instance + * @returns {Object.} JSON object + */ + RetryInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RetryInfo + * @function getTypeUrl + * @memberof google.rpc.RetryInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RetryInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.RetryInfo"; + }; + + return RetryInfo; + })(); + + rpc.DebugInfo = (function() { + + /** + * Properties of a DebugInfo. + * @memberof google.rpc + * @interface IDebugInfo + * @property {Array.|null} [stackEntries] DebugInfo stackEntries + * @property {string|null} [detail] DebugInfo detail + */ + + /** + * Constructs a new DebugInfo. + * @memberof google.rpc + * @classdesc Represents a DebugInfo. + * @implements IDebugInfo + * @constructor + * @param {google.rpc.IDebugInfo=} [properties] Properties to set + */ + function DebugInfo(properties) { + this.stackEntries = []; + 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]]; + } + + /** + * DebugInfo stackEntries. + * @member {Array.} stackEntries + * @memberof google.rpc.DebugInfo + * @instance + */ + DebugInfo.prototype.stackEntries = $util.emptyArray; + + /** + * DebugInfo detail. + * @member {string} detail + * @memberof google.rpc.DebugInfo + * @instance + */ + DebugInfo.prototype.detail = ""; + + /** + * Creates a new DebugInfo instance using the specified properties. + * @function create + * @memberof google.rpc.DebugInfo + * @static + * @param {google.rpc.IDebugInfo=} [properties] Properties to set + * @returns {google.rpc.DebugInfo} DebugInfo instance + */ + DebugInfo.create = function create(properties) { + return new DebugInfo(properties); + }; + + /** + * Encodes the specified DebugInfo message. Does not implicitly {@link google.rpc.DebugInfo.verify|verify} messages. + * @function encode + * @memberof google.rpc.DebugInfo + * @static + * @param {google.rpc.IDebugInfo} message DebugInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DebugInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.stackEntries != null && message.stackEntries.length) + for (var i = 0; i < message.stackEntries.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.stackEntries[i]); + if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.detail); + return writer; + }; + + /** + * Encodes the specified DebugInfo message, length delimited. Does not implicitly {@link google.rpc.DebugInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.DebugInfo + * @static + * @param {google.rpc.IDebugInfo} message DebugInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DebugInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DebugInfo message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.DebugInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.DebugInfo} DebugInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DebugInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.DebugInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.stackEntries && message.stackEntries.length)) + message.stackEntries = []; + message.stackEntries.push(reader.string()); + break; + } + case 2: { + message.detail = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DebugInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.DebugInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.DebugInfo} DebugInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DebugInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DebugInfo message. + * @function verify + * @memberof google.rpc.DebugInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DebugInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.stackEntries != null && message.hasOwnProperty("stackEntries")) { + if (!Array.isArray(message.stackEntries)) + return "stackEntries: array expected"; + for (var i = 0; i < message.stackEntries.length; ++i) + if (!$util.isString(message.stackEntries[i])) + return "stackEntries: string[] expected"; + } + if (message.detail != null && message.hasOwnProperty("detail")) + if (!$util.isString(message.detail)) + return "detail: string expected"; + return null; + }; + + /** + * Creates a DebugInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.DebugInfo + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.DebugInfo} DebugInfo + */ + DebugInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.DebugInfo) + return object; + var message = new $root.google.rpc.DebugInfo(); + if (object.stackEntries) { + if (!Array.isArray(object.stackEntries)) + throw TypeError(".google.rpc.DebugInfo.stackEntries: array expected"); + message.stackEntries = []; + for (var i = 0; i < object.stackEntries.length; ++i) + message.stackEntries[i] = String(object.stackEntries[i]); + } + if (object.detail != null) + message.detail = String(object.detail); + return message; + }; + + /** + * Creates a plain object from a DebugInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.DebugInfo + * @static + * @param {google.rpc.DebugInfo} message DebugInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DebugInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.stackEntries = []; + if (options.defaults) + object.detail = ""; + if (message.stackEntries && message.stackEntries.length) { + object.stackEntries = []; + for (var j = 0; j < message.stackEntries.length; ++j) + object.stackEntries[j] = message.stackEntries[j]; + } + if (message.detail != null && message.hasOwnProperty("detail")) + object.detail = message.detail; + return object; + }; + + /** + * Converts this DebugInfo to JSON. + * @function toJSON + * @memberof google.rpc.DebugInfo + * @instance + * @returns {Object.} JSON object + */ + DebugInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DebugInfo + * @function getTypeUrl + * @memberof google.rpc.DebugInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DebugInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.DebugInfo"; + }; + + return DebugInfo; + })(); + + rpc.QuotaFailure = (function() { + + /** + * Properties of a QuotaFailure. + * @memberof google.rpc + * @interface IQuotaFailure + * @property {Array.|null} [violations] QuotaFailure violations + */ + + /** + * Constructs a new QuotaFailure. + * @memberof google.rpc + * @classdesc Represents a QuotaFailure. + * @implements IQuotaFailure + * @constructor + * @param {google.rpc.IQuotaFailure=} [properties] Properties to set + */ + function QuotaFailure(properties) { + this.violations = []; + 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]]; + } + + /** + * QuotaFailure violations. + * @member {Array.} violations + * @memberof google.rpc.QuotaFailure + * @instance + */ + QuotaFailure.prototype.violations = $util.emptyArray; + + /** + * Creates a new QuotaFailure instance using the specified properties. + * @function create + * @memberof google.rpc.QuotaFailure + * @static + * @param {google.rpc.IQuotaFailure=} [properties] Properties to set + * @returns {google.rpc.QuotaFailure} QuotaFailure instance + */ + QuotaFailure.create = function create(properties) { + return new QuotaFailure(properties); + }; + + /** + * Encodes the specified QuotaFailure message. Does not implicitly {@link google.rpc.QuotaFailure.verify|verify} messages. + * @function encode + * @memberof google.rpc.QuotaFailure + * @static + * @param {google.rpc.IQuotaFailure} message QuotaFailure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaFailure.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.violations != null && message.violations.length) + for (var i = 0; i < message.violations.length; ++i) + $root.google.rpc.QuotaFailure.Violation.encode(message.violations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified QuotaFailure message, length delimited. Does not implicitly {@link google.rpc.QuotaFailure.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.QuotaFailure + * @static + * @param {google.rpc.IQuotaFailure} message QuotaFailure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + QuotaFailure.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a QuotaFailure message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.QuotaFailure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.QuotaFailure} QuotaFailure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaFailure.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.QuotaFailure(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.violations && message.violations.length)) + message.violations = []; + message.violations.push($root.google.rpc.QuotaFailure.Violation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a QuotaFailure message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.QuotaFailure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.QuotaFailure} QuotaFailure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + QuotaFailure.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a QuotaFailure message. + * @function verify + * @memberof google.rpc.QuotaFailure + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + QuotaFailure.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.violations != null && message.hasOwnProperty("violations")) { + if (!Array.isArray(message.violations)) + return "violations: array expected"; + for (var i = 0; i < message.violations.length; ++i) { + var error = $root.google.rpc.QuotaFailure.Violation.verify(message.violations[i]); + if (error) + return "violations." + error; + } + } + return null; + }; + + /** + * Creates a QuotaFailure message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.QuotaFailure + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.QuotaFailure} QuotaFailure + */ + QuotaFailure.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.QuotaFailure) + return object; + var message = new $root.google.rpc.QuotaFailure(); + if (object.violations) { + if (!Array.isArray(object.violations)) + throw TypeError(".google.rpc.QuotaFailure.violations: array expected"); + message.violations = []; + for (var i = 0; i < object.violations.length; ++i) { + if (typeof object.violations[i] !== "object") + throw TypeError(".google.rpc.QuotaFailure.violations: object expected"); + message.violations[i] = $root.google.rpc.QuotaFailure.Violation.fromObject(object.violations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a QuotaFailure message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.QuotaFailure + * @static + * @param {google.rpc.QuotaFailure} message QuotaFailure + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + QuotaFailure.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.violations = []; + if (message.violations && message.violations.length) { + object.violations = []; + for (var j = 0; j < message.violations.length; ++j) + object.violations[j] = $root.google.rpc.QuotaFailure.Violation.toObject(message.violations[j], options); + } + return object; + }; + + /** + * Converts this QuotaFailure to JSON. + * @function toJSON + * @memberof google.rpc.QuotaFailure + * @instance + * @returns {Object.} JSON object + */ + QuotaFailure.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for QuotaFailure + * @function getTypeUrl + * @memberof google.rpc.QuotaFailure + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + QuotaFailure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.QuotaFailure"; + }; + + QuotaFailure.Violation = (function() { + + /** + * Properties of a Violation. + * @memberof google.rpc.QuotaFailure + * @interface IViolation + * @property {string|null} [subject] Violation subject + * @property {string|null} [description] Violation description + * @property {string|null} [apiService] Violation apiService + * @property {string|null} [quotaMetric] Violation quotaMetric + * @property {string|null} [quotaId] Violation quotaId + * @property {Object.|null} [quotaDimensions] Violation quotaDimensions + * @property {number|Long|null} [quotaValue] Violation quotaValue + * @property {number|Long|null} [futureQuotaValue] Violation futureQuotaValue + */ + + /** + * Constructs a new Violation. + * @memberof google.rpc.QuotaFailure + * @classdesc Represents a Violation. + * @implements IViolation + * @constructor + * @param {google.rpc.QuotaFailure.IViolation=} [properties] Properties to set + */ + function Violation(properties) { + this.quotaDimensions = {}; + 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]]; + } + + /** + * Violation subject. + * @member {string} subject + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.subject = ""; + + /** + * Violation description. + * @member {string} description + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.description = ""; + + /** + * Violation apiService. + * @member {string} apiService + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.apiService = ""; + + /** + * Violation quotaMetric. + * @member {string} quotaMetric + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.quotaMetric = ""; + + /** + * Violation quotaId. + * @member {string} quotaId + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.quotaId = ""; + + /** + * Violation quotaDimensions. + * @member {Object.} quotaDimensions + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.quotaDimensions = $util.emptyObject; + + /** + * Violation quotaValue. + * @member {number|Long} quotaValue + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.quotaValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Violation futureQuotaValue. + * @member {number|Long|null|undefined} futureQuotaValue + * @memberof google.rpc.QuotaFailure.Violation + * @instance + */ + Violation.prototype.futureQuotaValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(Violation.prototype, "_futureQuotaValue", { + get: $util.oneOfGetter($oneOfFields = ["futureQuotaValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Violation instance using the specified properties. + * @function create + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {google.rpc.QuotaFailure.IViolation=} [properties] Properties to set + * @returns {google.rpc.QuotaFailure.Violation} Violation instance + */ + Violation.create = function create(properties) { + return new Violation(properties); + }; + + /** + * Encodes the specified Violation message. Does not implicitly {@link google.rpc.QuotaFailure.Violation.verify|verify} messages. + * @function encode + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {google.rpc.QuotaFailure.IViolation} message Violation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Violation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.subject); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.apiService != null && Object.hasOwnProperty.call(message, "apiService")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.apiService); + if (message.quotaMetric != null && Object.hasOwnProperty.call(message, "quotaMetric")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.quotaMetric); + if (message.quotaId != null && Object.hasOwnProperty.call(message, "quotaId")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.quotaId); + if (message.quotaDimensions != null && Object.hasOwnProperty.call(message, "quotaDimensions")) + for (var keys = Object.keys(message.quotaDimensions), i = 0; i < keys.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.quotaDimensions[keys[i]]).ldelim(); + if (message.quotaValue != null && Object.hasOwnProperty.call(message, "quotaValue")) + writer.uint32(/* id 7, wireType 0 =*/56).int64(message.quotaValue); + if (message.futureQuotaValue != null && Object.hasOwnProperty.call(message, "futureQuotaValue")) + writer.uint32(/* id 8, wireType 0 =*/64).int64(message.futureQuotaValue); + return writer; + }; + + /** + * Encodes the specified Violation message, length delimited. Does not implicitly {@link google.rpc.QuotaFailure.Violation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {google.rpc.QuotaFailure.IViolation} message Violation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Violation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Violation message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.QuotaFailure.Violation} Violation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Violation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.QuotaFailure.Violation(), key, value; + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.subject = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.apiService = reader.string(); + break; + } + case 4: { + message.quotaMetric = reader.string(); + break; + } + case 5: { + message.quotaId = reader.string(); + break; + } + case 6: { + if (message.quotaDimensions === $util.emptyObject) + message.quotaDimensions = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = ""; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.string(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.quotaDimensions[key] = value; + break; + } + case 7: { + message.quotaValue = reader.int64(); + break; + } + case 8: { + message.futureQuotaValue = reader.int64(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Violation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.QuotaFailure.Violation} Violation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Violation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Violation message. + * @function verify + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Violation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.subject != null && message.hasOwnProperty("subject")) + if (!$util.isString(message.subject)) + return "subject: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.apiService != null && message.hasOwnProperty("apiService")) + if (!$util.isString(message.apiService)) + return "apiService: string expected"; + if (message.quotaMetric != null && message.hasOwnProperty("quotaMetric")) + if (!$util.isString(message.quotaMetric)) + return "quotaMetric: string expected"; + if (message.quotaId != null && message.hasOwnProperty("quotaId")) + if (!$util.isString(message.quotaId)) + return "quotaId: string expected"; + if (message.quotaDimensions != null && message.hasOwnProperty("quotaDimensions")) { + if (!$util.isObject(message.quotaDimensions)) + return "quotaDimensions: object expected"; + var key = Object.keys(message.quotaDimensions); + for (var i = 0; i < key.length; ++i) + if (!$util.isString(message.quotaDimensions[key[i]])) + return "quotaDimensions: string{k:string} expected"; + } + if (message.quotaValue != null && message.hasOwnProperty("quotaValue")) + if (!$util.isInteger(message.quotaValue) && !(message.quotaValue && $util.isInteger(message.quotaValue.low) && $util.isInteger(message.quotaValue.high))) + return "quotaValue: integer|Long expected"; + if (message.futureQuotaValue != null && message.hasOwnProperty("futureQuotaValue")) { + properties._futureQuotaValue = 1; + if (!$util.isInteger(message.futureQuotaValue) && !(message.futureQuotaValue && $util.isInteger(message.futureQuotaValue.low) && $util.isInteger(message.futureQuotaValue.high))) + return "futureQuotaValue: integer|Long expected"; + } + return null; + }; + + /** + * Creates a Violation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.QuotaFailure.Violation} Violation + */ + Violation.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.QuotaFailure.Violation) + return object; + var message = new $root.google.rpc.QuotaFailure.Violation(); + if (object.subject != null) + message.subject = String(object.subject); + if (object.description != null) + message.description = String(object.description); + if (object.apiService != null) + message.apiService = String(object.apiService); + if (object.quotaMetric != null) + message.quotaMetric = String(object.quotaMetric); + if (object.quotaId != null) + message.quotaId = String(object.quotaId); + if (object.quotaDimensions) { + if (typeof object.quotaDimensions !== "object") + throw TypeError(".google.rpc.QuotaFailure.Violation.quotaDimensions: object expected"); + message.quotaDimensions = {}; + for (var keys = Object.keys(object.quotaDimensions), i = 0; i < keys.length; ++i) + message.quotaDimensions[keys[i]] = String(object.quotaDimensions[keys[i]]); + } + if (object.quotaValue != null) + if ($util.Long) + (message.quotaValue = $util.Long.fromValue(object.quotaValue)).unsigned = false; + else if (typeof object.quotaValue === "string") + message.quotaValue = parseInt(object.quotaValue, 10); + else if (typeof object.quotaValue === "number") + message.quotaValue = object.quotaValue; + else if (typeof object.quotaValue === "object") + message.quotaValue = new $util.LongBits(object.quotaValue.low >>> 0, object.quotaValue.high >>> 0).toNumber(); + if (object.futureQuotaValue != null) + if ($util.Long) + (message.futureQuotaValue = $util.Long.fromValue(object.futureQuotaValue)).unsigned = false; + else if (typeof object.futureQuotaValue === "string") + message.futureQuotaValue = parseInt(object.futureQuotaValue, 10); + else if (typeof object.futureQuotaValue === "number") + message.futureQuotaValue = object.futureQuotaValue; + else if (typeof object.futureQuotaValue === "object") + message.futureQuotaValue = new $util.LongBits(object.futureQuotaValue.low >>> 0, object.futureQuotaValue.high >>> 0).toNumber(); + return message; + }; + + /** + * Creates a plain object from a Violation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {google.rpc.QuotaFailure.Violation} message Violation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Violation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.objects || options.defaults) + object.quotaDimensions = {}; + if (options.defaults) { + object.subject = ""; + object.description = ""; + object.apiService = ""; + object.quotaMetric = ""; + object.quotaId = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.quotaValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.quotaValue = options.longs === String ? "0" : 0; + } + if (message.subject != null && message.hasOwnProperty("subject")) + object.subject = message.subject; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.apiService != null && message.hasOwnProperty("apiService")) + object.apiService = message.apiService; + if (message.quotaMetric != null && message.hasOwnProperty("quotaMetric")) + object.quotaMetric = message.quotaMetric; + if (message.quotaId != null && message.hasOwnProperty("quotaId")) + object.quotaId = message.quotaId; + var keys2; + if (message.quotaDimensions && (keys2 = Object.keys(message.quotaDimensions)).length) { + object.quotaDimensions = {}; + for (var j = 0; j < keys2.length; ++j) + object.quotaDimensions[keys2[j]] = message.quotaDimensions[keys2[j]]; + } + if (message.quotaValue != null && message.hasOwnProperty("quotaValue")) + if (typeof message.quotaValue === "number") + object.quotaValue = options.longs === String ? String(message.quotaValue) : message.quotaValue; + else + object.quotaValue = options.longs === String ? $util.Long.prototype.toString.call(message.quotaValue) : options.longs === Number ? new $util.LongBits(message.quotaValue.low >>> 0, message.quotaValue.high >>> 0).toNumber() : message.quotaValue; + if (message.futureQuotaValue != null && message.hasOwnProperty("futureQuotaValue")) { + if (typeof message.futureQuotaValue === "number") + object.futureQuotaValue = options.longs === String ? String(message.futureQuotaValue) : message.futureQuotaValue; + else + object.futureQuotaValue = options.longs === String ? $util.Long.prototype.toString.call(message.futureQuotaValue) : options.longs === Number ? new $util.LongBits(message.futureQuotaValue.low >>> 0, message.futureQuotaValue.high >>> 0).toNumber() : message.futureQuotaValue; + if (options.oneofs) + object._futureQuotaValue = "futureQuotaValue"; + } + return object; + }; + + /** + * Converts this Violation to JSON. + * @function toJSON + * @memberof google.rpc.QuotaFailure.Violation + * @instance + * @returns {Object.} JSON object + */ + Violation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Violation + * @function getTypeUrl + * @memberof google.rpc.QuotaFailure.Violation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Violation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.QuotaFailure.Violation"; + }; + + return Violation; + })(); + + return QuotaFailure; + })(); + + rpc.PreconditionFailure = (function() { + + /** + * Properties of a PreconditionFailure. + * @memberof google.rpc + * @interface IPreconditionFailure + * @property {Array.|null} [violations] PreconditionFailure violations + */ + + /** + * Constructs a new PreconditionFailure. + * @memberof google.rpc + * @classdesc Represents a PreconditionFailure. + * @implements IPreconditionFailure + * @constructor + * @param {google.rpc.IPreconditionFailure=} [properties] Properties to set + */ + function PreconditionFailure(properties) { + this.violations = []; + 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]]; + } + + /** + * PreconditionFailure violations. + * @member {Array.} violations + * @memberof google.rpc.PreconditionFailure + * @instance + */ + PreconditionFailure.prototype.violations = $util.emptyArray; + + /** + * Creates a new PreconditionFailure instance using the specified properties. + * @function create + * @memberof google.rpc.PreconditionFailure + * @static + * @param {google.rpc.IPreconditionFailure=} [properties] Properties to set + * @returns {google.rpc.PreconditionFailure} PreconditionFailure instance + */ + PreconditionFailure.create = function create(properties) { + return new PreconditionFailure(properties); + }; + + /** + * Encodes the specified PreconditionFailure message. Does not implicitly {@link google.rpc.PreconditionFailure.verify|verify} messages. + * @function encode + * @memberof google.rpc.PreconditionFailure + * @static + * @param {google.rpc.IPreconditionFailure} message PreconditionFailure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreconditionFailure.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.violations != null && message.violations.length) + for (var i = 0; i < message.violations.length; ++i) + $root.google.rpc.PreconditionFailure.Violation.encode(message.violations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PreconditionFailure message, length delimited. Does not implicitly {@link google.rpc.PreconditionFailure.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.PreconditionFailure + * @static + * @param {google.rpc.IPreconditionFailure} message PreconditionFailure message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PreconditionFailure.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PreconditionFailure message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.PreconditionFailure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.PreconditionFailure} PreconditionFailure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreconditionFailure.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.PreconditionFailure(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.violations && message.violations.length)) + message.violations = []; + message.violations.push($root.google.rpc.PreconditionFailure.Violation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PreconditionFailure message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.PreconditionFailure + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.PreconditionFailure} PreconditionFailure + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PreconditionFailure.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PreconditionFailure message. + * @function verify + * @memberof google.rpc.PreconditionFailure + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PreconditionFailure.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.violations != null && message.hasOwnProperty("violations")) { + if (!Array.isArray(message.violations)) + return "violations: array expected"; + for (var i = 0; i < message.violations.length; ++i) { + var error = $root.google.rpc.PreconditionFailure.Violation.verify(message.violations[i]); + if (error) + return "violations." + error; + } + } + return null; + }; + + /** + * Creates a PreconditionFailure message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.PreconditionFailure + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.PreconditionFailure} PreconditionFailure + */ + PreconditionFailure.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.PreconditionFailure) + return object; + var message = new $root.google.rpc.PreconditionFailure(); + if (object.violations) { + if (!Array.isArray(object.violations)) + throw TypeError(".google.rpc.PreconditionFailure.violations: array expected"); + message.violations = []; + for (var i = 0; i < object.violations.length; ++i) { + if (typeof object.violations[i] !== "object") + throw TypeError(".google.rpc.PreconditionFailure.violations: object expected"); + message.violations[i] = $root.google.rpc.PreconditionFailure.Violation.fromObject(object.violations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a PreconditionFailure message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.PreconditionFailure + * @static + * @param {google.rpc.PreconditionFailure} message PreconditionFailure + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PreconditionFailure.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.violations = []; + if (message.violations && message.violations.length) { + object.violations = []; + for (var j = 0; j < message.violations.length; ++j) + object.violations[j] = $root.google.rpc.PreconditionFailure.Violation.toObject(message.violations[j], options); + } + return object; + }; + + /** + * Converts this PreconditionFailure to JSON. + * @function toJSON + * @memberof google.rpc.PreconditionFailure + * @instance + * @returns {Object.} JSON object + */ + PreconditionFailure.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PreconditionFailure + * @function getTypeUrl + * @memberof google.rpc.PreconditionFailure + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PreconditionFailure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.PreconditionFailure"; + }; + + PreconditionFailure.Violation = (function() { + + /** + * Properties of a Violation. + * @memberof google.rpc.PreconditionFailure + * @interface IViolation + * @property {string|null} [type] Violation type + * @property {string|null} [subject] Violation subject + * @property {string|null} [description] Violation description + */ + + /** + * Constructs a new Violation. + * @memberof google.rpc.PreconditionFailure + * @classdesc Represents a Violation. + * @implements IViolation + * @constructor + * @param {google.rpc.PreconditionFailure.IViolation=} [properties] Properties to set + */ + function Violation(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]]; + } + + /** + * Violation type. + * @member {string} type + * @memberof google.rpc.PreconditionFailure.Violation + * @instance + */ + Violation.prototype.type = ""; + + /** + * Violation subject. + * @member {string} subject + * @memberof google.rpc.PreconditionFailure.Violation + * @instance + */ + Violation.prototype.subject = ""; + + /** + * Violation description. + * @member {string} description + * @memberof google.rpc.PreconditionFailure.Violation + * @instance + */ + Violation.prototype.description = ""; + + /** + * Creates a new Violation instance using the specified properties. + * @function create + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {google.rpc.PreconditionFailure.IViolation=} [properties] Properties to set + * @returns {google.rpc.PreconditionFailure.Violation} Violation instance + */ + Violation.create = function create(properties) { + return new Violation(properties); + }; + + /** + * Encodes the specified Violation message. Does not implicitly {@link google.rpc.PreconditionFailure.Violation.verify|verify} messages. + * @function encode + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {google.rpc.PreconditionFailure.IViolation} message Violation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Violation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.subject); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); + return writer; + }; + + /** + * Encodes the specified Violation message, length delimited. Does not implicitly {@link google.rpc.PreconditionFailure.Violation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {google.rpc.PreconditionFailure.IViolation} message Violation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Violation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Violation message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.PreconditionFailure.Violation} Violation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Violation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.PreconditionFailure.Violation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.subject = reader.string(); + break; + } + case 3: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Violation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.PreconditionFailure.Violation} Violation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Violation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Violation message. + * @function verify + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Violation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.subject != null && message.hasOwnProperty("subject")) + if (!$util.isString(message.subject)) + return "subject: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a Violation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.PreconditionFailure.Violation} Violation + */ + Violation.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.PreconditionFailure.Violation) + return object; + var message = new $root.google.rpc.PreconditionFailure.Violation(); + if (object.type != null) + message.type = String(object.type); + if (object.subject != null) + message.subject = String(object.subject); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a Violation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {google.rpc.PreconditionFailure.Violation} message Violation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Violation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.subject = ""; + object.description = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.subject != null && message.hasOwnProperty("subject")) + object.subject = message.subject; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this Violation to JSON. + * @function toJSON + * @memberof google.rpc.PreconditionFailure.Violation + * @instance + * @returns {Object.} JSON object + */ + Violation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Violation + * @function getTypeUrl + * @memberof google.rpc.PreconditionFailure.Violation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Violation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.PreconditionFailure.Violation"; + }; + + return Violation; + })(); + + return PreconditionFailure; + })(); + + rpc.BadRequest = (function() { + + /** + * Properties of a BadRequest. + * @memberof google.rpc + * @interface IBadRequest + * @property {Array.|null} [fieldViolations] BadRequest fieldViolations + */ + + /** + * Constructs a new BadRequest. + * @memberof google.rpc + * @classdesc Represents a BadRequest. + * @implements IBadRequest + * @constructor + * @param {google.rpc.IBadRequest=} [properties] Properties to set + */ + function BadRequest(properties) { + this.fieldViolations = []; + 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]]; + } + + /** + * BadRequest fieldViolations. + * @member {Array.} fieldViolations + * @memberof google.rpc.BadRequest + * @instance + */ + BadRequest.prototype.fieldViolations = $util.emptyArray; + + /** + * Creates a new BadRequest instance using the specified properties. + * @function create + * @memberof google.rpc.BadRequest + * @static + * @param {google.rpc.IBadRequest=} [properties] Properties to set + * @returns {google.rpc.BadRequest} BadRequest instance + */ + BadRequest.create = function create(properties) { + return new BadRequest(properties); + }; + + /** + * Encodes the specified BadRequest message. Does not implicitly {@link google.rpc.BadRequest.verify|verify} messages. + * @function encode + * @memberof google.rpc.BadRequest + * @static + * @param {google.rpc.IBadRequest} message BadRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BadRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.fieldViolations != null && message.fieldViolations.length) + for (var i = 0; i < message.fieldViolations.length; ++i) + $root.google.rpc.BadRequest.FieldViolation.encode(message.fieldViolations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BadRequest message, length delimited. Does not implicitly {@link google.rpc.BadRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.BadRequest + * @static + * @param {google.rpc.IBadRequest} message BadRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BadRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BadRequest message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.BadRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.BadRequest} BadRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BadRequest.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.BadRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.fieldViolations && message.fieldViolations.length)) + message.fieldViolations = []; + message.fieldViolations.push($root.google.rpc.BadRequest.FieldViolation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BadRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.BadRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.BadRequest} BadRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BadRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BadRequest message. + * @function verify + * @memberof google.rpc.BadRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BadRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.fieldViolations != null && message.hasOwnProperty("fieldViolations")) { + if (!Array.isArray(message.fieldViolations)) + return "fieldViolations: array expected"; + for (var i = 0; i < message.fieldViolations.length; ++i) { + var error = $root.google.rpc.BadRequest.FieldViolation.verify(message.fieldViolations[i]); + if (error) + return "fieldViolations." + error; + } + } + return null; + }; + + /** + * Creates a BadRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.BadRequest + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.BadRequest} BadRequest + */ + BadRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.BadRequest) + return object; + var message = new $root.google.rpc.BadRequest(); + if (object.fieldViolations) { + if (!Array.isArray(object.fieldViolations)) + throw TypeError(".google.rpc.BadRequest.fieldViolations: array expected"); + message.fieldViolations = []; + for (var i = 0; i < object.fieldViolations.length; ++i) { + if (typeof object.fieldViolations[i] !== "object") + throw TypeError(".google.rpc.BadRequest.fieldViolations: object expected"); + message.fieldViolations[i] = $root.google.rpc.BadRequest.FieldViolation.fromObject(object.fieldViolations[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BadRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.BadRequest + * @static + * @param {google.rpc.BadRequest} message BadRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BadRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.fieldViolations = []; + if (message.fieldViolations && message.fieldViolations.length) { + object.fieldViolations = []; + for (var j = 0; j < message.fieldViolations.length; ++j) + object.fieldViolations[j] = $root.google.rpc.BadRequest.FieldViolation.toObject(message.fieldViolations[j], options); + } + return object; + }; + + /** + * Converts this BadRequest to JSON. + * @function toJSON + * @memberof google.rpc.BadRequest + * @instance + * @returns {Object.} JSON object + */ + BadRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BadRequest + * @function getTypeUrl + * @memberof google.rpc.BadRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BadRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.BadRequest"; + }; + + BadRequest.FieldViolation = (function() { + + /** + * Properties of a FieldViolation. + * @memberof google.rpc.BadRequest + * @interface IFieldViolation + * @property {string|null} [field] FieldViolation field + * @property {string|null} [description] FieldViolation description + * @property {string|null} [reason] FieldViolation reason + * @property {google.rpc.ILocalizedMessage|null} [localizedMessage] FieldViolation localizedMessage + */ + + /** + * Constructs a new FieldViolation. + * @memberof google.rpc.BadRequest + * @classdesc Represents a FieldViolation. + * @implements IFieldViolation + * @constructor + * @param {google.rpc.BadRequest.IFieldViolation=} [properties] Properties to set + */ + function FieldViolation(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]]; + } + + /** + * FieldViolation field. + * @member {string} field + * @memberof google.rpc.BadRequest.FieldViolation + * @instance + */ + FieldViolation.prototype.field = ""; + + /** + * FieldViolation description. + * @member {string} description + * @memberof google.rpc.BadRequest.FieldViolation + * @instance + */ + FieldViolation.prototype.description = ""; + + /** + * FieldViolation reason. + * @member {string} reason + * @memberof google.rpc.BadRequest.FieldViolation + * @instance + */ + FieldViolation.prototype.reason = ""; + + /** + * FieldViolation localizedMessage. + * @member {google.rpc.ILocalizedMessage|null|undefined} localizedMessage + * @memberof google.rpc.BadRequest.FieldViolation + * @instance + */ + FieldViolation.prototype.localizedMessage = null; + + /** + * Creates a new FieldViolation instance using the specified properties. + * @function create + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {google.rpc.BadRequest.IFieldViolation=} [properties] Properties to set + * @returns {google.rpc.BadRequest.FieldViolation} FieldViolation instance + */ + FieldViolation.create = function create(properties) { + return new FieldViolation(properties); + }; + + /** + * Encodes the specified FieldViolation message. Does not implicitly {@link google.rpc.BadRequest.FieldViolation.verify|verify} messages. + * @function encode + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {google.rpc.BadRequest.IFieldViolation} message FieldViolation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldViolation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.field != null && Object.hasOwnProperty.call(message, "field")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); + if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.reason); + if (message.localizedMessage != null && Object.hasOwnProperty.call(message, "localizedMessage")) + $root.google.rpc.LocalizedMessage.encode(message.localizedMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldViolation message, length delimited. Does not implicitly {@link google.rpc.BadRequest.FieldViolation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {google.rpc.BadRequest.IFieldViolation} message FieldViolation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldViolation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldViolation message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.BadRequest.FieldViolation} FieldViolation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldViolation.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.BadRequest.FieldViolation(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.field = reader.string(); + break; + } + case 2: { + message.description = reader.string(); + break; + } + case 3: { + message.reason = reader.string(); + break; + } + case 4: { + message.localizedMessage = $root.google.rpc.LocalizedMessage.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldViolation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.BadRequest.FieldViolation} FieldViolation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldViolation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldViolation message. + * @function verify + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldViolation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.field != null && message.hasOwnProperty("field")) + if (!$util.isString(message.field)) + return "field: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.reason != null && message.hasOwnProperty("reason")) + if (!$util.isString(message.reason)) + return "reason: string expected"; + if (message.localizedMessage != null && message.hasOwnProperty("localizedMessage")) { + var error = $root.google.rpc.LocalizedMessage.verify(message.localizedMessage); + if (error) + return "localizedMessage." + error; + } + return null; + }; + + /** + * Creates a FieldViolation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.BadRequest.FieldViolation} FieldViolation + */ + FieldViolation.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.BadRequest.FieldViolation) + return object; + var message = new $root.google.rpc.BadRequest.FieldViolation(); + if (object.field != null) + message.field = String(object.field); + if (object.description != null) + message.description = String(object.description); + if (object.reason != null) + message.reason = String(object.reason); + if (object.localizedMessage != null) { + if (typeof object.localizedMessage !== "object") + throw TypeError(".google.rpc.BadRequest.FieldViolation.localizedMessage: object expected"); + message.localizedMessage = $root.google.rpc.LocalizedMessage.fromObject(object.localizedMessage); + } + return message; + }; + + /** + * Creates a plain object from a FieldViolation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {google.rpc.BadRequest.FieldViolation} message FieldViolation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FieldViolation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.field = ""; + object.description = ""; + object.reason = ""; + object.localizedMessage = null; + } + if (message.field != null && message.hasOwnProperty("field")) + object.field = message.field; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.reason != null && message.hasOwnProperty("reason")) + object.reason = message.reason; + if (message.localizedMessage != null && message.hasOwnProperty("localizedMessage")) + object.localizedMessage = $root.google.rpc.LocalizedMessage.toObject(message.localizedMessage, options); + return object; + }; + + /** + * Converts this FieldViolation to JSON. + * @function toJSON + * @memberof google.rpc.BadRequest.FieldViolation + * @instance + * @returns {Object.} JSON object + */ + FieldViolation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FieldViolation + * @function getTypeUrl + * @memberof google.rpc.BadRequest.FieldViolation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FieldViolation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.BadRequest.FieldViolation"; + }; + + return FieldViolation; + })(); + + return BadRequest; + })(); + + rpc.RequestInfo = (function() { + + /** + * Properties of a RequestInfo. + * @memberof google.rpc + * @interface IRequestInfo + * @property {string|null} [requestId] RequestInfo requestId + * @property {string|null} [servingData] RequestInfo servingData + */ + + /** + * Constructs a new RequestInfo. + * @memberof google.rpc + * @classdesc Represents a RequestInfo. + * @implements IRequestInfo + * @constructor + * @param {google.rpc.IRequestInfo=} [properties] Properties to set + */ + function RequestInfo(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]]; + } + + /** + * RequestInfo requestId. + * @member {string} requestId + * @memberof google.rpc.RequestInfo + * @instance + */ + RequestInfo.prototype.requestId = ""; + + /** + * RequestInfo servingData. + * @member {string} servingData + * @memberof google.rpc.RequestInfo + * @instance + */ + RequestInfo.prototype.servingData = ""; + + /** + * Creates a new RequestInfo instance using the specified properties. + * @function create + * @memberof google.rpc.RequestInfo + * @static + * @param {google.rpc.IRequestInfo=} [properties] Properties to set + * @returns {google.rpc.RequestInfo} RequestInfo instance + */ + RequestInfo.create = function create(properties) { + return new RequestInfo(properties); + }; + + /** + * Encodes the specified RequestInfo message. Does not implicitly {@link google.rpc.RequestInfo.verify|verify} messages. + * @function encode + * @memberof google.rpc.RequestInfo + * @static + * @param {google.rpc.IRequestInfo} message RequestInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestId); + if (message.servingData != null && Object.hasOwnProperty.call(message, "servingData")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.servingData); + return writer; + }; + + /** + * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link google.rpc.RequestInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.RequestInfo + * @static + * @param {google.rpc.IRequestInfo} message RequestInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + RequestInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a RequestInfo message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.RequestInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.RequestInfo} RequestInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.RequestInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.requestId = reader.string(); + break; + } + case 2: { + message.servingData = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a RequestInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.RequestInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.RequestInfo} RequestInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + RequestInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a RequestInfo message. + * @function verify + * @memberof google.rpc.RequestInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + RequestInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + if (message.servingData != null && message.hasOwnProperty("servingData")) + if (!$util.isString(message.servingData)) + return "servingData: string expected"; + return null; + }; + + /** + * Creates a RequestInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.RequestInfo + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.RequestInfo} RequestInfo + */ + RequestInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.RequestInfo) + return object; + var message = new $root.google.rpc.RequestInfo(); + if (object.requestId != null) + message.requestId = String(object.requestId); + if (object.servingData != null) + message.servingData = String(object.servingData); + return message; + }; + + /** + * Creates a plain object from a RequestInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.RequestInfo + * @static + * @param {google.rpc.RequestInfo} message RequestInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + RequestInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.requestId = ""; + object.servingData = ""; + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.servingData != null && message.hasOwnProperty("servingData")) + object.servingData = message.servingData; + return object; + }; + + /** + * Converts this RequestInfo to JSON. + * @function toJSON + * @memberof google.rpc.RequestInfo + * @instance + * @returns {Object.} JSON object + */ + RequestInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for RequestInfo + * @function getTypeUrl + * @memberof google.rpc.RequestInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + RequestInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.RequestInfo"; + }; + + return RequestInfo; + })(); + + rpc.ResourceInfo = (function() { + + /** + * Properties of a ResourceInfo. + * @memberof google.rpc + * @interface IResourceInfo + * @property {string|null} [resourceType] ResourceInfo resourceType + * @property {string|null} [resourceName] ResourceInfo resourceName + * @property {string|null} [owner] ResourceInfo owner + * @property {string|null} [description] ResourceInfo description + */ + + /** + * Constructs a new ResourceInfo. + * @memberof google.rpc + * @classdesc Represents a ResourceInfo. + * @implements IResourceInfo + * @constructor + * @param {google.rpc.IResourceInfo=} [properties] Properties to set + */ + function ResourceInfo(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]]; + } + + /** + * ResourceInfo resourceType. + * @member {string} resourceType + * @memberof google.rpc.ResourceInfo + * @instance + */ + ResourceInfo.prototype.resourceType = ""; + + /** + * ResourceInfo resourceName. + * @member {string} resourceName + * @memberof google.rpc.ResourceInfo + * @instance + */ + ResourceInfo.prototype.resourceName = ""; + + /** + * ResourceInfo owner. + * @member {string} owner + * @memberof google.rpc.ResourceInfo + * @instance + */ + ResourceInfo.prototype.owner = ""; + + /** + * ResourceInfo description. + * @member {string} description + * @memberof google.rpc.ResourceInfo + * @instance + */ + ResourceInfo.prototype.description = ""; + + /** + * Creates a new ResourceInfo instance using the specified properties. + * @function create + * @memberof google.rpc.ResourceInfo + * @static + * @param {google.rpc.IResourceInfo=} [properties] Properties to set + * @returns {google.rpc.ResourceInfo} ResourceInfo instance + */ + ResourceInfo.create = function create(properties) { + return new ResourceInfo(properties); + }; + + /** + * Encodes the specified ResourceInfo message. Does not implicitly {@link google.rpc.ResourceInfo.verify|verify} messages. + * @function encode + * @memberof google.rpc.ResourceInfo + * @static + * @param {google.rpc.IResourceInfo} message ResourceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceType); + if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceName); + if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.owner); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); + return writer; + }; + + /** + * Encodes the specified ResourceInfo message, length delimited. Does not implicitly {@link google.rpc.ResourceInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.ResourceInfo + * @static + * @param {google.rpc.IResourceInfo} message ResourceInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceInfo message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.ResourceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.ResourceInfo} ResourceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceInfo.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.ResourceInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.resourceType = reader.string(); + break; + } + case 2: { + message.resourceName = reader.string(); + break; + } + case 3: { + message.owner = reader.string(); + break; + } + case 4: { + message.description = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.ResourceInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.ResourceInfo} ResourceInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceInfo message. + * @function verify + * @memberof google.rpc.ResourceInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + if (!$util.isString(message.resourceType)) + return "resourceType: string expected"; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + if (!$util.isString(message.resourceName)) + return "resourceName: string expected"; + if (message.owner != null && message.hasOwnProperty("owner")) + if (!$util.isString(message.owner)) + return "owner: string expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + return null; + }; + + /** + * Creates a ResourceInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.ResourceInfo + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.ResourceInfo} ResourceInfo + */ + ResourceInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.ResourceInfo) + return object; + var message = new $root.google.rpc.ResourceInfo(); + if (object.resourceType != null) + message.resourceType = String(object.resourceType); + if (object.resourceName != null) + message.resourceName = String(object.resourceName); + if (object.owner != null) + message.owner = String(object.owner); + if (object.description != null) + message.description = String(object.description); + return message; + }; + + /** + * Creates a plain object from a ResourceInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.ResourceInfo + * @static + * @param {google.rpc.ResourceInfo} message ResourceInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.resourceType = ""; + object.resourceName = ""; + object.owner = ""; + object.description = ""; + } + if (message.resourceType != null && message.hasOwnProperty("resourceType")) + object.resourceType = message.resourceType; + if (message.resourceName != null && message.hasOwnProperty("resourceName")) + object.resourceName = message.resourceName; + if (message.owner != null && message.hasOwnProperty("owner")) + object.owner = message.owner; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + return object; + }; + + /** + * Converts this ResourceInfo to JSON. + * @function toJSON + * @memberof google.rpc.ResourceInfo + * @instance + * @returns {Object.} JSON object + */ + ResourceInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceInfo + * @function getTypeUrl + * @memberof google.rpc.ResourceInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.ResourceInfo"; + }; + + return ResourceInfo; + })(); + + rpc.Help = (function() { + + /** + * Properties of a Help. + * @memberof google.rpc + * @interface IHelp + * @property {Array.|null} [links] Help links + */ + + /** + * Constructs a new Help. + * @memberof google.rpc + * @classdesc Represents a Help. + * @implements IHelp + * @constructor + * @param {google.rpc.IHelp=} [properties] Properties to set + */ + function Help(properties) { + this.links = []; + 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]]; + } + + /** + * Help links. + * @member {Array.} links + * @memberof google.rpc.Help + * @instance + */ + Help.prototype.links = $util.emptyArray; + + /** + * Creates a new Help instance using the specified properties. + * @function create + * @memberof google.rpc.Help + * @static + * @param {google.rpc.IHelp=} [properties] Properties to set + * @returns {google.rpc.Help} Help instance + */ + Help.create = function create(properties) { + return new Help(properties); + }; + + /** + * Encodes the specified Help message. Does not implicitly {@link google.rpc.Help.verify|verify} messages. + * @function encode + * @memberof google.rpc.Help + * @static + * @param {google.rpc.IHelp} message Help message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Help.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.links != null && message.links.length) + for (var i = 0; i < message.links.length; ++i) + $root.google.rpc.Help.Link.encode(message.links[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Help message, length delimited. Does not implicitly {@link google.rpc.Help.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Help + * @static + * @param {google.rpc.IHelp} message Help message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Help.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Help message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Help + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Help} Help + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Help.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Help(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + if (!(message.links && message.links.length)) + message.links = []; + message.links.push($root.google.rpc.Help.Link.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Help message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Help + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Help} Help + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Help.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Help message. + * @function verify + * @memberof google.rpc.Help + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Help.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.links != null && message.hasOwnProperty("links")) { + if (!Array.isArray(message.links)) + return "links: array expected"; + for (var i = 0; i < message.links.length; ++i) { + var error = $root.google.rpc.Help.Link.verify(message.links[i]); + if (error) + return "links." + error; + } + } + return null; + }; + + /** + * Creates a Help message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Help + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Help} Help + */ + Help.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Help) + return object; + var message = new $root.google.rpc.Help(); + if (object.links) { + if (!Array.isArray(object.links)) + throw TypeError(".google.rpc.Help.links: array expected"); + message.links = []; + for (var i = 0; i < object.links.length; ++i) { + if (typeof object.links[i] !== "object") + throw TypeError(".google.rpc.Help.links: object expected"); + message.links[i] = $root.google.rpc.Help.Link.fromObject(object.links[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a Help message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Help + * @static + * @param {google.rpc.Help} message Help + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Help.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.links = []; + if (message.links && message.links.length) { + object.links = []; + for (var j = 0; j < message.links.length; ++j) + object.links[j] = $root.google.rpc.Help.Link.toObject(message.links[j], options); + } + return object; + }; + + /** + * Converts this Help to JSON. + * @function toJSON + * @memberof google.rpc.Help + * @instance + * @returns {Object.} JSON object + */ + Help.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Help + * @function getTypeUrl + * @memberof google.rpc.Help + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Help.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Help"; + }; + + Help.Link = (function() { + + /** + * Properties of a Link. + * @memberof google.rpc.Help + * @interface ILink + * @property {string|null} [description] Link description + * @property {string|null} [url] Link url + */ + + /** + * Constructs a new Link. + * @memberof google.rpc.Help + * @classdesc Represents a Link. + * @implements ILink + * @constructor + * @param {google.rpc.Help.ILink=} [properties] Properties to set + */ + function Link(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]]; + } + + /** + * Link description. + * @member {string} description + * @memberof google.rpc.Help.Link + * @instance + */ + Link.prototype.description = ""; + + /** + * Link url. + * @member {string} url + * @memberof google.rpc.Help.Link + * @instance + */ + Link.prototype.url = ""; + + /** + * Creates a new Link instance using the specified properties. + * @function create + * @memberof google.rpc.Help.Link + * @static + * @param {google.rpc.Help.ILink=} [properties] Properties to set + * @returns {google.rpc.Help.Link} Link instance + */ + Link.create = function create(properties) { + return new Link(properties); + }; + + /** + * Encodes the specified Link message. Does not implicitly {@link google.rpc.Help.Link.verify|verify} messages. + * @function encode + * @memberof google.rpc.Help.Link + * @static + * @param {google.rpc.Help.ILink} message Link message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Link.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.url != null && Object.hasOwnProperty.call(message, "url")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.url); + return writer; + }; + + /** + * Encodes the specified Link message, length delimited. Does not implicitly {@link google.rpc.Help.Link.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.Help.Link + * @static + * @param {google.rpc.Help.ILink} message Link message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Link.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Link message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.Help.Link + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.Help.Link} Link + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Link.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Help.Link(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.description = reader.string(); + break; + } + case 2: { + message.url = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Link message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.Help.Link + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.Help.Link} Link + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Link.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Link message. + * @function verify + * @memberof google.rpc.Help.Link + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Link.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.url != null && message.hasOwnProperty("url")) + if (!$util.isString(message.url)) + return "url: string expected"; + return null; + }; + + /** + * Creates a Link message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.Help.Link + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.Help.Link} Link + */ + Link.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.Help.Link) + return object; + var message = new $root.google.rpc.Help.Link(); + if (object.description != null) + message.description = String(object.description); + if (object.url != null) + message.url = String(object.url); + return message; + }; + + /** + * Creates a plain object from a Link message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.Help.Link + * @static + * @param {google.rpc.Help.Link} message Link + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Link.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.description = ""; + object.url = ""; + } + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + if (message.url != null && message.hasOwnProperty("url")) + object.url = message.url; + return object; + }; + + /** + * Converts this Link to JSON. + * @function toJSON + * @memberof google.rpc.Help.Link + * @instance + * @returns {Object.} JSON object + */ + Link.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Link + * @function getTypeUrl + * @memberof google.rpc.Help.Link + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Link.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.Help.Link"; + }; + + return Link; + })(); + + return Help; + })(); + + rpc.LocalizedMessage = (function() { + + /** + * Properties of a LocalizedMessage. + * @memberof google.rpc + * @interface ILocalizedMessage + * @property {string|null} [locale] LocalizedMessage locale + * @property {string|null} [message] LocalizedMessage message + */ + + /** + * Constructs a new LocalizedMessage. + * @memberof google.rpc + * @classdesc Represents a LocalizedMessage. + * @implements ILocalizedMessage + * @constructor + * @param {google.rpc.ILocalizedMessage=} [properties] Properties to set + */ + function LocalizedMessage(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]]; + } + + /** + * LocalizedMessage locale. + * @member {string} locale + * @memberof google.rpc.LocalizedMessage + * @instance + */ + LocalizedMessage.prototype.locale = ""; + + /** + * LocalizedMessage message. + * @member {string} message + * @memberof google.rpc.LocalizedMessage + * @instance + */ + LocalizedMessage.prototype.message = ""; + + /** + * Creates a new LocalizedMessage instance using the specified properties. + * @function create + * @memberof google.rpc.LocalizedMessage + * @static + * @param {google.rpc.ILocalizedMessage=} [properties] Properties to set + * @returns {google.rpc.LocalizedMessage} LocalizedMessage instance + */ + LocalizedMessage.create = function create(properties) { + return new LocalizedMessage(properties); + }; + + /** + * Encodes the specified LocalizedMessage message. Does not implicitly {@link google.rpc.LocalizedMessage.verify|verify} messages. + * @function encode + * @memberof google.rpc.LocalizedMessage + * @static + * @param {google.rpc.ILocalizedMessage} message LocalizedMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocalizedMessage.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.locale); + if (message.message != null && Object.hasOwnProperty.call(message, "message")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); + return writer; + }; + + /** + * Encodes the specified LocalizedMessage message, length delimited. Does not implicitly {@link google.rpc.LocalizedMessage.verify|verify} messages. + * @function encodeDelimited + * @memberof google.rpc.LocalizedMessage + * @static + * @param {google.rpc.ILocalizedMessage} message LocalizedMessage message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LocalizedMessage.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LocalizedMessage message from the specified reader or buffer. + * @function decode + * @memberof google.rpc.LocalizedMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.rpc.LocalizedMessage} LocalizedMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocalizedMessage.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.LocalizedMessage(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.locale = reader.string(); + break; + } + case 2: { + message.message = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LocalizedMessage message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.rpc.LocalizedMessage + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.rpc.LocalizedMessage} LocalizedMessage + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LocalizedMessage.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LocalizedMessage message. + * @function verify + * @memberof google.rpc.LocalizedMessage + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LocalizedMessage.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.locale != null && message.hasOwnProperty("locale")) + if (!$util.isString(message.locale)) + return "locale: string expected"; + if (message.message != null && message.hasOwnProperty("message")) + if (!$util.isString(message.message)) + return "message: string expected"; + return null; + }; + + /** + * Creates a LocalizedMessage message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.rpc.LocalizedMessage + * @static + * @param {Object.} object Plain object + * @returns {google.rpc.LocalizedMessage} LocalizedMessage + */ + LocalizedMessage.fromObject = function fromObject(object) { + if (object instanceof $root.google.rpc.LocalizedMessage) + return object; + var message = new $root.google.rpc.LocalizedMessage(); + if (object.locale != null) + message.locale = String(object.locale); + if (object.message != null) + message.message = String(object.message); + return message; + }; + + /** + * Creates a plain object from a LocalizedMessage message. Also converts values to other types if specified. + * @function toObject + * @memberof google.rpc.LocalizedMessage + * @static + * @param {google.rpc.LocalizedMessage} message LocalizedMessage + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LocalizedMessage.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.locale = ""; + object.message = ""; + } + if (message.locale != null && message.hasOwnProperty("locale")) + object.locale = message.locale; + if (message.message != null && message.hasOwnProperty("message")) + object.message = message.message; + return object; + }; + + /** + * Converts this LocalizedMessage to JSON. + * @function toJSON + * @memberof google.rpc.LocalizedMessage + * @instance + * @returns {Object.} JSON object + */ + LocalizedMessage.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LocalizedMessage + * @function getTypeUrl + * @memberof google.rpc.LocalizedMessage + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LocalizedMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.rpc.LocalizedMessage"; + }; + + return LocalizedMessage; + })(); + + return rpc; + })(); + + return google; + })(); + + return $root; +}); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.json b/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.json new file mode 100644 index 000000000000..47c7fc1c94c6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.json @@ -0,0 +1,5006 @@ +{ + "nested": { + "google": { + "nested": { + "cloud": { + "nested": { + "bigquery": { + "nested": { + "migration": { + "nested": { + "v2": { + "options": { + "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": "TranslationSuggestionProto", + "java_package": "com.google.cloud.bigquery.migration.v2", + "php_namespace": "Google\\Cloud\\BigQuery\\Migration\\V2" + }, + "nested": { + "AssessmentTaskDetails": { + "oneofs": { + "_featureHandle": { + "oneof": [ + "featureHandle" + ] + } + }, + "fields": { + "inputPath": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "outputDataset": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "querylogsPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataSource": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "featureHandle": { + "type": "AssessmentFeatureHandle", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "AssessmentFeatureHandle": { + "oneofs": { + "_addShareableDataset": { + "oneof": [ + "addShareableDataset" + ] + } + }, + "fields": { + "addShareableDataset": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "MigrationWorkflow": { + "options": { + "(google.api.resource).type": "bigquerymigration.googleapis.com/MigrationWorkflow", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/workflows/{workflow}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 6 + }, + "tasks": { + "keyType": "string", + "type": "MigrationTask", + "id": 2 + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "DRAFT": 1, + "RUNNING": 2, + "PAUSED": 3, + "COMPLETED": 4 + } + } + } + }, + "MigrationTask": { + "oneofs": { + "taskDetails": { + "oneof": [ + "assessmentTaskDetails", + "translationConfigDetails", + "translationDetails" + ] + } + }, + "fields": { + "assessmentTaskDetails": { + "type": "AssessmentTaskDetails", + "id": 12 + }, + "translationConfigDetails": { + "type": "TranslationConfigDetails", + "id": 14 + }, + "translationDetails": { + "type": "TranslationDetails", + "id": 16 + }, + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "type": { + "type": "string", + "id": 2 + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "processingError": { + "type": "google.rpc.ErrorInfo", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceErrorDetails": { + "rule": "repeated", + "type": "ResourceErrorDetail", + "id": 17, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceErrorCount": { + "type": "int32", + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metrics": { + "rule": "repeated", + "type": "TimeSeries", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "taskResult": { + "type": "MigrationTaskResult", + "id": 20, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "totalProcessingErrorCount": { + "type": "int32", + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "totalResourceErrorCount": { + "type": "int32", + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PENDING": 1, + "ORCHESTRATING": 2, + "RUNNING": 3, + "PAUSED": 4, + "SUCCEEDED": 5, + "FAILED": 6 + } + } + } + }, + "MigrationSubtask": { + "options": { + "(google.api.resource).type": "bigquerymigration.googleapis.com/MigrationSubtask", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "taskId": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "processingError": { + "type": "google.rpc.ErrorInfo", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceErrorDetails": { + "rule": "repeated", + "type": "ResourceErrorDetail", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceErrorCount": { + "type": "int32", + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "lastUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "metrics": { + "rule": "repeated", + "type": "TimeSeries", + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "RUNNING": 2, + "SUCCEEDED": 3, + "FAILED": 4, + "PAUSED": 5, + "PENDING_DEPENDENCY": 6 + } + } + } + }, + "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 + }, + "consoleUri": { + "type": "string", + "id": 3 + } + } + }, + "ResourceErrorDetail": { + "fields": { + "resourceInfo": { + "type": "google.rpc.ResourceInfo", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "errorDetails": { + "rule": "repeated", + "type": "ErrorDetail", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "errorCount": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ErrorDetail": { + "fields": { + "location": { + "type": "ErrorLocation", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "errorInfo": { + "type": "google.rpc.ErrorInfo", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ErrorLocation": { + "fields": { + "line": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "column": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TimeSeries": { + "fields": { + "metric": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "valueType": { + "type": "google.api.MetricDescriptor.ValueType", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "metricKind": { + "type": "google.api.MetricDescriptor.MetricKind", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "points": { + "rule": "repeated", + "type": "Point", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Point": { + "fields": { + "interval": { + "type": "TimeInterval", + "id": 1 + }, + "value": { + "type": "TypedValue", + "id": 2 + } + } + }, + "TimeInterval": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TypedValue": { + "oneofs": { + "value": { + "oneof": [ + "boolValue", + "int64Value", + "doubleValue", + "stringValue", + "distributionValue" + ] + } + }, + "fields": { + "boolValue": { + "type": "bool", + "id": 1 + }, + "int64Value": { + "type": "int64", + "id": 2 + }, + "doubleValue": { + "type": "double", + "id": 3 + }, + "stringValue": { + "type": "string", + "id": 4 + }, + "distributionValue": { + "type": "google.api.Distribution", + "id": 5 + } + } + }, + "TranslationConfigDetails": { + "oneofs": { + "sourceLocation": { + "oneof": [ + "gcsSourcePath" + ] + }, + "targetLocation": { + "oneof": [ + "gcsTargetPath" + ] + }, + "outputNameMapping": { + "oneof": [ + "nameMappingList" + ] + } + }, + "fields": { + "gcsSourcePath": { + "type": "string", + "id": 1 + }, + "gcsTargetPath": { + "type": "string", + "id": 2 + }, + "nameMappingList": { + "type": "ObjectNameMappingList", + "id": 5 + }, + "sourceDialect": { + "type": "Dialect", + "id": 3 + }, + "targetDialect": { + "type": "Dialect", + "id": 4 + }, + "sourceEnv": { + "type": "SourceEnv", + "id": 6 + }, + "requestSource": { + "type": "string", + "id": 8 + }, + "targetTypes": { + "rule": "repeated", + "type": "string", + "id": 9 + } + } + }, + "Dialect": { + "oneofs": { + "dialectValue": { + "oneof": [ + "bigqueryDialect", + "hiveqlDialect", + "redshiftDialect", + "teradataDialect", + "oracleDialect", + "sparksqlDialect", + "snowflakeDialect", + "netezzaDialect", + "azureSynapseDialect", + "verticaDialect", + "sqlServerDialect", + "postgresqlDialect", + "prestoDialect", + "mysqlDialect", + "db2Dialect", + "sqliteDialect", + "greenplumDialect" + ] + } + }, + "fields": { + "bigqueryDialect": { + "type": "BigQueryDialect", + "id": 1 + }, + "hiveqlDialect": { + "type": "HiveQLDialect", + "id": 2 + }, + "redshiftDialect": { + "type": "RedshiftDialect", + "id": 3 + }, + "teradataDialect": { + "type": "TeradataDialect", + "id": 4 + }, + "oracleDialect": { + "type": "OracleDialect", + "id": 5 + }, + "sparksqlDialect": { + "type": "SparkSQLDialect", + "id": 6 + }, + "snowflakeDialect": { + "type": "SnowflakeDialect", + "id": 7 + }, + "netezzaDialect": { + "type": "NetezzaDialect", + "id": 8 + }, + "azureSynapseDialect": { + "type": "AzureSynapseDialect", + "id": 9 + }, + "verticaDialect": { + "type": "VerticaDialect", + "id": 10 + }, + "sqlServerDialect": { + "type": "SQLServerDialect", + "id": 11 + }, + "postgresqlDialect": { + "type": "PostgresqlDialect", + "id": 12 + }, + "prestoDialect": { + "type": "PrestoDialect", + "id": 13 + }, + "mysqlDialect": { + "type": "MySQLDialect", + "id": 14 + }, + "db2Dialect": { + "type": "DB2Dialect", + "id": 15 + }, + "sqliteDialect": { + "type": "SQLiteDialect", + "id": 16 + }, + "greenplumDialect": { + "type": "GreenplumDialect", + "id": 17 + } + } + }, + "BigQueryDialect": { + "fields": {} + }, + "HiveQLDialect": { + "fields": {} + }, + "RedshiftDialect": { + "fields": {} + }, + "TeradataDialect": { + "fields": { + "mode": { + "type": "Mode", + "id": 1 + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "SQL": 1, + "BTEQ": 2 + } + } + } + }, + "OracleDialect": { + "fields": {} + }, + "SparkSQLDialect": { + "fields": {} + }, + "SnowflakeDialect": { + "fields": {} + }, + "NetezzaDialect": { + "fields": {} + }, + "AzureSynapseDialect": { + "fields": {} + }, + "VerticaDialect": { + "fields": {} + }, + "SQLServerDialect": { + "fields": {} + }, + "PostgresqlDialect": { + "fields": {} + }, + "PrestoDialect": { + "fields": {} + }, + "MySQLDialect": { + "fields": {} + }, + "DB2Dialect": { + "fields": {} + }, + "SQLiteDialect": { + "fields": {} + }, + "GreenplumDialect": { + "fields": {} + }, + "ObjectNameMappingList": { + "fields": { + "nameMap": { + "rule": "repeated", + "type": "ObjectNameMapping", + "id": 1 + } + } + }, + "ObjectNameMapping": { + "fields": { + "source": { + "type": "NameMappingKey", + "id": 1 + }, + "target": { + "type": "NameMappingValue", + "id": 2 + } + } + }, + "NameMappingKey": { + "fields": { + "type": { + "type": "Type", + "id": 1 + }, + "database": { + "type": "string", + "id": 2 + }, + "schema": { + "type": "string", + "id": 3 + }, + "relation": { + "type": "string", + "id": 4 + }, + "attribute": { + "type": "string", + "id": 5 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_UNSPECIFIED": 0, + "DATABASE": 1, + "SCHEMA": 2, + "RELATION": 3, + "ATTRIBUTE": 4, + "RELATION_ALIAS": 5, + "ATTRIBUTE_ALIAS": 6, + "FUNCTION": 7 + } + } + } + }, + "NameMappingValue": { + "fields": { + "database": { + "type": "string", + "id": 1 + }, + "schema": { + "type": "string", + "id": 2 + }, + "relation": { + "type": "string", + "id": 3 + }, + "attribute": { + "type": "string", + "id": 4 + } + } + }, + "SourceEnv": { + "fields": { + "defaultDatabase": { + "type": "string", + "id": 1 + }, + "schemaSearchPath": { + "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 + }, + "suggestionConfig": { + "type": "SuggestionConfig", + "id": 6 + } + } + }, + "SuggestionConfig": { + "fields": { + "skipSuggestionSteps": { + "rule": "repeated", + "type": "SuggestionStep", + "id": 1 + } + } + }, + "SuggestionStep": { + "fields": { + "suggestionType": { + "type": "SuggestionType", + "id": 1 + }, + "rewriteTarget": { + "type": "RewriteTarget", + "id": 2 + } + }, + "nested": { + "SuggestionType": { + "values": { + "SUGGESTION_TYPE_UNSPECIFIED": 0, + "QUERY_CUSTOMIZATION": 1, + "TRANSLATION_EXPLANATION": 2 + } + }, + "RewriteTarget": { + "values": { + "REWRITE_TARGET_UNSPECIFIED": 0, + "SOURCE_SQL": 1, + "TARGET_SQL": 2 + } + } + } + }, + "SourceTargetMapping": { + "fields": { + "sourceSpec": { + "type": "SourceSpec", + "id": 1 + }, + "targetSpec": { + "type": "TargetSpec", + "id": 2 + } + } + }, + "SourceSpec": { + "oneofs": { + "source": { + "oneof": [ + "baseUri", + "literal", + "gcsFilePath" + ] + } + }, + "fields": { + "baseUri": { + "type": "string", + "id": 1 + }, + "literal": { + "type": "Literal", + "id": 2 + }, + "gcsFilePath": { + "type": "string", + "id": 4 + }, + "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 + } + } + }, + "MigrationService": { + "options": { + "(google.api.default_host)": "bigquerymigration.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateMigrationWorkflow": { + "requestType": "CreateMigrationWorkflowRequest", + "responseType": "MigrationWorkflow", + "options": { + "(google.api.http).post": "/v2/{parent=projects/*/locations/*}/workflows", + "(google.api.http).body": "migration_workflow", + "(google.api.method_signature)": "parent,migration_workflow" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{parent=projects/*/locations/*}/workflows", + "body": "migration_workflow" + } + }, + { + "(google.api.method_signature)": "parent,migration_workflow" + } + ] + }, + "GetMigrationWorkflow": { + "requestType": "GetMigrationWorkflowRequest", + "responseType": "MigrationWorkflow", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/locations/*/workflows/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/locations/*/workflows/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListMigrationWorkflows": { + "requestType": "ListMigrationWorkflowsRequest", + "responseType": "ListMigrationWorkflowsResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/locations/*}/workflows", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/locations/*}/workflows" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteMigrationWorkflow": { + "requestType": "DeleteMigrationWorkflowRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2/{name=projects/*/locations/*/workflows/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2/{name=projects/*/locations/*/workflows/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "StartMigrationWorkflow": { + "requestType": "StartMigrationWorkflowRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v2/{name=projects/*/locations/*/workflows/*}:start", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2/{name=projects/*/locations/*/workflows/*}:start", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetMigrationSubtask": { + "requestType": "GetMigrationSubtaskRequest", + "responseType": "MigrationSubtask", + "options": { + "(google.api.http).get": "/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListMigrationSubtasks": { + "requestType": "ListMigrationSubtasksRequest", + "responseType": "ListMigrationSubtasksResponse", + "options": { + "(google.api.http).get": "/v2/{parent=projects/*/locations/*/workflows/*}/subtasks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2/{parent=projects/*/locations/*/workflows/*}/subtasks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CreateMigrationWorkflowRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "migrationWorkflow": { + "type": "MigrationWorkflow", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetMigrationWorkflowRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" + } + }, + "readMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "ListMigrationWorkflowsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "readMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListMigrationWorkflowsResponse": { + "fields": { + "migrationWorkflows": { + "rule": "repeated", + "type": "MigrationWorkflow", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteMigrationWorkflowRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" + } + } + } + }, + "StartMigrationWorkflowRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" + } + } + } + }, + "GetMigrationSubtaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationSubtask" + } + }, + "readMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListMigrationSubtasksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" + } + }, + "readMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListMigrationSubtasksResponse": { + "fields": { + "migrationSubtasks": { + "rule": "repeated", + "type": "MigrationSubtask", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "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 + } + } + } + } + } + }, + "v2alpha": { + "options": { + "csharp_namespace": "Google.Cloud.BigQuery.Migration.V2Alpha", + "go_package": "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb", + "java_multiple_files": true, + "java_outer_classname": "TranslationServiceProto", + "java_package": "com.google.cloud.bigquery.migration.v2alpha", + "php_namespace": "Google\\Cloud\\BigQuery\\Migration\\V2alpha" + }, + "nested": { + "AssessmentTaskDetails": { + "fields": { + "inputPath": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "outputDataset": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "querylogsPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataSource": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AssessmentOrchestrationResultDetails": { + "fields": { + "outputTablesSchemaVersion": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "MigrationWorkflow": { + "options": { + "(google.api.resource).type": "bigquerymigration.googleapis.com/MigrationWorkflow", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/workflows/{workflow}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "displayName": { + "type": "string", + "id": 6 + }, + "tasks": { + "keyType": "string", + "type": "MigrationTask", + "id": 2 + }, + "state": { + "type": "State", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "lastUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 5 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "DRAFT": 1, + "RUNNING": 2, + "PAUSED": 3, + "COMPLETED": 4 + } + } + } + }, + "MigrationTask": { + "oneofs": { + "taskDetails": { + "oneof": [ + "assessmentTaskDetails", + "translationTaskDetails" + ] + } + }, + "fields": { + "assessmentTaskDetails": { + "type": "AssessmentTaskDetails", + "id": 12 + }, + "translationTaskDetails": { + "type": "TranslationTaskDetails", + "id": 13 + }, + "id": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "type": { + "type": "string", + "id": 2 + }, + "details": { + "type": "google.protobuf.Any", + "id": 3 + }, + "state": { + "type": "State", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "processingError": { + "type": "google.rpc.ErrorInfo", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 6 + }, + "lastUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + }, + "orchestrationResult": { + "type": "MigrationTaskOrchestrationResult", + "id": 10, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "PENDING": 1, + "ORCHESTRATING": 2, + "RUNNING": 3, + "PAUSED": 4, + "SUCCEEDED": 5, + "FAILED": 6 + } + } + } + }, + "MigrationSubtask": { + "options": { + "(google.api.resource).type": "bigquerymigration.googleapis.com/MigrationSubtask", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "taskId": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "state": { + "type": "State", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "processingError": { + "type": "google.rpc.ErrorInfo", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceErrorDetails": { + "rule": "repeated", + "type": "ResourceErrorDetail", + "id": 12, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "resourceErrorCount": { + "type": "int32", + "id": 13 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 7 + }, + "lastUpdateTime": { + "type": "google.protobuf.Timestamp", + "id": 8 + }, + "metrics": { + "rule": "repeated", + "type": "TimeSeries", + "id": 11 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "ACTIVE": 1, + "RUNNING": 2, + "SUCCEEDED": 3, + "FAILED": 4, + "PAUSED": 5 + } + } + } + }, + "MigrationTaskOrchestrationResult": { + "oneofs": { + "details": { + "oneof": [ + "assessmentDetails" + ] + } + }, + "fields": { + "assessmentDetails": { + "type": "AssessmentOrchestrationResultDetails", + "id": 1 + } + } + }, + "ResourceErrorDetail": { + "fields": { + "resourceInfo": { + "type": "google.rpc.ResourceInfo", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "errorDetails": { + "rule": "repeated", + "type": "ErrorDetail", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "errorCount": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ErrorDetail": { + "fields": { + "location": { + "type": "ErrorLocation", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "errorInfo": { + "type": "google.rpc.ErrorInfo", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ErrorLocation": { + "fields": { + "line": { + "type": "int32", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "column": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "TimeSeries": { + "fields": { + "metric": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "valueType": { + "type": "google.api.MetricDescriptor.ValueType", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "metricKind": { + "type": "google.api.MetricDescriptor.MetricKind", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "points": { + "rule": "repeated", + "type": "Point", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "Point": { + "fields": { + "interval": { + "type": "TimeInterval", + "id": 1 + }, + "value": { + "type": "TypedValue", + "id": 2 + } + } + }, + "TimeInterval": { + "fields": { + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "TypedValue": { + "oneofs": { + "value": { + "oneof": [ + "boolValue", + "int64Value", + "doubleValue", + "stringValue", + "distributionValue" + ] + } + }, + "fields": { + "boolValue": { + "type": "bool", + "id": 1 + }, + "int64Value": { + "type": "int64", + "id": 2 + }, + "doubleValue": { + "type": "double", + "id": 3 + }, + "stringValue": { + "type": "string", + "id": 4 + }, + "distributionValue": { + "type": "google.api.Distribution", + "id": 5 + } + } + }, + "TranslationFileMapping": { + "fields": { + "inputPath": { + "type": "string", + "id": 1 + }, + "outputPath": { + "type": "string", + "id": 2 + } + } + }, + "TranslationTaskDetails": { + "oneofs": { + "languageOptions": { + "oneof": [ + "teradataOptions", + "bteqOptions" + ] + } + }, + "fields": { + "teradataOptions": { + "type": "TeradataOptions", + "id": 10 + }, + "bteqOptions": { + "type": "BteqOptions", + "id": 11 + }, + "inputPath": { + "type": "string", + "id": 1 + }, + "outputPath": { + "type": "string", + "id": 2 + }, + "filePaths": { + "rule": "repeated", + "type": "TranslationFileMapping", + "id": 12 + }, + "schemaPath": { + "type": "string", + "id": 3 + }, + "fileEncoding": { + "type": "FileEncoding", + "id": 4 + }, + "identifierSettings": { + "type": "IdentifierSettings", + "id": 5 + }, + "specialTokenMap": { + "keyType": "string", + "type": "TokenType", + "id": 6 + }, + "filter": { + "type": "Filter", + "id": 7 + }, + "translationExceptionTable": { + "type": "string", + "id": 13 + } + }, + "nested": { + "FileEncoding": { + "values": { + "FILE_ENCODING_UNSPECIFIED": 0, + "UTF_8": 1, + "ISO_8859_1": 2, + "US_ASCII": 3, + "UTF_16": 4, + "UTF_16LE": 5, + "UTF_16BE": 6 + } + }, + "TokenType": { + "values": { + "TOKEN_TYPE_UNSPECIFIED": 0, + "STRING": 1, + "INT64": 2, + "NUMERIC": 3, + "BOOL": 4, + "FLOAT64": 5, + "DATE": 6, + "TIMESTAMP": 7 + } + } + } + }, + "Filter": { + "fields": { + "inputFileExclusionPrefixes": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "IdentifierSettings": { + "fields": { + "outputIdentifierCase": { + "type": "IdentifierCase", + "id": 1 + }, + "identifierRewriteMode": { + "type": "IdentifierRewriteMode", + "id": 2 + } + }, + "nested": { + "IdentifierCase": { + "values": { + "IDENTIFIER_CASE_UNSPECIFIED": 0, + "ORIGINAL": 1, + "UPPER": 2, + "LOWER": 3 + } + }, + "IdentifierRewriteMode": { + "values": { + "IDENTIFIER_REWRITE_MODE_UNSPECIFIED": 0, + "NONE": 1, + "REWRITE_ALL": 2 + } + } + } + }, + "TeradataOptions": { + "fields": {} + }, + "BteqOptions": { + "fields": { + "projectDataset": { + "type": "DatasetReference", + "id": 1 + }, + "defaultPathUri": { + "type": "string", + "id": 2 + }, + "fileReplacementMap": { + "keyType": "string", + "type": "string", + "id": 3 + } + } + }, + "DatasetReference": { + "fields": { + "datasetId": { + "type": "string", + "id": 1 + }, + "projectId": { + "type": "string", + "id": 2 + } + } + }, + "MigrationService": { + "options": { + "(google.api.default_host)": "bigquerymigration.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "CreateMigrationWorkflow": { + "requestType": "CreateMigrationWorkflowRequest", + "responseType": "MigrationWorkflow", + "options": { + "(google.api.http).post": "/v2alpha/{parent=projects/*/locations/*}/workflows", + "(google.api.http).body": "migration_workflow", + "(google.api.method_signature)": "parent,migration_workflow" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2alpha/{parent=projects/*/locations/*}/workflows", + "body": "migration_workflow" + } + }, + { + "(google.api.method_signature)": "parent,migration_workflow" + } + ] + }, + "GetMigrationWorkflow": { + "requestType": "GetMigrationWorkflowRequest", + "responseType": "MigrationWorkflow", + "options": { + "(google.api.http).get": "/v2alpha/{name=projects/*/locations/*/workflows/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2alpha/{name=projects/*/locations/*/workflows/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListMigrationWorkflows": { + "requestType": "ListMigrationWorkflowsRequest", + "responseType": "ListMigrationWorkflowsResponse", + "options": { + "(google.api.http).get": "/v2alpha/{parent=projects/*/locations/*}/workflows", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2alpha/{parent=projects/*/locations/*}/workflows" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "DeleteMigrationWorkflow": { + "requestType": "DeleteMigrationWorkflowRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v2alpha/{name=projects/*/locations/*/workflows/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v2alpha/{name=projects/*/locations/*/workflows/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "StartMigrationWorkflow": { + "requestType": "StartMigrationWorkflowRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v2alpha/{name=projects/*/locations/*/workflows/*}:start", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2alpha/{name=projects/*/locations/*/workflows/*}:start", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "GetMigrationSubtask": { + "requestType": "GetMigrationSubtaskRequest", + "responseType": "MigrationSubtask", + "options": { + "(google.api.http).get": "/v2alpha/{name=projects/*/locations/*/workflows/*/subtasks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2alpha/{name=projects/*/locations/*/workflows/*/subtasks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListMigrationSubtasks": { + "requestType": "ListMigrationSubtasksRequest", + "responseType": "ListMigrationSubtasksResponse", + "options": { + "(google.api.http).get": "/v2alpha/{parent=projects/*/locations/*/workflows/*}/subtasks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v2alpha/{parent=projects/*/locations/*/workflows/*}/subtasks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "CreateMigrationWorkflowRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "migrationWorkflow": { + "type": "MigrationWorkflow", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "GetMigrationWorkflowRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" + } + }, + "readMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } + }, + "ListMigrationWorkflowsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "readMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListMigrationWorkflowsResponse": { + "fields": { + "migrationWorkflows": { + "rule": "repeated", + "type": "MigrationWorkflow", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "DeleteMigrationWorkflowRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" + } + } + } + }, + "StartMigrationWorkflowRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" + } + } + } + }, + "GetMigrationSubtaskRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationSubtask" + } + }, + "readMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListMigrationSubtasksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" + } + }, + "readMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageSize": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "filter": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListMigrationSubtasksResponse": { + "fields": { + "migrationSubtasks": { + "rule": "repeated", + "type": "MigrationSubtask", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "SqlTranslationService": { + "options": { + "(google.api.default_host)": "bigquerymigration.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "TranslateQuery": { + "requestType": "TranslateQueryRequest", + "responseType": "TranslateQueryResponse", + "options": { + "(google.api.http).post": "/v2alpha/{parent=projects/*/locations/*}:translateQuery", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,source_dialect,query" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v2alpha/{parent=projects/*/locations/*}:translateQuery", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,source_dialect,query" + } + ] + } + } + }, + "TranslateQueryRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "sourceDialect": { + "type": "SqlTranslationSourceDialect", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "query": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + }, + "nested": { + "SqlTranslationSourceDialect": { + "values": { + "SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED": 0, + "TERADATA": 1 + } + } + } + }, + "TranslateQueryResponse": { + "fields": { + "translationJob": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "translatedQuery": { + "type": "string", + "id": 1 + }, + "errors": { + "rule": "repeated", + "type": "SqlTranslationError", + "id": 2 + }, + "warnings": { + "rule": "repeated", + "type": "SqlTranslationWarning", + "id": 3 + } + } + }, + "SqlTranslationErrorDetail": { + "fields": { + "row": { + "type": "int64", + "id": 1 + }, + "column": { + "type": "int64", + "id": 2 + }, + "message": { + "type": "string", + "id": 3 + } + } + }, + "SqlTranslationError": { + "fields": { + "errorType": { + "type": "SqlTranslationErrorType", + "id": 1 + }, + "errorDetail": { + "type": "SqlTranslationErrorDetail", + "id": 2 + } + }, + "nested": { + "SqlTranslationErrorType": { + "values": { + "SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED": 0, + "SQL_PARSE_ERROR": 1, + "UNSUPPORTED_SQL_FUNCTION": 2 + } + } + } + }, + "SqlTranslationWarning": { + "fields": { + "warningDetail": { + "type": "SqlTranslationErrorDetail", + "id": 1 + } + } + } + } + } + } + } + } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ClientProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI" + }, + "nested": { + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions", + "options": { + "packed": false + } + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + }, + "Distribution": { + "fields": { + "count": { + "type": "int64", + "id": 1 + }, + "mean": { + "type": "double", + "id": 2 + }, + "sumOfSquaredDeviation": { + "type": "double", + "id": 3 + }, + "range": { + "type": "Range", + "id": 4 + }, + "bucketOptions": { + "type": "BucketOptions", + "id": 6 + }, + "bucketCounts": { + "rule": "repeated", + "type": "int64", + "id": 7 + }, + "exemplars": { + "rule": "repeated", + "type": "Exemplar", + "id": 10 + } + }, + "nested": { + "Range": { + "fields": { + "min": { + "type": "double", + "id": 1 + }, + "max": { + "type": "double", + "id": 2 + } + } + }, + "BucketOptions": { + "oneofs": { + "options": { + "oneof": [ + "linearBuckets", + "exponentialBuckets", + "explicitBuckets" + ] + } + }, + "fields": { + "linearBuckets": { + "type": "Linear", + "id": 1 + }, + "exponentialBuckets": { + "type": "Exponential", + "id": 2 + }, + "explicitBuckets": { + "type": "Explicit", + "id": 3 + } + }, + "nested": { + "Linear": { + "fields": { + "numFiniteBuckets": { + "type": "int32", + "id": 1 + }, + "width": { + "type": "double", + "id": 2 + }, + "offset": { + "type": "double", + "id": 3 + } + } + }, + "Exponential": { + "fields": { + "numFiniteBuckets": { + "type": "int32", + "id": 1 + }, + "growthFactor": { + "type": "double", + "id": 2 + }, + "scale": { + "type": "double", + "id": 3 + } + } + }, + "Explicit": { + "fields": { + "bounds": { + "rule": "repeated", + "type": "double", + "id": 1 + } + } + } + } + }, + "Exemplar": { + "fields": { + "value": { + "type": "double", + "id": 1 + }, + "timestamp": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "attachments": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + }, + "MetricDescriptor": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "string", + "id": 8 + }, + "labels": { + "rule": "repeated", + "type": "LabelDescriptor", + "id": 2 + }, + "metricKind": { + "type": "MetricKind", + "id": 3 + }, + "valueType": { + "type": "ValueType", + "id": 4 + }, + "unit": { + "type": "string", + "id": 5 + }, + "description": { + "type": "string", + "id": 6 + }, + "displayName": { + "type": "string", + "id": 7 + }, + "metadata": { + "type": "MetricDescriptorMetadata", + "id": 10 + }, + "launchStage": { + "type": "LaunchStage", + "id": 12 + }, + "monitoredResourceTypes": { + "rule": "repeated", + "type": "string", + "id": 13 + } + }, + "nested": { + "MetricKind": { + "values": { + "METRIC_KIND_UNSPECIFIED": 0, + "GAUGE": 1, + "DELTA": 2, + "CUMULATIVE": 3 + } + }, + "ValueType": { + "values": { + "VALUE_TYPE_UNSPECIFIED": 0, + "BOOL": 1, + "INT64": 2, + "DOUBLE": 3, + "STRING": 4, + "DISTRIBUTION": 5, + "MONEY": 6 + } + }, + "MetricDescriptorMetadata": { + "fields": { + "launchStage": { + "type": "LaunchStage", + "id": 1, + "options": { + "deprecated": true + } + }, + "samplePeriod": { + "type": "google.protobuf.Duration", + "id": 2 + }, + "ingestDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "timeSeriesResourceHierarchyLevel": { + "rule": "repeated", + "type": "TimeSeriesResourceHierarchyLevel", + "id": 4 + } + }, + "nested": { + "TimeSeriesResourceHierarchyLevel": { + "values": { + "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED": 0, + "PROJECT": 1, + "ORGANIZATION": 2, + "FOLDER": 3 + } + } + } + } + } + }, + "Metric": { + "fields": { + "type": { + "type": "string", + "id": 3 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "LabelDescriptor": { + "fields": { + "key": { + "type": "string", + "id": 1 + }, + "valueType": { + "type": "ValueType", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + } + }, + "nested": { + "ValueType": { + "values": { + "STRING": 0, + "BOOL": 1, + "INT64": 2 + } + } + } + }, + "LaunchStage": { + "values": { + "LAUNCH_STAGE_UNSPECIFIED": 0, + "UNIMPLEMENTED": 6, + "PRELAUNCH": 7, + "EARLY_ACCESS": 1, + "ALPHA": 2, + "BETA": 3, + "GA": 4, + "DEPRECATED": 5 + } + }, + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" + }, + "Http": { + "fields": { + "rules": { + "rule": "repeated", + "type": "HttpRule", + "id": 1 + }, + "fullyDecodeReservedExpansion": { + "type": "bool", + "id": 2 + } + } + }, + "HttpRule": { + "oneofs": { + "pattern": { + "oneof": [ + "get", + "put", + "post", + "delete", + "patch", + "custom" + ] + } + }, + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "get": { + "type": "string", + "id": 2 + }, + "put": { + "type": "string", + "id": 3 + }, + "post": { + "type": "string", + "id": 4 + }, + "delete": { + "type": "string", + "id": 5 + }, + "patch": { + "type": "string", + "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 + } + } + }, + "CustomHttpPattern": { + "fields": { + "kind": { + "type": "string", + "id": 1 + }, + "path": { + "type": "string", + "id": 2 + } + } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" + }, + "apiVersion": { + "type": "string", + "id": 525000001, + "extend": "google.protobuf.ServiceOptions" + }, + "CommonLanguageSettings": { + "fields": { + "referenceDocsUri": { + "type": "string", + "id": 1, + "options": { + "deprecated": true + } + }, + "destinations": { + "rule": "repeated", + "type": "ClientLibraryDestination", + "id": 2 + }, + "selectiveGapicGeneration": { + "type": "SelectiveGapicGeneration", + "id": 3 + } + } + }, + "ClientLibrarySettings": { + "fields": { + "version": { + "type": "string", + "id": 1 + }, + "launchStage": { + "type": "LaunchStage", + "id": 2 + }, + "restNumericEnums": { + "type": "bool", + "id": 3 + }, + "javaSettings": { + "type": "JavaSettings", + "id": 21 + }, + "cppSettings": { + "type": "CppSettings", + "id": 22 + }, + "phpSettings": { + "type": "PhpSettings", + "id": 23 + }, + "pythonSettings": { + "type": "PythonSettings", + "id": 24 + }, + "nodeSettings": { + "type": "NodeSettings", + "id": 25 + }, + "dotnetSettings": { + "type": "DotnetSettings", + "id": 26 + }, + "rubySettings": { + "type": "RubySettings", + "id": 27 + }, + "goSettings": { + "type": "GoSettings", + "id": 28 + } + } + }, + "Publishing": { + "fields": { + "methodSettings": { + "rule": "repeated", + "type": "MethodSettings", + "id": 2 + }, + "newIssueUri": { + "type": "string", + "id": 101 + }, + "documentationUri": { + "type": "string", + "id": 102 + }, + "apiShortName": { + "type": "string", + "id": 103 + }, + "githubLabel": { + "type": "string", + "id": 104 + }, + "codeownerGithubTeams": { + "rule": "repeated", + "type": "string", + "id": 105 + }, + "docTagPrefix": { + "type": "string", + "id": 106 + }, + "organization": { + "type": "ClientLibraryOrganization", + "id": 107 + }, + "librarySettings": { + "rule": "repeated", + "type": "ClientLibrarySettings", + "id": 109 + }, + "protoReferenceDocumentationUri": { + "type": "string", + "id": 110 + }, + "restReferenceDocumentationUri": { + "type": "string", + "id": 111 + } + } + }, + "JavaSettings": { + "fields": { + "libraryPackage": { + "type": "string", + "id": 1 + }, + "serviceClassNames": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "common": { + "type": "CommonLanguageSettings", + "id": 3 + } + } + }, + "CppSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PhpSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "PythonSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "experimentalFeatures": { + "type": "ExperimentalFeatures", + "id": 2 + } + }, + "nested": { + "ExperimentalFeatures": { + "fields": { + "restAsyncIoEnabled": { + "type": "bool", + "id": 1 + }, + "protobufPythonicTypesEnabled": { + "type": "bool", + "id": 2 + }, + "unversionedPackageDisabled": { + "type": "bool", + "id": 3 + } + } + } + } + }, + "NodeSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "DotnetSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "renamedResources": { + "keyType": "string", + "type": "string", + "id": 3 + }, + "ignoredResources": { + "rule": "repeated", + "type": "string", + "id": 4 + }, + "forcedNamespaceAliases": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "handwrittenSignatures": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + }, + "RubySettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + } + } + }, + "GoSettings": { + "fields": { + "common": { + "type": "CommonLanguageSettings", + "id": 1 + }, + "renamedServices": { + "keyType": "string", + "type": "string", + "id": 2 + } + } + }, + "MethodSettings": { + "fields": { + "selector": { + "type": "string", + "id": 1 + }, + "longRunning": { + "type": "LongRunning", + "id": 2 + }, + "autoPopulatedFields": { + "rule": "repeated", + "type": "string", + "id": 3 + } + }, + "nested": { + "LongRunning": { + "fields": { + "initialPollDelay": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "pollDelayMultiplier": { + "type": "float", + "id": 2 + }, + "maxPollDelay": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "totalPollTimeout": { + "type": "google.protobuf.Duration", + "id": 4 + } + } + } + } + }, + "ClientLibraryOrganization": { + "values": { + "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, + "CLOUD": 1, + "ADS": 2, + "PHOTOS": 3, + "STREET_VIEW": 4, + "SHOPPING": 5, + "GEO": 6, + "GENERATIVE_AI": 7 + } + }, + "ClientLibraryDestination": { + "values": { + "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, + "GITHUB": 10, + "PACKAGE_MANAGER": 20 + } + }, + "SelectiveGapicGeneration": { + "fields": { + "methods": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "generateOmittedAsInternal": { + "type": "bool", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "edition": "proto2", + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ] + }, + "Edition": { + "edition": "proto2", + "values": { + "EDITION_UNKNOWN": 0, + "EDITION_LEGACY": 900, + "EDITION_PROTO2": 998, + "EDITION_PROTO3": 999, + "EDITION_2023": 1000, + "EDITION_2024": 1001, + "EDITION_1_TEST_ONLY": 1, + "EDITION_2_TEST_ONLY": 2, + "EDITION_99997_TEST_ONLY": 99997, + "EDITION_99998_TEST_ONLY": 99998, + "EDITION_99999_TEST_ONLY": 99999, + "EDITION_MAX": 2147483647 + } + }, + "FileDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10 + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11 + }, + "optionDependency": { + "rule": "repeated", + "type": "string", + "id": 15 + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 11 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "edition": "proto2", + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "declaration": { + "rule": "repeated", + "type": "Declaration", + "id": 2, + "options": { + "retention": "RETENTION_SOURCE" + } + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "verification": { + "type": "VerificationState", + "id": 3, + "options": { + "default": "UNVERIFIED", + "retention": "RETENTION_SOURCE" + } + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "Declaration": { + "fields": { + "number": { + "type": "int32", + "id": 1 + }, + "fullName": { + "type": "string", + "id": 2 + }, + "type": { + "type": "string", + "id": 3 + }, + "reserved": { + "type": "bool", + "id": 5 + }, + "repeated": { + "type": "bool", + "id": 6 + } + }, + "reserved": [ + [ + 4, + 4 + ] + ] + }, + "VerificationState": { + "values": { + "DECLARATION": 0, + "UNVERIFIED": 1 + } + } + } + }, + "FieldDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + }, + "proto3Optional": { + "type": "bool", + "id": 17 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } + }, + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REPEATED": 3, + "LABEL_REQUIRED": 2 + } + } + } + }, + "OneofDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "visibility": { + "type": "SymbolVisibility", + "id": 6 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + }, + "reserved": [ + [ + 4, + 4 + ], + "stream" + ] + }, + "MethodDescriptorProto": { + "edition": "proto2", + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "edition": "proto2", + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false + } + }, + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": true + } + }, + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "features": { + "type": "FeatureSet", + "id": 50 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 42, + 42 + ], + "php_generic_services", + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "edition": "proto2", + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "mapEntry": { + "type": "bool", + "id": 7 + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 11, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 12 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 5, + 5 + ], + [ + 6, + 6 + ], + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "edition": "proto2", + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" + } + }, + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" + } + }, + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "unverifiedLazy": { + "type": "bool", + "id": 15, + "options": { + "default": false + } + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false, + "deprecated": true + } + }, + "debugRedact": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "retention": { + "type": "OptionRetention", + "id": 17 + }, + "targets": { + "rule": "repeated", + "type": "OptionTargetType", + "id": 19 + }, + "editionDefaults": { + "rule": "repeated", + "type": "EditionDefault", + "id": 20 + }, + "features": { + "type": "FeatureSet", + "id": 21 + }, + "featureSupport": { + "type": "FeatureSupport", + "id": 22 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ], + [ + 18, + 18 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 + } + }, + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 + } + }, + "OptionRetention": { + "values": { + "RETENTION_UNKNOWN": 0, + "RETENTION_RUNTIME": 1, + "RETENTION_SOURCE": 2 + } + }, + "OptionTargetType": { + "values": { + "TARGET_TYPE_UNKNOWN": 0, + "TARGET_TYPE_FILE": 1, + "TARGET_TYPE_EXTENSION_RANGE": 2, + "TARGET_TYPE_MESSAGE": 3, + "TARGET_TYPE_FIELD": 4, + "TARGET_TYPE_ONEOF": 5, + "TARGET_TYPE_ENUM": 6, + "TARGET_TYPE_ENUM_ENTRY": 7, + "TARGET_TYPE_SERVICE": 8, + "TARGET_TYPE_METHOD": 9 + } + }, + "EditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "value": { + "type": "string", + "id": 2 + } + } + }, + "FeatureSupport": { + "fields": { + "editionIntroduced": { + "type": "Edition", + "id": 1 + }, + "editionDeprecated": { + "type": "Edition", + "id": 2 + }, + "deprecationWarning": { + "type": "string", + "id": 3 + }, + "editionRemoved": { + "type": "Edition", + "id": 4 + } + } + } + } + }, + "OneofOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "edition": "proto2", + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "deprecatedLegacyJsonFieldConflicts": { + "type": "bool", + "id": 6, + "options": { + "deprecated": true + } + }, + "features": { + "type": "FeatureSet", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "features": { + "type": "FeatureSet", + "id": 2 + }, + "debugRedact": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "featureSupport": { + "type": "FieldOptions.FeatureSupport", + "id": 4 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "edition": "proto2", + "fields": { + "features": { + "type": "FeatureSet", + "id": 34 + }, + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "edition": "proto2", + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" + } + }, + "features": { + "type": "FeatureSet", + "id": 35 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 + } + } + } + }, + "UninterpretedOption": { + "edition": "proto2", + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 + }, + "identifierValue": { + "type": "string", + "id": 3 + }, + "positiveIntValue": { + "type": "uint64", + "id": 4 + }, + "negativeIntValue": { + "type": "int64", + "id": 5 + }, + "doubleValue": { + "type": "double", + "id": 6 + }, + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { + "fields": { + "namePart": { + "rule": "required", + "type": "string", + "id": 1 + }, + "isExtension": { + "rule": "required", + "type": "bool", + "id": 2 + } + } + } + } + }, + "FeatureSet": { + "edition": "proto2", + "fields": { + "fieldPresence": { + "type": "FieldPresence", + "id": 1, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_2023", + "edition_defaults.value": "EXPLICIT" + } + }, + "enumType": { + "type": "EnumType", + "id": 2, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "OPEN" + } + }, + "repeatedFieldEncoding": { + "type": "RepeatedFieldEncoding", + "id": 3, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "PACKED" + } + }, + "utf8Validation": { + "type": "Utf8Validation", + "id": 4, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "VERIFY" + } + }, + "messageEncoding": { + "type": "MessageEncoding", + "id": 5, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_LEGACY", + "edition_defaults.value": "LENGTH_PREFIXED" + } + }, + "jsonFormat": { + "type": "JsonFormat", + "id": 6, + "options": { + "retention": "RETENTION_RUNTIME", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2023", + "edition_defaults.edition": "EDITION_PROTO3", + "edition_defaults.value": "ALLOW" + } + }, + "enforceNamingStyle": { + "type": "EnforceNamingStyle", + "id": 7, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_METHOD", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "STYLE2024" + } + }, + "defaultSymbolVisibility": { + "type": "VisibilityFeature.DefaultSymbolVisibility", + "id": 8, + "options": { + "retention": "RETENTION_SOURCE", + "targets": "TARGET_TYPE_FILE", + "feature_support.edition_introduced": "EDITION_2024", + "edition_defaults.edition": "EDITION_2024", + "edition_defaults.value": "EXPORT_TOP_LEVEL" + } + } + }, + "extensions": [ + [ + 1000, + 9994 + ], + [ + 9995, + 9999 + ], + [ + 10000, + 10000 + ] + ], + "reserved": [ + [ + 999, + 999 + ] + ], + "nested": { + "FieldPresence": { + "values": { + "FIELD_PRESENCE_UNKNOWN": 0, + "EXPLICIT": 1, + "IMPLICIT": 2, + "LEGACY_REQUIRED": 3 + } + }, + "EnumType": { + "values": { + "ENUM_TYPE_UNKNOWN": 0, + "OPEN": 1, + "CLOSED": 2 + } + }, + "RepeatedFieldEncoding": { + "values": { + "REPEATED_FIELD_ENCODING_UNKNOWN": 0, + "PACKED": 1, + "EXPANDED": 2 + } + }, + "Utf8Validation": { + "values": { + "UTF8_VALIDATION_UNKNOWN": 0, + "VERIFY": 2, + "NONE": 3 + }, + "reserved": [ + [ + 1, + 1 + ] + ] + }, + "MessageEncoding": { + "values": { + "MESSAGE_ENCODING_UNKNOWN": 0, + "LENGTH_PREFIXED": 1, + "DELIMITED": 2 + } + }, + "JsonFormat": { + "values": { + "JSON_FORMAT_UNKNOWN": 0, + "ALLOW": 1, + "LEGACY_BEST_EFFORT": 2 + } + }, + "EnforceNamingStyle": { + "values": { + "ENFORCE_NAMING_STYLE_UNKNOWN": 0, + "STYLE2024": 1, + "STYLE_LEGACY": 2 + } + }, + "VisibilityFeature": { + "fields": {}, + "reserved": [ + [ + 1, + 536870911 + ] + ], + "nested": { + "DefaultSymbolVisibility": { + "values": { + "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, + "EXPORT_ALL": 1, + "EXPORT_TOP_LEVEL": 2, + "LOCAL_ALL": 3, + "STRICT": 4 + } + } + } + } + } + }, + "FeatureSetDefaults": { + "edition": "proto2", + "fields": { + "defaults": { + "rule": "repeated", + "type": "FeatureSetEditionDefault", + "id": 1 + }, + "minimumEdition": { + "type": "Edition", + "id": 4 + }, + "maximumEdition": { + "type": "Edition", + "id": 5 + } + }, + "nested": { + "FeatureSetEditionDefault": { + "fields": { + "edition": { + "type": "Edition", + "id": 3 + }, + "overridableFeatures": { + "type": "FeatureSet", + "id": 4 + }, + "fixedFeatures": { + "type": "FeatureSet", + "id": 5 + } + }, + "reserved": [ + [ + 1, + 1 + ], + [ + 2, + 2 + ], + "features" + ] + } + } + }, + "SourceCodeInfo": { + "edition": "proto2", + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "extensions": [ + [ + 536000000, + 536000000 + ] + ], + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2, + "options": { + "packed": true + } + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "edition": "proto2", + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1, + "options": { + "packed": true + } + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "SymbolVisibility": { + "edition": "proto2", + "values": { + "VISIBILITY_UNSET": 0, + "VISIBILITY_LOCAL": 1, + "VISIBILITY_EXPORT": 2 + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 + }, + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } + }, + "rpc": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/rpc/errdetails;errdetails", + "java_multiple_files": true, + "java_outer_classname": "ErrorDetailsProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "ErrorInfo": { + "fields": { + "reason": { + "type": "string", + "id": 1 + }, + "domain": { + "type": "string", + "id": 2 + }, + "metadata": { + "keyType": "string", + "type": "string", + "id": 3 + } + } + }, + "RetryInfo": { + "fields": { + "retryDelay": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, + "DebugInfo": { + "fields": { + "stackEntries": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "detail": { + "type": "string", + "id": 2 + } + } + }, + "QuotaFailure": { + "fields": { + "violations": { + "rule": "repeated", + "type": "Violation", + "id": 1 + } + }, + "nested": { + "Violation": { + "oneofs": { + "_futureQuotaValue": { + "oneof": [ + "futureQuotaValue" + ] + } + }, + "fields": { + "subject": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "apiService": { + "type": "string", + "id": 3 + }, + "quotaMetric": { + "type": "string", + "id": 4 + }, + "quotaId": { + "type": "string", + "id": 5 + }, + "quotaDimensions": { + "keyType": "string", + "type": "string", + "id": 6 + }, + "quotaValue": { + "type": "int64", + "id": 7 + }, + "futureQuotaValue": { + "type": "int64", + "id": 8, + "options": { + "proto3_optional": true + } + } + } + } + } + }, + "PreconditionFailure": { + "fields": { + "violations": { + "rule": "repeated", + "type": "Violation", + "id": 1 + } + }, + "nested": { + "Violation": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "subject": { + "type": "string", + "id": 2 + }, + "description": { + "type": "string", + "id": 3 + } + } + } + } + }, + "BadRequest": { + "fields": { + "fieldViolations": { + "rule": "repeated", + "type": "FieldViolation", + "id": 1 + } + }, + "nested": { + "FieldViolation": { + "fields": { + "field": { + "type": "string", + "id": 1 + }, + "description": { + "type": "string", + "id": 2 + }, + "reason": { + "type": "string", + "id": 3 + }, + "localizedMessage": { + "type": "LocalizedMessage", + "id": 4 + } + } + } + } + }, + "RequestInfo": { + "fields": { + "requestId": { + "type": "string", + "id": 1 + }, + "servingData": { + "type": "string", + "id": 2 + } + } + }, + "ResourceInfo": { + "fields": { + "resourceType": { + "type": "string", + "id": 1 + }, + "resourceName": { + "type": "string", + "id": 2 + }, + "owner": { + "type": "string", + "id": 3 + }, + "description": { + "type": "string", + "id": 4 + } + } + }, + "Help": { + "fields": { + "links": { + "rule": "repeated", + "type": "Link", + "id": 1 + } + }, + "nested": { + "Link": { + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "url": { + "type": "string", + "id": 2 + } + } + } + } + }, + "LocalizedMessage": { + "fields": { + "locale": { + "type": "string", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + } + } + } + } + } + } + } + } +} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.create_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.create_migration_workflow.js new file mode 100644 index 000000000000..6e2c0a708991 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.create_migration_workflow.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, migrationWorkflow) { + // [START bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the project to which this migration workflow belongs. + * Example: `projects/foo/locations/bar` + */ + // const parent = 'abc123' + /** + * Required. The migration workflow to create. + */ + // const migrationWorkflow = {} + + // Imports the Migration library + const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2; + + // Instantiates a client + const migrationClient = new MigrationServiceClient(); + + async function callCreateMigrationWorkflow() { + // Construct request + const request = { + parent, + migrationWorkflow, + }; + + // Run request + const response = await migrationClient.createMigrationWorkflow(request); + console.log(response); + } + + callCreateMigrationWorkflow(); + // [END bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.delete_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.delete_migration_workflow.js new file mode 100644 index 000000000000..9536f6113e68 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.delete_migration_workflow.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + */ + // const name = 'abc123' + + // Imports the Migration library + const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2; + + // Instantiates a client + const migrationClient = new MigrationServiceClient(); + + async function callDeleteMigrationWorkflow() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await migrationClient.deleteMigrationWorkflow(request); + console.log(response); + } + + callDeleteMigrationWorkflow(); + // [END bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_subtask.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_subtask.js new file mode 100644 index 000000000000..ad96b09bf085 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_subtask.js @@ -0,0 +1,66 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique identifier for the migration subtask. + * Example: `projects/123/locations/us/workflows/1234/subtasks/543` + */ + // const name = 'abc123' + /** + * Optional. The list of fields to be retrieved. + */ + // const readMask = {} + + // Imports the Migration library + const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2; + + // Instantiates a client + const migrationClient = new MigrationServiceClient(); + + async function callGetMigrationSubtask() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await migrationClient.getMigrationSubtask(request); + console.log(response); + } + + callGetMigrationSubtask(); + // [END bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_workflow.js new file mode 100644 index 000000000000..cf6727593b5d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_workflow.js @@ -0,0 +1,66 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + */ + // const name = 'abc123' + /** + * The list of fields to be retrieved. + */ + // const readMask = {} + + // Imports the Migration library + const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2; + + // Instantiates a client + const migrationClient = new MigrationServiceClient(); + + async function callGetMigrationWorkflow() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await migrationClient.getMigrationWorkflow(request); + console.log(response); + } + + callGetMigrationWorkflow(); + // [END bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_subtasks.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_subtasks.js new file mode 100644 index 000000000000..01c67616786f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_subtasks.js @@ -0,0 +1,86 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The migration task of the subtasks to list. + * Example: `projects/123/locations/us/workflows/1234` + */ + // const parent = 'abc123' + /** + * Optional. The list of fields to be retrieved. + */ + // const readMask = {} + /** + * Optional. The maximum number of migration tasks to return. The service may + * return fewer than this number. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from previous `ListMigrationSubtasks` + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigrationSubtasks` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. The filter to apply. This can be used to get the subtasks of a + * specific tasks in a workflow, e.g. `migration_task = "ab012"` where + * `"ab012"` is the task ID (not the name in the named map). + */ + // const filter = 'abc123' + + // Imports the Migration library + const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2; + + // Instantiates a client + const migrationClient = new MigrationServiceClient(); + + async function callListMigrationSubtasks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = migrationClient.listMigrationSubtasksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMigrationSubtasks(); + // [END bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_workflows.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_workflows.js new file mode 100644 index 000000000000..d79380dbc624 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_workflows.js @@ -0,0 +1,80 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location of the migration workflows to list. + * Example: `projects/123/locations/us` + */ + // const parent = 'abc123' + /** + * The list of fields to be retrieved. + */ + // const readMask = {} + /** + * The maximum number of migration workflows to return. The service may return + * fewer than this number. + */ + // const pageSize = 1234 + /** + * A page token, received from previous `ListMigrationWorkflows` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigrationWorkflows` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Migration library + const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2; + + // Instantiates a client + const migrationClient = new MigrationServiceClient(); + + async function callListMigrationWorkflows() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = migrationClient.listMigrationWorkflowsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMigrationWorkflows(); + // [END bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.start_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.start_migration_workflow.js new file mode 100644 index 000000000000..5e69b1b037c7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.start_migration_workflow.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + */ + // const name = 'abc123' + + // Imports the Migration library + const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2; + + // Instantiates a client + const migrationClient = new MigrationServiceClient(); + + async function callStartMigrationWorkflow() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await migrationClient.startMigrationWorkflow(request); + console.log(response); + } + + callStartMigrationWorkflow(); + // [END bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json new file mode 100644 index 000000000000..81ec8bbe7f6c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json @@ -0,0 +1,335 @@ +{ + "clientLibrary": { + "name": "nodejs-migration", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.bigquery.migration.v2", + "version": "v2" + } + ] + }, + "snippets": [ + { + "regionTag": "bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_async", + "title": "MigrationService createMigrationWorkflow Sample", + "origin": "API_DEFINITION", + "description": " Creates a migration workflow.", + "canonical": true, + "file": "migration_service.create_migration_workflow.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService.CreateMigrationWorkflow", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "migration_workflow", + "type": ".google.cloud.bigquery.migration.v2.MigrationWorkflow" + } + ], + "resultType": ".google.cloud.bigquery.migration.v2.MigrationWorkflow", + "client": { + "shortName": "MigrationServiceClient", + "fullName": "google.cloud.bigquery.migration.v2.MigrationServiceClient" + }, + "method": { + "shortName": "CreateMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService.CreateMigrationWorkflow", + "service": { + "shortName": "MigrationService", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + } + }, + { + "regionTag": "bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_async", + "title": "MigrationService getMigrationWorkflow Sample", + "origin": "API_DEFINITION", + "description": " Gets a previously created migration workflow.", + "canonical": true, + "file": "migration_service.get_migration_workflow.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationWorkflow", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "read_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.bigquery.migration.v2.MigrationWorkflow", + "client": { + "shortName": "MigrationServiceClient", + "fullName": "google.cloud.bigquery.migration.v2.MigrationServiceClient" + }, + "method": { + "shortName": "GetMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationWorkflow", + "service": { + "shortName": "MigrationService", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + } + }, + { + "regionTag": "bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_async", + "title": "MigrationService listMigrationWorkflows Sample", + "origin": "API_DEFINITION", + "description": " Lists previously created migration workflow.", + "canonical": true, + "file": "migration_service.list_migration_workflows.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMigrationWorkflows", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationWorkflows", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "read_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse", + "client": { + "shortName": "MigrationServiceClient", + "fullName": "google.cloud.bigquery.migration.v2.MigrationServiceClient" + }, + "method": { + "shortName": "ListMigrationWorkflows", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationWorkflows", + "service": { + "shortName": "MigrationService", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + } + }, + { + "regionTag": "bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_async", + "title": "MigrationService deleteMigrationWorkflow Sample", + "origin": "API_DEFINITION", + "description": " Deletes a migration workflow by name.", + "canonical": true, + "file": "migration_service.delete_migration_workflow.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService.DeleteMigrationWorkflow", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "MigrationServiceClient", + "fullName": "google.cloud.bigquery.migration.v2.MigrationServiceClient" + }, + "method": { + "shortName": "DeleteMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService.DeleteMigrationWorkflow", + "service": { + "shortName": "MigrationService", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + } + }, + { + "regionTag": "bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_async", + "title": "MigrationService startMigrationWorkflow Sample", + "origin": "API_DEFINITION", + "description": " Starts a previously created migration workflow. I.e., the state transitions from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. An error will be signaled if the state is anything other than DRAFT or RUNNING.", + "canonical": true, + "file": "migration_service.start_migration_workflow.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "StartMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService.StartMigrationWorkflow", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "MigrationServiceClient", + "fullName": "google.cloud.bigquery.migration.v2.MigrationServiceClient" + }, + "method": { + "shortName": "StartMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService.StartMigrationWorkflow", + "service": { + "shortName": "MigrationService", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + } + }, + { + "regionTag": "bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_async", + "title": "MigrationService getMigrationSubtask Sample", + "origin": "API_DEFINITION", + "description": " Gets a previously created migration subtask.", + "canonical": true, + "file": "migration_service.get_migration_subtask.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMigrationSubtask", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationSubtask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "read_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.bigquery.migration.v2.MigrationSubtask", + "client": { + "shortName": "MigrationServiceClient", + "fullName": "google.cloud.bigquery.migration.v2.MigrationServiceClient" + }, + "method": { + "shortName": "GetMigrationSubtask", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationSubtask", + "service": { + "shortName": "MigrationService", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + } + }, + { + "regionTag": "bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_async", + "title": "MigrationService listMigrationSubtasks Sample", + "origin": "API_DEFINITION", + "description": " Lists previously created migration subtasks.", + "canonical": true, + "file": "migration_service.list_migration_subtasks.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMigrationSubtasks", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationSubtasks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "read_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse", + "client": { + "shortName": "MigrationServiceClient", + "fullName": "google.cloud.bigquery.migration.v2.MigrationServiceClient" + }, + "method": { + "shortName": "ListMigrationSubtasks", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationSubtasks", + "service": { + "shortName": "MigrationService", + "fullName": "google.cloud.bigquery.migration.v2.MigrationService" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.create_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.create_migration_workflow.js new file mode 100644 index 000000000000..8793094a899d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.create_migration_workflow.js @@ -0,0 +1,67 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, migrationWorkflow) { + // [START bigquerymigration_v2alpha_generated_MigrationService_CreateMigrationWorkflow_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the project to which this migration workflow belongs. + * Example: `projects/foo/locations/bar` + */ + // const parent = 'abc123' + /** + * Required. The migration workflow to create. + */ + // const migrationWorkflow = {} + + // Imports the Migration library + const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; + + // Instantiates a client + const migrationClient = new MigrationServiceClient(); + + async function callCreateMigrationWorkflow() { + // Construct request + const request = { + parent, + migrationWorkflow, + }; + + // Run request + const response = await migrationClient.createMigrationWorkflow(request); + console.log(response); + } + + callCreateMigrationWorkflow(); + // [END bigquerymigration_v2alpha_generated_MigrationService_CreateMigrationWorkflow_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.delete_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.delete_migration_workflow.js new file mode 100644 index 000000000000..b0f0da839430 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.delete_migration_workflow.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigquerymigration_v2alpha_generated_MigrationService_DeleteMigrationWorkflow_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + */ + // const name = 'abc123' + + // Imports the Migration library + const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; + + // Instantiates a client + const migrationClient = new MigrationServiceClient(); + + async function callDeleteMigrationWorkflow() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await migrationClient.deleteMigrationWorkflow(request); + console.log(response); + } + + callDeleteMigrationWorkflow(); + // [END bigquerymigration_v2alpha_generated_MigrationService_DeleteMigrationWorkflow_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_subtask.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_subtask.js new file mode 100644 index 000000000000..a8f00b154050 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_subtask.js @@ -0,0 +1,66 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigquerymigration_v2alpha_generated_MigrationService_GetMigrationSubtask_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique identifier for the migration subtask. + * Example: `projects/123/locations/us/workflows/1234/subtasks/543` + */ + // const name = 'abc123' + /** + * Optional. The list of fields to be retrieved. + */ + // const readMask = {} + + // Imports the Migration library + const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; + + // Instantiates a client + const migrationClient = new MigrationServiceClient(); + + async function callGetMigrationSubtask() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await migrationClient.getMigrationSubtask(request); + console.log(response); + } + + callGetMigrationSubtask(); + // [END bigquerymigration_v2alpha_generated_MigrationService_GetMigrationSubtask_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_workflow.js new file mode 100644 index 000000000000..05ca5c6a0451 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_workflow.js @@ -0,0 +1,66 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigquerymigration_v2alpha_generated_MigrationService_GetMigrationWorkflow_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + */ + // const name = 'abc123' + /** + * The list of fields to be retrieved. + */ + // const readMask = {} + + // Imports the Migration library + const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; + + // Instantiates a client + const migrationClient = new MigrationServiceClient(); + + async function callGetMigrationWorkflow() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await migrationClient.getMigrationWorkflow(request); + console.log(response); + } + + callGetMigrationWorkflow(); + // [END bigquerymigration_v2alpha_generated_MigrationService_GetMigrationWorkflow_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_subtasks.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_subtasks.js new file mode 100644 index 000000000000..75def68424d6 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_subtasks.js @@ -0,0 +1,86 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigquerymigration_v2alpha_generated_MigrationService_ListMigrationSubtasks_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The migration task of the subtasks to list. + * Example: `projects/123/locations/us/workflows/1234` + */ + // const parent = 'abc123' + /** + * Optional. The list of fields to be retrieved. + */ + // const readMask = {} + /** + * Optional. The maximum number of migration tasks to return. The service may return + * fewer than this number. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from previous `ListMigrationSubtasks` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigrationSubtasks` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + /** + * Optional. The filter to apply. This can be used to get the subtasks of a specific + * tasks in a workflow, e.g. `migration_task = "ab012"` where `"ab012"` is the + * task ID (not the name in the named map). + */ + // const filter = 'abc123' + + // Imports the Migration library + const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; + + // Instantiates a client + const migrationClient = new MigrationServiceClient(); + + async function callListMigrationSubtasks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = migrationClient.listMigrationSubtasksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMigrationSubtasks(); + // [END bigquerymigration_v2alpha_generated_MigrationService_ListMigrationSubtasks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_workflows.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_workflows.js new file mode 100644 index 000000000000..43af8b853c09 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_workflows.js @@ -0,0 +1,80 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent) { + // [START bigquerymigration_v2alpha_generated_MigrationService_ListMigrationWorkflows_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The project and location of the migration workflows to list. + * Example: `projects/123/locations/us` + */ + // const parent = 'abc123' + /** + * The list of fields to be retrieved. + */ + // const readMask = {} + /** + * The maximum number of migration workflows to return. The service may return + * fewer than this number. + */ + // const pageSize = 1234 + /** + * A page token, received from previous `ListMigrationWorkflows` call. + * Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to `ListMigrationWorkflows` + * must match the call that provided the page token. + */ + // const pageToken = 'abc123' + + // Imports the Migration library + const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; + + // Instantiates a client + const migrationClient = new MigrationServiceClient(); + + async function callListMigrationWorkflows() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = migrationClient.listMigrationWorkflowsAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListMigrationWorkflows(); + // [END bigquerymigration_v2alpha_generated_MigrationService_ListMigrationWorkflows_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.start_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.start_migration_workflow.js new file mode 100644 index 000000000000..7fd3c8a6ad48 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.start_migration_workflow.js @@ -0,0 +1,62 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(name) { + // [START bigquerymigration_v2alpha_generated_MigrationService_StartMigrationWorkflow_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + */ + // const name = 'abc123' + + // Imports the Migration library + const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; + + // Instantiates a client + const migrationClient = new MigrationServiceClient(); + + async function callStartMigrationWorkflow() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await migrationClient.startMigrationWorkflow(request); + console.log(response); + } + + callStartMigrationWorkflow(); + // [END bigquerymigration_v2alpha_generated_MigrationService_StartMigrationWorkflow_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json new file mode 100644 index 000000000000..f47decbc5783 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json @@ -0,0 +1,383 @@ +{ + "clientLibrary": { + "name": "nodejs-migration", + "version": "0.1.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.cloud.bigquery.migration.v2alpha", + "version": "v2alpha" + } + ] + }, + "snippets": [ + { + "regionTag": "bigquerymigration_v2alpha_generated_MigrationService_CreateMigrationWorkflow_async", + "title": "MigrationService createMigrationWorkflow Sample", + "origin": "API_DEFINITION", + "description": " Creates a migration workflow.", + "canonical": true, + "file": "migration_service.create_migration_workflow.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.CreateMigrationWorkflow", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "migration_workflow", + "type": ".google.cloud.bigquery.migration.v2alpha.MigrationWorkflow" + } + ], + "resultType": ".google.cloud.bigquery.migration.v2alpha.MigrationWorkflow", + "client": { + "shortName": "MigrationServiceClient", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationServiceClient" + }, + "method": { + "shortName": "CreateMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.CreateMigrationWorkflow", + "service": { + "shortName": "MigrationService", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService" + } + } + } + }, + { + "regionTag": "bigquerymigration_v2alpha_generated_MigrationService_GetMigrationWorkflow_async", + "title": "MigrationService getMigrationWorkflow Sample", + "origin": "API_DEFINITION", + "description": " Gets a previously created migration workflow.", + "canonical": true, + "file": "migration_service.get_migration_workflow.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationWorkflow", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "read_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.bigquery.migration.v2alpha.MigrationWorkflow", + "client": { + "shortName": "MigrationServiceClient", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationServiceClient" + }, + "method": { + "shortName": "GetMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationWorkflow", + "service": { + "shortName": "MigrationService", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService" + } + } + } + }, + { + "regionTag": "bigquerymigration_v2alpha_generated_MigrationService_ListMigrationWorkflows_async", + "title": "MigrationService listMigrationWorkflows Sample", + "origin": "API_DEFINITION", + "description": " Lists previously created migration workflow.", + "canonical": true, + "file": "migration_service.list_migration_workflows.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 72, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMigrationWorkflows", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationWorkflows", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "read_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse", + "client": { + "shortName": "MigrationServiceClient", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationServiceClient" + }, + "method": { + "shortName": "ListMigrationWorkflows", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationWorkflows", + "service": { + "shortName": "MigrationService", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService" + } + } + } + }, + { + "regionTag": "bigquerymigration_v2alpha_generated_MigrationService_DeleteMigrationWorkflow_async", + "title": "MigrationService deleteMigrationWorkflow Sample", + "origin": "API_DEFINITION", + "description": " Deletes a migration workflow by name.", + "canonical": true, + "file": "migration_service.delete_migration_workflow.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.DeleteMigrationWorkflow", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "MigrationServiceClient", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationServiceClient" + }, + "method": { + "shortName": "DeleteMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.DeleteMigrationWorkflow", + "service": { + "shortName": "MigrationService", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService" + } + } + } + }, + { + "regionTag": "bigquerymigration_v2alpha_generated_MigrationService_StartMigrationWorkflow_async", + "title": "MigrationService startMigrationWorkflow Sample", + "origin": "API_DEFINITION", + "description": " Starts a previously created migration workflow. I.e., the state transitions from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. An error will be signaled if the state is anything other than DRAFT or RUNNING.", + "canonical": true, + "file": "migration_service.start_migration_workflow.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "StartMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.StartMigrationWorkflow", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "MigrationServiceClient", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationServiceClient" + }, + "method": { + "shortName": "StartMigrationWorkflow", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.StartMigrationWorkflow", + "service": { + "shortName": "MigrationService", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService" + } + } + } + }, + { + "regionTag": "bigquerymigration_v2alpha_generated_MigrationService_GetMigrationSubtask_async", + "title": "MigrationService getMigrationSubtask Sample", + "origin": "API_DEFINITION", + "description": " Gets a previously created migration subtask.", + "canonical": true, + "file": "migration_service.get_migration_subtask.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetMigrationSubtask", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationSubtask", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "read_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.bigquery.migration.v2alpha.MigrationSubtask", + "client": { + "shortName": "MigrationServiceClient", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationServiceClient" + }, + "method": { + "shortName": "GetMigrationSubtask", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationSubtask", + "service": { + "shortName": "MigrationService", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService" + } + } + } + }, + { + "regionTag": "bigquerymigration_v2alpha_generated_MigrationService_ListMigrationSubtasks_async", + "title": "MigrationService listMigrationSubtasks Sample", + "origin": "API_DEFINITION", + "description": " Lists previously created migration subtasks.", + "canonical": true, + "file": "migration_service.list_migration_subtasks.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 78, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListMigrationSubtasks", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationSubtasks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "read_mask", + "type": ".google.protobuf.FieldMask" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + }, + { + "name": "filter", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse", + "client": { + "shortName": "MigrationServiceClient", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationServiceClient" + }, + "method": { + "shortName": "ListMigrationSubtasks", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationSubtasks", + "service": { + "shortName": "MigrationService", + "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService" + } + } + } + }, + { + "regionTag": "bigquerymigration_v2alpha_generated_SqlTranslationService_TranslateQuery_async", + "title": "MigrationService translateQuery Sample", + "origin": "API_DEFINITION", + "description": " Translates input queries from source dialects to GoogleSQL.", + "canonical": true, + "file": "sql_translation_service.translate_query.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "TranslateQuery", + "fullName": "google.cloud.bigquery.migration.v2alpha.SqlTranslationService.TranslateQuery", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "source_dialect", + "type": ".google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect" + }, + { + "name": "query", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse", + "client": { + "shortName": "SqlTranslationServiceClient", + "fullName": "google.cloud.bigquery.migration.v2alpha.SqlTranslationServiceClient" + }, + "method": { + "shortName": "TranslateQuery", + "fullName": "google.cloud.bigquery.migration.v2alpha.SqlTranslationService.TranslateQuery", + "service": { + "shortName": "SqlTranslationService", + "fullName": "google.cloud.bigquery.migration.v2alpha.SqlTranslationService" + } + } + } + } + ] +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/sql_translation_service.translate_query.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/sql_translation_service.translate_query.js new file mode 100644 index 000000000000..3d1587673691 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/sql_translation_service.translate_query.js @@ -0,0 +1,72 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(parent, sourceDialect, query) { + // [START bigquerymigration_v2alpha_generated_SqlTranslationService_TranslateQuery_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. The name of the project to which this translation request belongs. + * Example: `projects/foo/locations/bar` + */ + // const parent = 'abc123' + /** + * Required. The source SQL dialect of `queries`. + */ + // const sourceDialect = {} + /** + * Required. The query to be translated. + */ + // const query = 'abc123' + + // Imports the Migration library + const {SqlTranslationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; + + // Instantiates a client + const migrationClient = new SqlTranslationServiceClient(); + + async function callTranslateQuery() { + // Construct request + const request = { + parent, + sourceDialect, + query, + }; + + // Run request + const response = await migrationClient.translateQuery(request); + console.log(response); + } + + callTranslateQuery(); + // [END bigquerymigration_v2alpha_generated_SqlTranslationService_TranslateQuery_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/index.ts b/owl-bot-staging/google-cloud-bigquery-migration/src/index.ts new file mode 100644 index 000000000000..f311b914e88a --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/src/index.ts @@ -0,0 +1,28 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by synthtool. ** +// ** https://github.com/googleapis/synthtool ** +// ** All changes to this file may be overwritten. ** + +import * as v2 from './v2'; +import * as v2alpha from './v2alpha'; + +const MigrationServiceClient = v2.MigrationServiceClient; +type MigrationServiceClient = v2.MigrationServiceClient; + +export {v2, v2alpha, MigrationServiceClient}; +export default {v2, v2alpha, MigrationServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2/gapic_metadata.json new file mode 100644 index 000000000000..1b6a33c671dc --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/src/v2/gapic_metadata.json @@ -0,0 +1,101 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.bigquery.migration.v2", + "libraryPackage": "@google-cloud/bigquery-migration", + "services": { + "MigrationService": { + "clients": { + "grpc": { + "libraryClient": "MigrationServiceClient", + "rpcs": { + "CreateMigrationWorkflow": { + "methods": [ + "createMigrationWorkflow" + ] + }, + "GetMigrationWorkflow": { + "methods": [ + "getMigrationWorkflow" + ] + }, + "DeleteMigrationWorkflow": { + "methods": [ + "deleteMigrationWorkflow" + ] + }, + "StartMigrationWorkflow": { + "methods": [ + "startMigrationWorkflow" + ] + }, + "GetMigrationSubtask": { + "methods": [ + "getMigrationSubtask" + ] + }, + "ListMigrationWorkflows": { + "methods": [ + "listMigrationWorkflows", + "listMigrationWorkflowsStream", + "listMigrationWorkflowsAsync" + ] + }, + "ListMigrationSubtasks": { + "methods": [ + "listMigrationSubtasks", + "listMigrationSubtasksStream", + "listMigrationSubtasksAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MigrationServiceClient", + "rpcs": { + "CreateMigrationWorkflow": { + "methods": [ + "createMigrationWorkflow" + ] + }, + "GetMigrationWorkflow": { + "methods": [ + "getMigrationWorkflow" + ] + }, + "DeleteMigrationWorkflow": { + "methods": [ + "deleteMigrationWorkflow" + ] + }, + "StartMigrationWorkflow": { + "methods": [ + "startMigrationWorkflow" + ] + }, + "GetMigrationSubtask": { + "methods": [ + "getMigrationSubtask" + ] + }, + "ListMigrationWorkflows": { + "methods": [ + "listMigrationWorkflows", + "listMigrationWorkflowsStream", + "listMigrationWorkflowsAsync" + ] + }, + "ListMigrationSubtasks": { + "methods": [ + "listMigrationSubtasks", + "listMigrationSubtasksStream", + "listMigrationSubtasksAsync" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2/index.ts b/owl-bot-staging/google-cloud-bigquery-migration/src/v2/index.ts new file mode 100644 index 000000000000..1684847bea1c --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/src/v2/index.ts @@ -0,0 +1,19 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export { MigrationServiceClient } from './migration_service_client'; diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client.ts b/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client.ts new file mode 100644 index 000000000000..7c36c8a70cc1 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client.ts @@ -0,0 +1,1817 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import { Transform } from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import { loggingUtils as logging, decodeAnyProtosInArray } from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v2/migration_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './migration_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service to handle EDW migrations. + * @class + * @memberof v2 + */ +export class MigrationServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: { [method: string]: gax.CallSettings }; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('bigquery-migration'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: { [name: string]: Function }; + pathTemplates: { [name: string]: gax.PathTemplate }; + migrationServiceStub?: Promise<{ [name: string]: Function }>; + + /** + * Construct an instance of MigrationServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new MigrationServiceClient({fallback: true}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback, + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof MigrationServiceClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.', + ); + } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; + this._universeDomain = + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; + this._servicePath = 'bigquerymigration.' + this._universeDomain; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}', + ), + migrationSubtaskPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}', + ), + migrationWorkflowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/workflows/{workflow}', + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listMigrationWorkflows: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'migrationWorkflows', + ), + listMigrationSubtasks: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'migrationSubtasks', + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.bigquery.migration.v2.MigrationService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + { 'x-goog-api-client': clientHeader.join(' ') }, + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.migrationServiceStub) { + return this.migrationServiceStub; + } + + // Put together the "service stub" for + // google.cloud.bigquery.migration.v2.MigrationService. + this.migrationServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.bigquery.migration.v2.MigrationService', + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.bigquery.migration.v2 + .MigrationService, + this._opts, + this._providedCustomServicePath, + ) as Promise<{ [method: string]: Function }>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const migrationServiceStubMethods = [ + 'createMigrationWorkflow', + 'getMigrationWorkflow', + 'listMigrationWorkflows', + 'deleteMigrationWorkflow', + 'startMigrationWorkflow', + 'getMigrationSubtask', + 'listMigrationSubtasks', + ]; + for (const methodName of migrationServiceStubMethods) { + const callPromise = this.migrationServiceStub.then( + (stub) => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + }, + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback, + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.migrationServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'bigquerymigration.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'bigquerymigration.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback, + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Creates a migration workflow. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the project to which this migration workflow belongs. + * Example: `projects/foo/locations/bar` + * @param {google.cloud.bigquery.migration.v2.MigrationWorkflow} request.migrationWorkflow + * Required. The migration workflow to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.bigquery.migration.v2.MigrationWorkflow|MigrationWorkflow}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/migration_service.create_migration_workflow.js + * region_tag:bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_async + */ + createMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + ( + | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + >; + createMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + createMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, + callback: Callback< + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + createMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + ( + | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('createMigrationWorkflow request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createMigrationWorkflow response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .createMigrationWorkflow(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + ( + | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('createMigrationWorkflow response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets a previously created migration workflow. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * @param {google.protobuf.FieldMask} request.readMask + * The list of fields to be retrieved. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.bigquery.migration.v2.MigrationWorkflow|MigrationWorkflow}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/migration_service.get_migration_workflow.js + * region_tag:bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_async + */ + getMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + ( + | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + >; + getMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, + callback: Callback< + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + ( + | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getMigrationWorkflow request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMigrationWorkflow response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getMigrationWorkflow(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, + ( + | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getMigrationWorkflow response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Deletes a migration workflow by name. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/migration_service.delete_migration_workflow.js + * region_tag:bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_async + */ + deleteMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + >; + deleteMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteMigrationWorkflow request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteMigrationWorkflow response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteMigrationWorkflow(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('deleteMigrationWorkflow response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Starts a previously created migration workflow. I.e., the state transitions + * from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. + * An error will be signaled if the state is anything other than DRAFT or + * RUNNING. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/migration_service.start_migration_workflow.js + * region_tag:bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_async + */ + startMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + >; + startMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + startMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + startMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('startMigrationWorkflow request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('startMigrationWorkflow response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .startMigrationWorkflow(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('startMigrationWorkflow response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets a previously created migration subtask. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique identifier for the migration subtask. + * Example: `projects/123/locations/us/workflows/1234/subtasks/543` + * @param {google.protobuf.FieldMask} [request.readMask] + * Optional. The list of fields to be retrieved. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.bigquery.migration.v2.MigrationSubtask|MigrationSubtask}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2/migration_service.get_migration_subtask.js + * region_tag:bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_async + */ + getMigrationSubtask( + request?: protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, + ( + | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest + | undefined + ), + {} | undefined, + ] + >; + getMigrationSubtask( + request: protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, + | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getMigrationSubtask( + request: protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, + callback: Callback< + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, + | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getMigrationSubtask( + request?: protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, + | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, + | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, + ( + | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getMigrationSubtask request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, + | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMigrationSubtask response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getMigrationSubtask(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, + ( + | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getMigrationSubtask response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + + /** + * Lists previously created migration workflow. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location of the migration workflows to list. + * Example: `projects/123/locations/us` + * @param {google.protobuf.FieldMask} request.readMask + * The list of fields to be retrieved. + * @param {number} request.pageSize + * The maximum number of migration workflows to return. The service may return + * fewer than this number. + * @param {string} request.pageToken + * A page token, received from previous `ListMigrationWorkflows` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMigrationWorkflows` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.bigquery.migration.v2.MigrationWorkflow|MigrationWorkflow}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listMigrationWorkflowsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMigrationWorkflows( + request?: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow[], + protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest | null, + protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse, + ] + >; + listMigrationWorkflows( + request: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, + | protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow + >, + ): void; + listMigrationWorkflows( + request: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, + callback: PaginationCallback< + protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, + | protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow + >, + ): void; + listMigrationWorkflows( + request?: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, + | protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow + >, + callback?: PaginationCallback< + protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, + | protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow + >, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow[], + protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest | null, + protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, + | protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listMigrationWorkflows values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listMigrationWorkflows request %j', request); + return this.innerApiCalls + .listMigrationWorkflows(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow[], + protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest | null, + protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse, + ]) => { + this._log.info('listMigrationWorkflows values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listMigrationWorkflows`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location of the migration workflows to list. + * Example: `projects/123/locations/us` + * @param {google.protobuf.FieldMask} request.readMask + * The list of fields to be retrieved. + * @param {number} request.pageSize + * The maximum number of migration workflows to return. The service may return + * fewer than this number. + * @param {string} request.pageToken + * A page token, received from previous `ListMigrationWorkflows` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMigrationWorkflows` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.bigquery.migration.v2.MigrationWorkflow|MigrationWorkflow} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listMigrationWorkflowsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMigrationWorkflowsStream( + request?: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMigrationWorkflows']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listMigrationWorkflows stream %j', request); + return this.descriptors.page.listMigrationWorkflows.createStream( + this.innerApiCalls.listMigrationWorkflows as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listMigrationWorkflows`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location of the migration workflows to list. + * Example: `projects/123/locations/us` + * @param {google.protobuf.FieldMask} request.readMask + * The list of fields to be retrieved. + * @param {number} request.pageSize + * The maximum number of migration workflows to return. The service may return + * fewer than this number. + * @param {string} request.pageToken + * A page token, received from previous `ListMigrationWorkflows` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMigrationWorkflows` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.bigquery.migration.v2.MigrationWorkflow|MigrationWorkflow}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2/migration_service.list_migration_workflows.js + * region_tag:bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_async + */ + listMigrationWorkflowsAsync( + request?: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMigrationWorkflows']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listMigrationWorkflows iterate %j', request); + return this.descriptors.page.listMigrationWorkflows.asyncIterate( + this.innerApiCalls['listMigrationWorkflows'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists previously created migration subtasks. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The migration task of the subtasks to list. + * Example: `projects/123/locations/us/workflows/1234` + * @param {google.protobuf.FieldMask} [request.readMask] + * Optional. The list of fields to be retrieved. + * @param {number} [request.pageSize] + * Optional. The maximum number of migration tasks to return. The service may + * return fewer than this number. + * @param {string} [request.pageToken] + * Optional. A page token, received from previous `ListMigrationSubtasks` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMigrationSubtasks` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. The filter to apply. This can be used to get the subtasks of a + * specific tasks in a workflow, e.g. `migration_task = "ab012"` where + * `"ab012"` is the task ID (not the name in the named map). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.bigquery.migration.v2.MigrationSubtask|MigrationSubtask}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listMigrationSubtasksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMigrationSubtasks( + request?: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask[], + protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest | null, + protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse, + ] + >; + listMigrationSubtasks( + request: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, + | protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask + >, + ): void; + listMigrationSubtasks( + request: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, + callback: PaginationCallback< + protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, + | protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask + >, + ): void; + listMigrationSubtasks( + request?: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, + | protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask + >, + callback?: PaginationCallback< + protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, + | protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask + >, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask[], + protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest | null, + protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, + | protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listMigrationSubtasks values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listMigrationSubtasks request %j', request); + return this.innerApiCalls + .listMigrationSubtasks(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.bigquery.migration.v2.IMigrationSubtask[], + protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest | null, + protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse, + ]) => { + this._log.info('listMigrationSubtasks values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listMigrationSubtasks`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The migration task of the subtasks to list. + * Example: `projects/123/locations/us/workflows/1234` + * @param {google.protobuf.FieldMask} [request.readMask] + * Optional. The list of fields to be retrieved. + * @param {number} [request.pageSize] + * Optional. The maximum number of migration tasks to return. The service may + * return fewer than this number. + * @param {string} [request.pageToken] + * Optional. A page token, received from previous `ListMigrationSubtasks` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMigrationSubtasks` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. The filter to apply. This can be used to get the subtasks of a + * specific tasks in a workflow, e.g. `migration_task = "ab012"` where + * `"ab012"` is the task ID (not the name in the named map). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.bigquery.migration.v2.MigrationSubtask|MigrationSubtask} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listMigrationSubtasksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMigrationSubtasksStream( + request?: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMigrationSubtasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listMigrationSubtasks stream %j', request); + return this.descriptors.page.listMigrationSubtasks.createStream( + this.innerApiCalls.listMigrationSubtasks as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listMigrationSubtasks`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The migration task of the subtasks to list. + * Example: `projects/123/locations/us/workflows/1234` + * @param {google.protobuf.FieldMask} [request.readMask] + * Optional. The list of fields to be retrieved. + * @param {number} [request.pageSize] + * Optional. The maximum number of migration tasks to return. The service may + * return fewer than this number. + * @param {string} [request.pageToken] + * Optional. A page token, received from previous `ListMigrationSubtasks` + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMigrationSubtasks` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. The filter to apply. This can be used to get the subtasks of a + * specific tasks in a workflow, e.g. `migration_task = "ab012"` where + * `"ab012"` is the task ID (not the name in the named map). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.bigquery.migration.v2.MigrationSubtask|MigrationSubtask}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2/migration_service.list_migration_subtasks.js + * region_tag:bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_async + */ + listMigrationSubtasksAsync( + request?: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMigrationSubtasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listMigrationSubtasks iterate %j', request); + return this.descriptors.page.listMigrationSubtasks.asyncIterate( + this.innerApiCalls['listMigrationSubtasks'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified migrationSubtask resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} workflow + * @param {string} subtask + * @returns {string} Resource name string. + */ + migrationSubtaskPath( + project: string, + location: string, + workflow: string, + subtask: string, + ) { + return this.pathTemplates.migrationSubtaskPathTemplate.render({ + project: project, + location: location, + workflow: workflow, + subtask: subtask, + }); + } + + /** + * Parse the project from MigrationSubtask resource. + * + * @param {string} migrationSubtaskName + * A fully-qualified path representing MigrationSubtask resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMigrationSubtaskName(migrationSubtaskName: string) { + return this.pathTemplates.migrationSubtaskPathTemplate.match( + migrationSubtaskName, + ).project; + } + + /** + * Parse the location from MigrationSubtask resource. + * + * @param {string} migrationSubtaskName + * A fully-qualified path representing MigrationSubtask resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMigrationSubtaskName(migrationSubtaskName: string) { + return this.pathTemplates.migrationSubtaskPathTemplate.match( + migrationSubtaskName, + ).location; + } + + /** + * Parse the workflow from MigrationSubtask resource. + * + * @param {string} migrationSubtaskName + * A fully-qualified path representing MigrationSubtask resource. + * @returns {string} A string representing the workflow. + */ + matchWorkflowFromMigrationSubtaskName(migrationSubtaskName: string) { + return this.pathTemplates.migrationSubtaskPathTemplate.match( + migrationSubtaskName, + ).workflow; + } + + /** + * Parse the subtask from MigrationSubtask resource. + * + * @param {string} migrationSubtaskName + * A fully-qualified path representing MigrationSubtask resource. + * @returns {string} A string representing the subtask. + */ + matchSubtaskFromMigrationSubtaskName(migrationSubtaskName: string) { + return this.pathTemplates.migrationSubtaskPathTemplate.match( + migrationSubtaskName, + ).subtask; + } + + /** + * Return a fully-qualified migrationWorkflow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} workflow + * @returns {string} Resource name string. + */ + migrationWorkflowPath(project: string, location: string, workflow: string) { + return this.pathTemplates.migrationWorkflowPathTemplate.render({ + project: project, + location: location, + workflow: workflow, + }); + } + + /** + * Parse the project from MigrationWorkflow resource. + * + * @param {string} migrationWorkflowName + * A fully-qualified path representing MigrationWorkflow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMigrationWorkflowName(migrationWorkflowName: string) { + return this.pathTemplates.migrationWorkflowPathTemplate.match( + migrationWorkflowName, + ).project; + } + + /** + * Parse the location from MigrationWorkflow resource. + * + * @param {string} migrationWorkflowName + * A fully-qualified path representing MigrationWorkflow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMigrationWorkflowName(migrationWorkflowName: string) { + return this.pathTemplates.migrationWorkflowPathTemplate.match( + migrationWorkflowName, + ).location; + } + + /** + * Parse the workflow from MigrationWorkflow resource. + * + * @param {string} migrationWorkflowName + * A fully-qualified path representing MigrationWorkflow resource. + * @returns {string} A string representing the workflow. + */ + matchWorkflowFromMigrationWorkflowName(migrationWorkflowName: string) { + return this.pathTemplates.migrationWorkflowPathTemplate.match( + migrationWorkflowName, + ).workflow; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.migrationServiceStub && !this._terminated) { + return this.migrationServiceStub.then((stub) => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client_config.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client_config.json new file mode 100644 index 000000000000..5832815a0a9b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client_config.json @@ -0,0 +1,71 @@ +{ + "interfaces": { + "google.cloud.bigquery.migration.v2.MigrationService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateMigrationWorkflow": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetMigrationWorkflow": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListMigrationWorkflows": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteMigrationWorkflow": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "StartMigrationWorkflow": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetMigrationSubtask": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "ListMigrationSubtasks": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json new file mode 100644 index 000000000000..7dc6828feb59 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json @@ -0,0 +1,11 @@ +[ + "../../protos/google/cloud/bigquery/migration/v2/assessment_task.proto", + "../../protos/google/cloud/bigquery/migration/v2/migration_entities.proto", + "../../protos/google/cloud/bigquery/migration/v2/migration_error_details.proto", + "../../protos/google/cloud/bigquery/migration/v2/migration_metrics.proto", + "../../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_details.proto", + "../../protos/google/cloud/bigquery/migration/v2/translation_suggestion.proto", + "../../protos/google/cloud/bigquery/migration/v2/translation_usability.proto" +] diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/gapic_metadata.json new file mode 100644 index 000000000000..9621cae014fa --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/gapic_metadata.json @@ -0,0 +1,125 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.cloud.bigquery.migration.v2alpha", + "libraryPackage": "@google-cloud/bigquery-migration", + "services": { + "MigrationService": { + "clients": { + "grpc": { + "libraryClient": "MigrationServiceClient", + "rpcs": { + "CreateMigrationWorkflow": { + "methods": [ + "createMigrationWorkflow" + ] + }, + "GetMigrationWorkflow": { + "methods": [ + "getMigrationWorkflow" + ] + }, + "DeleteMigrationWorkflow": { + "methods": [ + "deleteMigrationWorkflow" + ] + }, + "StartMigrationWorkflow": { + "methods": [ + "startMigrationWorkflow" + ] + }, + "GetMigrationSubtask": { + "methods": [ + "getMigrationSubtask" + ] + }, + "ListMigrationWorkflows": { + "methods": [ + "listMigrationWorkflows", + "listMigrationWorkflowsStream", + "listMigrationWorkflowsAsync" + ] + }, + "ListMigrationSubtasks": { + "methods": [ + "listMigrationSubtasks", + "listMigrationSubtasksStream", + "listMigrationSubtasksAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MigrationServiceClient", + "rpcs": { + "CreateMigrationWorkflow": { + "methods": [ + "createMigrationWorkflow" + ] + }, + "GetMigrationWorkflow": { + "methods": [ + "getMigrationWorkflow" + ] + }, + "DeleteMigrationWorkflow": { + "methods": [ + "deleteMigrationWorkflow" + ] + }, + "StartMigrationWorkflow": { + "methods": [ + "startMigrationWorkflow" + ] + }, + "GetMigrationSubtask": { + "methods": [ + "getMigrationSubtask" + ] + }, + "ListMigrationWorkflows": { + "methods": [ + "listMigrationWorkflows", + "listMigrationWorkflowsStream", + "listMigrationWorkflowsAsync" + ] + }, + "ListMigrationSubtasks": { + "methods": [ + "listMigrationSubtasks", + "listMigrationSubtasksStream", + "listMigrationSubtasksAsync" + ] + } + } + } + } + }, + "SqlTranslationService": { + "clients": { + "grpc": { + "libraryClient": "SqlTranslationServiceClient", + "rpcs": { + "TranslateQuery": { + "methods": [ + "translateQuery" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "SqlTranslationServiceClient", + "rpcs": { + "TranslateQuery": { + "methods": [ + "translateQuery" + ] + } + } + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/index.ts b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/index.ts new file mode 100644 index 000000000000..fb06e379fdf9 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/index.ts @@ -0,0 +1,20 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +export { MigrationServiceClient } from './migration_service_client'; +export { SqlTranslationServiceClient } from './sql_translation_service_client'; diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client.ts b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client.ts new file mode 100644 index 000000000000..d09ff9bca9d4 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client.ts @@ -0,0 +1,1817 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import { Transform } from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import { loggingUtils as logging, decodeAnyProtosInArray } from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v2alpha/migration_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './migration_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service to handle EDW migrations. + * @class + * @memberof v2alpha + */ +export class MigrationServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: { [method: string]: gax.CallSettings }; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('bigquery-migration'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: { [name: string]: Function }; + pathTemplates: { [name: string]: gax.PathTemplate }; + migrationServiceStub?: Promise<{ [name: string]: Function }>; + + /** + * Construct an instance of MigrationServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new MigrationServiceClient({fallback: true}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback, + ) { + // Ensure that options include all the required fields. + const staticMembers = this.constructor as typeof MigrationServiceClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.', + ); + } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; + this._universeDomain = + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; + this._servicePath = 'bigquerymigration.' + this._universeDomain; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}', + ), + migrationSubtaskPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}', + ), + migrationWorkflowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/workflows/{workflow}', + ), + }; + + // Some of the methods on this service return "paged" results, + // (e.g. 50 results at a time, with tokens to get subsequent + // pages). Denote the keys used for pagination and results. + this.descriptors.page = { + listMigrationWorkflows: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'migrationWorkflows', + ), + listMigrationSubtasks: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'migrationSubtasks', + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.bigquery.migration.v2alpha.MigrationService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + { 'x-goog-api-client': clientHeader.join(' ') }, + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.migrationServiceStub) { + return this.migrationServiceStub; + } + + // Put together the "service stub" for + // google.cloud.bigquery.migration.v2alpha.MigrationService. + this.migrationServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.bigquery.migration.v2alpha.MigrationService', + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.bigquery.migration.v2alpha + .MigrationService, + this._opts, + this._providedCustomServicePath, + ) as Promise<{ [method: string]: Function }>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const migrationServiceStubMethods = [ + 'createMigrationWorkflow', + 'getMigrationWorkflow', + 'listMigrationWorkflows', + 'deleteMigrationWorkflow', + 'startMigrationWorkflow', + 'getMigrationSubtask', + 'listMigrationSubtasks', + ]; + for (const methodName of migrationServiceStubMethods) { + const callPromise = this.migrationServiceStub.then( + (stub) => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + }, + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback, + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.migrationServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'bigquerymigration.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'bigquerymigration.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback, + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Creates a migration workflow. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the project to which this migration workflow belongs. + * Example: `projects/foo/locations/bar` + * @param {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} request.migrationWorkflow + * Required. The migration workflow to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow|MigrationWorkflow}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2alpha/migration_service.create_migration_workflow.js + * region_tag:bigquerymigration_v2alpha_generated_MigrationService_CreateMigrationWorkflow_async + */ + createMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + ( + | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + >; + createMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + createMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest, + callback: Callback< + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + createMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + ( + | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('createMigrationWorkflow request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('createMigrationWorkflow response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .createMigrationWorkflow(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + ( + | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('createMigrationWorkflow response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets a previously created migration workflow. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * @param {google.protobuf.FieldMask} request.readMask + * The list of fields to be retrieved. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow|MigrationWorkflow}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2alpha/migration_service.get_migration_workflow.js + * region_tag:bigquerymigration_v2alpha_generated_MigrationService_GetMigrationWorkflow_async + */ + getMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + ( + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + >; + getMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest, + callback: Callback< + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + ( + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getMigrationWorkflow request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMigrationWorkflow response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getMigrationWorkflow(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, + ( + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getMigrationWorkflow response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Deletes a migration workflow by name. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2alpha/migration_service.delete_migration_workflow.js + * region_tag:bigquerymigration_v2alpha_generated_MigrationService_DeleteMigrationWorkflow_async + */ + deleteMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + >; + deleteMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + deleteMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('deleteMigrationWorkflow request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('deleteMigrationWorkflow response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .deleteMigrationWorkflow(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('deleteMigrationWorkflow response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Starts a previously created migration workflow. I.e., the state transitions + * from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. + * An error will be signaled if the state is anything other than DRAFT or + * RUNNING. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique identifier for the migration workflow. + * Example: `projects/123/locations/us/workflows/1234` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2alpha/migration_service.start_migration_workflow.js + * region_tag:bigquerymigration_v2alpha_generated_MigrationService_StartMigrationWorkflow_async + */ + startMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + >; + startMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + startMigrationWorkflow( + request: protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + startMigrationWorkflow( + request?: protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('startMigrationWorkflow request %j', request); + const wrappedCallback: + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('startMigrationWorkflow response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .startMigrationWorkflow(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.protobuf.IEmpty, + ( + | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('startMigrationWorkflow response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + /** + * Gets a previously created migration subtask. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The unique identifier for the migration subtask. + * Example: `projects/123/locations/us/workflows/1234/subtasks/543` + * @param {google.protobuf.FieldMask} [request.readMask] + * Optional. The list of fields to be retrieved. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask|MigrationSubtask}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2alpha/migration_service.get_migration_subtask.js + * region_tag:bigquerymigration_v2alpha_generated_MigrationService_GetMigrationSubtask_async + */ + getMigrationSubtask( + request?: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, + ( + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest + | undefined + ), + {} | undefined, + ] + >; + getMigrationSubtask( + request: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getMigrationSubtask( + request: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest, + callback: Callback< + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + getMigrationSubtask( + request?: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, + ( + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('getMigrationSubtask request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('getMigrationSubtask response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .getMigrationSubtask(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, + ( + | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('getMigrationSubtask response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + + /** + * Lists previously created migration workflow. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location of the migration workflows to list. + * Example: `projects/123/locations/us` + * @param {google.protobuf.FieldMask} request.readMask + * The list of fields to be retrieved. + * @param {number} request.pageSize + * The maximum number of migration workflows to return. The service may return + * fewer than this number. + * @param {string} request.pageToken + * A page token, received from previous `ListMigrationWorkflows` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMigrationWorkflows` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow|MigrationWorkflow}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listMigrationWorkflowsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMigrationWorkflows( + request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[], + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest | null, + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse, + ] + >; + listMigrationWorkflows( + request: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, + | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow + >, + ): void; + listMigrationWorkflows( + request: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, + callback: PaginationCallback< + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, + | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow + >, + ): void; + listMigrationWorkflows( + request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, + | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow + >, + callback?: PaginationCallback< + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, + | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow + >, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[], + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest | null, + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, + | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listMigrationWorkflows values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listMigrationWorkflows request %j', request); + return this.innerApiCalls + .listMigrationWorkflows(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[], + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest | null, + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse, + ]) => { + this._log.info('listMigrationWorkflows values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listMigrationWorkflows`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location of the migration workflows to list. + * Example: `projects/123/locations/us` + * @param {google.protobuf.FieldMask} request.readMask + * The list of fields to be retrieved. + * @param {number} request.pageSize + * The maximum number of migration workflows to return. The service may return + * fewer than this number. + * @param {string} request.pageToken + * A page token, received from previous `ListMigrationWorkflows` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMigrationWorkflows` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow|MigrationWorkflow} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listMigrationWorkflowsAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMigrationWorkflowsStream( + request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMigrationWorkflows']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listMigrationWorkflows stream %j', request); + return this.descriptors.page.listMigrationWorkflows.createStream( + this.innerApiCalls.listMigrationWorkflows as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listMigrationWorkflows`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The project and location of the migration workflows to list. + * Example: `projects/123/locations/us` + * @param {google.protobuf.FieldMask} request.readMask + * The list of fields to be retrieved. + * @param {number} request.pageSize + * The maximum number of migration workflows to return. The service may return + * fewer than this number. + * @param {string} request.pageToken + * A page token, received from previous `ListMigrationWorkflows` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMigrationWorkflows` + * must match the call that provided the page token. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow|MigrationWorkflow}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2alpha/migration_service.list_migration_workflows.js + * region_tag:bigquerymigration_v2alpha_generated_MigrationService_ListMigrationWorkflows_async + */ + listMigrationWorkflowsAsync( + request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMigrationWorkflows']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listMigrationWorkflows iterate %j', request); + return this.descriptors.page.listMigrationWorkflows.asyncIterate( + this.innerApiCalls['listMigrationWorkflows'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + /** + * Lists previously created migration subtasks. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The migration task of the subtasks to list. + * Example: `projects/123/locations/us/workflows/1234` + * @param {google.protobuf.FieldMask} [request.readMask] + * Optional. The list of fields to be retrieved. + * @param {number} [request.pageSize] + * Optional. The maximum number of migration tasks to return. The service may return + * fewer than this number. + * @param {string} [request.pageToken] + * Optional. A page token, received from previous `ListMigrationSubtasks` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMigrationSubtasks` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. The filter to apply. This can be used to get the subtasks of a specific + * tasks in a workflow, e.g. `migration_task = "ab012"` where `"ab012"` is the + * task ID (not the name in the named map). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is Array of {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask|MigrationSubtask}. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed and will merge results from all the pages into this array. + * Note that it can affect your quota. + * We recommend using `listMigrationSubtasksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMigrationSubtasks( + request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[], + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest | null, + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse, + ] + >; + listMigrationSubtasks( + request: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, + | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask + >, + ): void; + listMigrationSubtasks( + request: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, + callback: PaginationCallback< + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, + | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask + >, + ): void; + listMigrationSubtasks( + request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, + | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask + >, + callback?: PaginationCallback< + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, + | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask + >, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[], + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest | null, + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + const wrappedCallback: + | PaginationCallback< + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, + | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse + | null + | undefined, + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask + > + | undefined = callback + ? (error, values, nextPageRequest, rawResponse) => { + this._log.info('listMigrationSubtasks values %j', values); + callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. + } + : undefined; + this._log.info('listMigrationSubtasks request %j', request); + return this.innerApiCalls + .listMigrationSubtasks(request, options, wrappedCallback) + ?.then( + ([response, input, output]: [ + protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[], + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest | null, + protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse, + ]) => { + this._log.info('listMigrationSubtasks values %j', response); + return [response, input, output]; + }, + ); + } + + /** + * Equivalent to `listMigrationSubtasks`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The migration task of the subtasks to list. + * Example: `projects/123/locations/us/workflows/1234` + * @param {google.protobuf.FieldMask} [request.readMask] + * Optional. The list of fields to be retrieved. + * @param {number} [request.pageSize] + * Optional. The maximum number of migration tasks to return. The service may return + * fewer than this number. + * @param {string} [request.pageToken] + * Optional. A page token, received from previous `ListMigrationSubtasks` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMigrationSubtasks` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. The filter to apply. This can be used to get the subtasks of a specific + * tasks in a workflow, e.g. `migration_task = "ab012"` where `"ab012"` is the + * task ID (not the name in the named map). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Stream} + * An object stream which emits an object representing {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask|MigrationSubtask} on 'data' event. + * The client library will perform auto-pagination by default: it will call the API as many + * times as needed. Note that it can affect your quota. + * We recommend using `listMigrationSubtasksAsync()` + * method described below for async iteration which you can stop as needed. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + */ + listMigrationSubtasksStream( + request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, + options?: CallOptions, + ): Transform { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMigrationSubtasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listMigrationSubtasks stream %j', request); + return this.descriptors.page.listMigrationSubtasks.createStream( + this.innerApiCalls.listMigrationSubtasks as GaxCall, + request, + callSettings, + ); + } + + /** + * Equivalent to `listMigrationSubtasks`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The migration task of the subtasks to list. + * Example: `projects/123/locations/us/workflows/1234` + * @param {google.protobuf.FieldMask} [request.readMask] + * Optional. The list of fields to be retrieved. + * @param {number} [request.pageSize] + * Optional. The maximum number of migration tasks to return. The service may return + * fewer than this number. + * @param {string} [request.pageToken] + * Optional. A page token, received from previous `ListMigrationSubtasks` call. + * Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to `ListMigrationSubtasks` + * must match the call that provided the page token. + * @param {string} [request.filter] + * Optional. The filter to apply. This can be used to get the subtasks of a specific + * tasks in a workflow, e.g. `migration_task = "ab012"` where `"ab012"` is the + * task ID (not the name in the named map). + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Object} + * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. + * When you iterate the returned iterable, each element will be an object representing + * {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask|MigrationSubtask}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v2alpha/migration_service.list_migration_subtasks.js + * region_tag:bigquerymigration_v2alpha_generated_MigrationService_ListMigrationSubtasks_async + */ + listMigrationSubtasksAsync( + request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, + options?: CallOptions, + ): AsyncIterable { + request = request || {}; + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + const defaultCallSettings = this._defaults['listMigrationSubtasks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('listMigrationSubtasks iterate %j', request); + return this.descriptors.page.listMigrationSubtasks.asyncIterate( + this.innerApiCalls['listMigrationSubtasks'] as GaxCall, + request as {}, + callSettings, + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified migrationSubtask resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} workflow + * @param {string} subtask + * @returns {string} Resource name string. + */ + migrationSubtaskPath( + project: string, + location: string, + workflow: string, + subtask: string, + ) { + return this.pathTemplates.migrationSubtaskPathTemplate.render({ + project: project, + location: location, + workflow: workflow, + subtask: subtask, + }); + } + + /** + * Parse the project from MigrationSubtask resource. + * + * @param {string} migrationSubtaskName + * A fully-qualified path representing MigrationSubtask resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMigrationSubtaskName(migrationSubtaskName: string) { + return this.pathTemplates.migrationSubtaskPathTemplate.match( + migrationSubtaskName, + ).project; + } + + /** + * Parse the location from MigrationSubtask resource. + * + * @param {string} migrationSubtaskName + * A fully-qualified path representing MigrationSubtask resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMigrationSubtaskName(migrationSubtaskName: string) { + return this.pathTemplates.migrationSubtaskPathTemplate.match( + migrationSubtaskName, + ).location; + } + + /** + * Parse the workflow from MigrationSubtask resource. + * + * @param {string} migrationSubtaskName + * A fully-qualified path representing MigrationSubtask resource. + * @returns {string} A string representing the workflow. + */ + matchWorkflowFromMigrationSubtaskName(migrationSubtaskName: string) { + return this.pathTemplates.migrationSubtaskPathTemplate.match( + migrationSubtaskName, + ).workflow; + } + + /** + * Parse the subtask from MigrationSubtask resource. + * + * @param {string} migrationSubtaskName + * A fully-qualified path representing MigrationSubtask resource. + * @returns {string} A string representing the subtask. + */ + matchSubtaskFromMigrationSubtaskName(migrationSubtaskName: string) { + return this.pathTemplates.migrationSubtaskPathTemplate.match( + migrationSubtaskName, + ).subtask; + } + + /** + * Return a fully-qualified migrationWorkflow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} workflow + * @returns {string} Resource name string. + */ + migrationWorkflowPath(project: string, location: string, workflow: string) { + return this.pathTemplates.migrationWorkflowPathTemplate.render({ + project: project, + location: location, + workflow: workflow, + }); + } + + /** + * Parse the project from MigrationWorkflow resource. + * + * @param {string} migrationWorkflowName + * A fully-qualified path representing MigrationWorkflow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMigrationWorkflowName(migrationWorkflowName: string) { + return this.pathTemplates.migrationWorkflowPathTemplate.match( + migrationWorkflowName, + ).project; + } + + /** + * Parse the location from MigrationWorkflow resource. + * + * @param {string} migrationWorkflowName + * A fully-qualified path representing MigrationWorkflow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMigrationWorkflowName(migrationWorkflowName: string) { + return this.pathTemplates.migrationWorkflowPathTemplate.match( + migrationWorkflowName, + ).location; + } + + /** + * Parse the workflow from MigrationWorkflow resource. + * + * @param {string} migrationWorkflowName + * A fully-qualified path representing MigrationWorkflow resource. + * @returns {string} A string representing the workflow. + */ + matchWorkflowFromMigrationWorkflowName(migrationWorkflowName: string) { + return this.pathTemplates.migrationWorkflowPathTemplate.match( + migrationWorkflowName, + ).workflow; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.migrationServiceStub && !this._terminated) { + return this.migrationServiceStub.then((stub) => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client_config.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client_config.json new file mode 100644 index 000000000000..2184b83b5e7d --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client_config.json @@ -0,0 +1,73 @@ +{ + "interfaces": { + "google.cloud.bigquery.migration.v2alpha.MigrationService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unavailable": [ + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 10000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "CreateMigrationWorkflow": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "GetMigrationWorkflow": { + "timeout_millis": 120000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListMigrationWorkflows": { + "timeout_millis": 120000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "DeleteMigrationWorkflow": { + "timeout_millis": 60000, + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "StartMigrationWorkflow": { + "timeout_millis": 120000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "GetMigrationSubtask": { + "timeout_millis": 120000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ListMigrationSubtasks": { + "timeout_millis": 120000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_proto_list.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_proto_list.json new file mode 100644 index 000000000000..fdbd5988dca7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_proto_list.json @@ -0,0 +1,9 @@ +[ + "../../protos/google/cloud/bigquery/migration/v2alpha/assessment_task.proto", + "../../protos/google/cloud/bigquery/migration/v2alpha/migration_entities.proto", + "../../protos/google/cloud/bigquery/migration/v2alpha/migration_error_details.proto", + "../../protos/google/cloud/bigquery/migration/v2alpha/migration_metrics.proto", + "../../protos/google/cloud/bigquery/migration/v2alpha/migration_service.proto", + "../../protos/google/cloud/bigquery/migration/v2alpha/translation_service.proto", + "../../protos/google/cloud/bigquery/migration/v2alpha/translation_task.proto" +] diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client.ts b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client.ts new file mode 100644 index 000000000000..7861ebbd0022 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client.ts @@ -0,0 +1,711 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, +} from 'google-gax'; + +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); +import { loggingUtils as logging, decodeAnyProtosInArray } from 'google-gax'; + +/** + * Client JSON configuration object, loaded from + * `src/v2alpha/sql_translation_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './sql_translation_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Provides other SQL dialects to GoogleSQL translation operations. + * @class + * @memberof v2alpha + */ +export class SqlTranslationServiceClient { + private _terminated = false; + private _opts: ClientOptions; + private _providedCustomServicePath: boolean; + private _gaxModule: typeof gax | typeof gax.fallback; + private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; + private _protos: {}; + private _defaults: { [method: string]: gax.CallSettings }; + private _universeDomain: string; + private _servicePath: string; + private _log = logging.log('bigquery-migration'); + + auth: gax.GoogleAuth; + descriptors: Descriptors = { + page: {}, + stream: {}, + longrunning: {}, + batching: {}, + }; + warn: (code: string, message: string, warnType?: string) => void; + innerApiCalls: { [name: string]: Function }; + pathTemplates: { [name: string]: gax.PathTemplate }; + sqlTranslationServiceStub?: Promise<{ [name: string]: Function }>; + + /** + * Construct an instance of SqlTranslationServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. + * For more information, please check the + * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. + * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you + * need to avoid loading the default gRPC version and want to use the fallback + * HTTP implementation. Load only fallback version and pass it to the constructor: + * ``` + * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC + * const client = new SqlTranslationServiceClient({fallback: true}, gax); + * ``` + */ + constructor( + opts?: ClientOptions, + gaxInstance?: typeof gax | typeof gax.fallback, + ) { + // Ensure that options include all the required fields. + const staticMembers = this + .constructor as typeof SqlTranslationServiceClient; + if ( + opts?.universe_domain && + opts?.universeDomain && + opts?.universe_domain !== opts?.universeDomain + ) { + throw new Error( + 'Please set either universe_domain or universeDomain, but not both.', + ); + } + const universeDomainEnvVar = + typeof process === 'object' && typeof process.env === 'object' + ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] + : undefined; + this._universeDomain = + opts?.universeDomain ?? + opts?.universe_domain ?? + universeDomainEnvVar ?? + 'googleapis.com'; + this._servicePath = 'bigquerymigration.' + this._universeDomain; + const servicePath = + opts?.servicePath || opts?.apiEndpoint || this._servicePath; + this._providedCustomServicePath = !!( + opts?.servicePath || opts?.apiEndpoint + ); + const port = opts?.port || staticMembers.port; + const clientConfig = opts?.clientConfig ?? {}; + const fallback = + opts?.fallback ?? + (typeof window !== 'undefined' && typeof window?.fetch === 'function'); + opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts); + + // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. + if (servicePath !== this._servicePath && !('scopes' in opts)) { + opts['scopes'] = staticMembers.scopes; + } + + // Load google-gax module synchronously if needed + if (!gaxInstance) { + gaxInstance = require('google-gax') as typeof gax; + } + + // Choose either gRPC or proto-over-HTTP implementation of google-gax. + this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; + + // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. + this._gaxGrpc = new this._gaxModule.GrpcClient(opts); + + // Save options to use in initialize() method. + this._opts = opts; + + // Save the auth object to the client, for use by other methods. + this.auth = this._gaxGrpc.auth as gax.GoogleAuth; + + // Set useJWTAccessWithScope on the auth object. + this.auth.useJWTAccessWithScope = true; + + // Set defaultServicePath on the auth object. + this.auth.defaultServicePath = this._servicePath; + + // Set the default scopes in auth client if needed. + if (servicePath === this._servicePath) { + this.auth.defaultScopes = staticMembers.scopes; + } + + // Determine the client header string. + const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; + if (typeof process === 'object' && 'versions' in process) { + clientHeader.push(`gl-node/${process.versions.node}`); + } else { + clientHeader.push(`gl-web/${this._gaxModule.version}`); + } + if (!opts.fallback) { + clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); + } else { + clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); + } + if (opts.libName && opts.libVersion) { + clientHeader.push(`${opts.libName}/${opts.libVersion}`); + } + // Load the applicable protos. + this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); + + // This API contains "path templates"; forward-slash-separated + // identifiers to uniquely identify resources within the API. + // Create useful helper objects for these. + this.pathTemplates = { + locationPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}', + ), + migrationSubtaskPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}', + ), + migrationWorkflowPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/workflows/{workflow}', + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.bigquery.migration.v2alpha.SqlTranslationService', + gapicConfig as gax.ClientConfig, + opts.clientConfig || {}, + { 'x-goog-api-client': clientHeader.join(' ') }, + ); + + // Set up a dictionary of "inner API calls"; the core implementation + // of calling the API is handled in `google-gax`, with this code + // merely providing the destination and request information. + this.innerApiCalls = {}; + + // Add a warn function to the client constructor so it can be easily tested. + this.warn = this._gaxModule.warn; + } + + /** + * Initialize the client. + * Performs asynchronous operations (such as authentication) and prepares the client. + * This function will be called automatically when any class method is called for the + * first time, but if you need to initialize it before calling an actual method, + * feel free to call initialize() directly. + * + * You can await on this method if you want to make sure the client is initialized. + * + * @returns {Promise} A promise that resolves to an authenticated service stub. + */ + initialize() { + // If the client stub promise is already initialized, return immediately. + if (this.sqlTranslationServiceStub) { + return this.sqlTranslationServiceStub; + } + + // Put together the "service stub" for + // google.cloud.bigquery.migration.v2alpha.SqlTranslationService. + this.sqlTranslationServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.bigquery.migration.v2alpha.SqlTranslationService', + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.bigquery.migration.v2alpha + .SqlTranslationService, + this._opts, + this._providedCustomServicePath, + ) as Promise<{ [method: string]: Function }>; + + // Iterate over each of the methods that the service provides + // and create an API call method for each. + const sqlTranslationServiceStubMethods = ['translateQuery']; + for (const methodName of sqlTranslationServiceStubMethods) { + const callPromise = this.sqlTranslationServiceStub.then( + (stub) => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + }, + ); + + const descriptor = undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback, + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.sqlTranslationServiceStub; + } + + /** + * The DNS address for this API service. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get servicePath() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static servicePath is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'bigquerymigration.googleapis.com'; + } + + /** + * The DNS address for this API service - same as servicePath. + * @deprecated Use the apiEndpoint method of the client instance. + * @returns {string} The DNS address for this service. + */ + static get apiEndpoint() { + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + process.emitWarning( + 'Static apiEndpoint is deprecated, please use the instance method instead.', + 'DeprecationWarning', + ); + } + return 'bigquerymigration.googleapis.com'; + } + + /** + * The DNS address for this API service. + * @returns {string} The DNS address for this service. + */ + get apiEndpoint() { + return this._servicePath; + } + + get universeDomain() { + return this._universeDomain; + } + + /** + * The port for this API service. + * @returns {number} The default port for this service. + */ + static get port() { + return 443; + } + + /** + * The scopes needed to make gRPC calls for every method defined + * in this service. + * @returns {string[]} List of default scopes. + */ + static get scopes() { + return ['https://www.googleapis.com/auth/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback, + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Translates input queries from source dialects to GoogleSQL. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The name of the project to which this translation request belongs. + * Example: `projects/foo/locations/bar` + * @param {google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect} request.sourceDialect + * Required. The source SQL dialect of `queries`. + * @param {string} request.query + * Required. The query to be translated. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse|TranslateQueryResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v2alpha/sql_translation_service.translate_query.js + * region_tag:bigquerymigration_v2alpha_generated_SqlTranslationService_TranslateQuery_async + */ + translateQuery( + request?: protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest, + options?: CallOptions, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, + ( + | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest + | undefined + ), + {} | undefined, + ] + >; + translateQuery( + request: protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, + | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + translateQuery( + request: protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest, + callback: Callback< + protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, + | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest + | null + | undefined, + {} | null | undefined + >, + ): void; + translateQuery( + request?: protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, + | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, + | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest + | null + | undefined, + {} | null | undefined + >, + ): Promise< + [ + protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, + ( + | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize().catch((err) => { + throw err; + }); + this._log.info('translateQuery request %j', request); + const wrappedCallback: + | Callback< + protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, + | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest + | null + | undefined, + {} | null | undefined + > + | undefined = callback + ? (error, response, options, rawResponse) => { + this._log.info('translateQuery response %j', response); + callback!(error, response, options, rawResponse); // We verified callback above. + } + : undefined; + return this.innerApiCalls + .translateQuery(request, options, wrappedCallback) + ?.then( + ([response, options, rawResponse]: [ + protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, + ( + | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest + | undefined + ), + {} | undefined, + ]) => { + this._log.info('translateQuery response %j', response); + return [response, options, rawResponse]; + }, + ) + .catch((error: any) => { + if ( + error && + 'statusDetails' in error && + error.statusDetails instanceof Array + ) { + const protos = this._gaxModule.protobuf.Root.fromJSON( + jsonProtos, + ) as unknown as gax.protobuf.Type; + error.statusDetails = decodeAnyProtosInArray( + error.statusDetails, + protos, + ); + } + throw error; + }); + } + + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified location resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + locationPath(project: string, location: string) { + return this.pathTemplates.locationPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the project. + */ + matchProjectFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).project; + } + + /** + * Parse the location from Location resource. + * + * @param {string} locationName + * A fully-qualified path representing Location resource. + * @returns {string} A string representing the location. + */ + matchLocationFromLocationName(locationName: string) { + return this.pathTemplates.locationPathTemplate.match(locationName).location; + } + + /** + * Return a fully-qualified migrationSubtask resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} workflow + * @param {string} subtask + * @returns {string} Resource name string. + */ + migrationSubtaskPath( + project: string, + location: string, + workflow: string, + subtask: string, + ) { + return this.pathTemplates.migrationSubtaskPathTemplate.render({ + project: project, + location: location, + workflow: workflow, + subtask: subtask, + }); + } + + /** + * Parse the project from MigrationSubtask resource. + * + * @param {string} migrationSubtaskName + * A fully-qualified path representing MigrationSubtask resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMigrationSubtaskName(migrationSubtaskName: string) { + return this.pathTemplates.migrationSubtaskPathTemplate.match( + migrationSubtaskName, + ).project; + } + + /** + * Parse the location from MigrationSubtask resource. + * + * @param {string} migrationSubtaskName + * A fully-qualified path representing MigrationSubtask resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMigrationSubtaskName(migrationSubtaskName: string) { + return this.pathTemplates.migrationSubtaskPathTemplate.match( + migrationSubtaskName, + ).location; + } + + /** + * Parse the workflow from MigrationSubtask resource. + * + * @param {string} migrationSubtaskName + * A fully-qualified path representing MigrationSubtask resource. + * @returns {string} A string representing the workflow. + */ + matchWorkflowFromMigrationSubtaskName(migrationSubtaskName: string) { + return this.pathTemplates.migrationSubtaskPathTemplate.match( + migrationSubtaskName, + ).workflow; + } + + /** + * Parse the subtask from MigrationSubtask resource. + * + * @param {string} migrationSubtaskName + * A fully-qualified path representing MigrationSubtask resource. + * @returns {string} A string representing the subtask. + */ + matchSubtaskFromMigrationSubtaskName(migrationSubtaskName: string) { + return this.pathTemplates.migrationSubtaskPathTemplate.match( + migrationSubtaskName, + ).subtask; + } + + /** + * Return a fully-qualified migrationWorkflow resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} workflow + * @returns {string} Resource name string. + */ + migrationWorkflowPath(project: string, location: string, workflow: string) { + return this.pathTemplates.migrationWorkflowPathTemplate.render({ + project: project, + location: location, + workflow: workflow, + }); + } + + /** + * Parse the project from MigrationWorkflow resource. + * + * @param {string} migrationWorkflowName + * A fully-qualified path representing MigrationWorkflow resource. + * @returns {string} A string representing the project. + */ + matchProjectFromMigrationWorkflowName(migrationWorkflowName: string) { + return this.pathTemplates.migrationWorkflowPathTemplate.match( + migrationWorkflowName, + ).project; + } + + /** + * Parse the location from MigrationWorkflow resource. + * + * @param {string} migrationWorkflowName + * A fully-qualified path representing MigrationWorkflow resource. + * @returns {string} A string representing the location. + */ + matchLocationFromMigrationWorkflowName(migrationWorkflowName: string) { + return this.pathTemplates.migrationWorkflowPathTemplate.match( + migrationWorkflowName, + ).location; + } + + /** + * Parse the workflow from MigrationWorkflow resource. + * + * @param {string} migrationWorkflowName + * A fully-qualified path representing MigrationWorkflow resource. + * @returns {string} A string representing the workflow. + */ + matchWorkflowFromMigrationWorkflowName(migrationWorkflowName: string) { + return this.pathTemplates.migrationWorkflowPathTemplate.match( + migrationWorkflowName, + ).workflow; + } + + /** + * Terminate the gRPC channel and close the client. + * + * The client will no longer be usable and all future behavior is undefined. + * @returns {Promise} A promise that resolves when the client is closed. + */ + close(): Promise { + if (this.sqlTranslationServiceStub && !this._terminated) { + return this.sqlTranslationServiceStub.then((stub) => { + this._log.info('ending gRPC channel'); + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client_config.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client_config.json new file mode 100644 index 000000000000..8c186d79da31 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client_config.json @@ -0,0 +1,30 @@ +{ + "interfaces": { + "google.cloud.bigquery.migration.v2alpha.SqlTranslationService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "TranslateQuery": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_proto_list.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_proto_list.json new file mode 100644 index 000000000000..fdbd5988dca7 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_proto_list.json @@ -0,0 +1,9 @@ +[ + "../../protos/google/cloud/bigquery/migration/v2alpha/assessment_task.proto", + "../../protos/google/cloud/bigquery/migration/v2alpha/migration_entities.proto", + "../../protos/google/cloud/bigquery/migration/v2alpha/migration_error_details.proto", + "../../protos/google/cloud/bigquery/migration/v2alpha/migration_metrics.proto", + "../../protos/google/cloud/bigquery/migration/v2alpha/migration_service.proto", + "../../protos/google/cloud/bigquery/migration/v2alpha/translation_service.proto", + "../../protos/google/cloud/bigquery/migration/v2alpha/translation_task.proto" +] diff --git a/owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.js new file mode 100644 index 000000000000..72627c46161f --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const migration = require('@google-cloud/bigquery-migration'); + +function main() { + const migrationServiceClient = new migration.MigrationServiceClient(); +} + +main(); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.ts new file mode 100644 index 000000000000..28368e498d74 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,32 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import { MigrationServiceClient } from '@google-cloud/bigquery-migration'; + +// check that the client class type name can be used +function doStuffWithMigrationServiceClient(client: MigrationServiceClient) { + client.close(); +} + +function main() { + // check that the client instance can be created + const migrationServiceClient = new MigrationServiceClient(); + doStuffWithMigrationServiceClient(migrationServiceClient); +} + +main(); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/system-test/install.ts b/owl-bot-staging/google-cloud-bigquery-migration/system-test/install.ts new file mode 100644 index 000000000000..ccf167042d2e --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import { packNTest } from 'pack-n-play'; +import { readFileSync } from 'fs'; +import { describe, it } from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts', + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + cjs: readFileSync( + './system-test/fixtures/sample/src/index.js', + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2.ts b/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2.ts new file mode 100644 index 000000000000..edf3de2058aa --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2.ts @@ -0,0 +1,1929 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import { SinonStub } from 'sinon'; +import { describe, it } from 'mocha'; +import * as migrationserviceModule from '../src'; + +import { PassThrough } from 'stream'; + +import { protobuf } from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json'), +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, { defaults: true }); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject, + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error, +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error, +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error, +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({ done: true, value: undefined }); + } + return Promise.resolve({ done: false, value: responses![counter++] }); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v2.MigrationServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = new migrationserviceModule.v2.MigrationServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigquerymigration.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = new migrationserviceModule.v2.MigrationServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = + migrationserviceModule.v2.MigrationServiceClient.servicePath; + assert.strictEqual(servicePath, 'bigquerymigration.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + migrationserviceModule.v2.MigrationServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigquerymigration.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + universeDomain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigquerymigration.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + universe_domain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigquerymigration.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new migrationserviceModule.v2.MigrationServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigquerymigration.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = new migrationserviceModule.v2.MigrationServiceClient({ + universeDomain: 'configured.example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual( + servicePath, + 'bigquerymigration.configured.example.com', + ); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new migrationserviceModule.v2.MigrationServiceClient({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); + }); + + it('has port', () => { + const port = migrationserviceModule.v2.MigrationServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = new migrationserviceModule.v2.MigrationServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.migrationServiceStub, undefined); + await client.initialize(); + assert(client.migrationServiceStub); + }); + + it('has close method for the initialized client', (done) => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.initialize().catch((err) => { + throw err; + }); + assert(client.migrationServiceStub); + client + .close() + .then(() => { + done(); + }) + .catch((err) => { + throw err; + }); + }); + + it('has close method for the non-initialized client', (done) => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.migrationServiceStub, undefined); + client + .close() + .then(() => { + done(); + }) + .catch((err) => { + throw err; + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('createMigrationWorkflow', () => { + it('invokes createMigrationWorkflow without error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ); + client.innerApiCalls.createMigrationWorkflow = + stubSimpleCall(expectedResponse); + const [response] = await client.createMigrationWorkflow(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMigrationWorkflow without error using callback', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ); + client.innerApiCalls.createMigrationWorkflow = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createMigrationWorkflow( + request, + ( + err?: Error | null, + result?: protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMigrationWorkflow with error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMigrationWorkflow = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.createMigrationWorkflow(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.createMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMigrationWorkflow with closed client', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.createMigrationWorkflow(request), + expectedError, + ); + }); + }); + + describe('getMigrationWorkflow', () => { + it('invokes getMigrationWorkflow without error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ); + client.innerApiCalls.getMigrationWorkflow = + stubSimpleCall(expectedResponse); + const [response] = await client.getMigrationWorkflow(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMigrationWorkflow without error using callback', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ); + client.innerApiCalls.getMigrationWorkflow = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMigrationWorkflow( + request, + ( + err?: Error | null, + result?: protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMigrationWorkflow with error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMigrationWorkflow = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getMigrationWorkflow(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMigrationWorkflow with closed client', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getMigrationWorkflow(request), expectedError); + }); + }); + + describe('deleteMigrationWorkflow', () => { + it('invokes deleteMigrationWorkflow without error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteMigrationWorkflow = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteMigrationWorkflow(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMigrationWorkflow without error using callback', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteMigrationWorkflow = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteMigrationWorkflow( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMigrationWorkflow with error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteMigrationWorkflow = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.deleteMigrationWorkflow(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.deleteMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMigrationWorkflow with closed client', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.deleteMigrationWorkflow(request), + expectedError, + ); + }); + }); + + describe('startMigrationWorkflow', () => { + it('invokes startMigrationWorkflow without error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.startMigrationWorkflow = + stubSimpleCall(expectedResponse); + const [response] = await client.startMigrationWorkflow(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.startMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.startMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes startMigrationWorkflow without error using callback', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.startMigrationWorkflow = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.startMigrationWorkflow( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.startMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.startMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes startMigrationWorkflow with error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.startMigrationWorkflow = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.startMigrationWorkflow(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.startMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.startMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes startMigrationWorkflow with closed client', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.startMigrationWorkflow(request), + expectedError, + ); + }); + }); + + describe('getMigrationSubtask', () => { + it('invokes getMigrationSubtask without error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), + ); + client.innerApiCalls.getMigrationSubtask = + stubSimpleCall(expectedResponse); + const [response] = await client.getMigrationSubtask(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMigrationSubtask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMigrationSubtask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMigrationSubtask without error using callback', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), + ); + client.innerApiCalls.getMigrationSubtask = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMigrationSubtask( + request, + ( + err?: Error | null, + result?: protos.google.cloud.bigquery.migration.v2.IMigrationSubtask | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMigrationSubtask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMigrationSubtask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMigrationSubtask with error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMigrationSubtask = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getMigrationSubtask(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getMigrationSubtask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMigrationSubtask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMigrationSubtask with closed client', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getMigrationSubtask(request), expectedError); + }); + }); + + describe('listMigrationWorkflows', () => { + it('invokes listMigrationWorkflows without error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ), + ]; + client.innerApiCalls.listMigrationWorkflows = + stubSimpleCall(expectedResponse); + const [response] = await client.listMigrationWorkflows(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMigrationWorkflows as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMigrationWorkflows as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMigrationWorkflows without error using callback', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ), + ]; + client.innerApiCalls.listMigrationWorkflows = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMigrationWorkflows( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow[] + | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMigrationWorkflows as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMigrationWorkflows as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMigrationWorkflows with error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMigrationWorkflows = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listMigrationWorkflows(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listMigrationWorkflows as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMigrationWorkflows as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMigrationWorkflowsStream without error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ), + ]; + client.descriptors.page.listMigrationWorkflows.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listMigrationWorkflowsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.bigquery.migration.v2.MigrationWorkflow[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.bigquery.migration.v2.MigrationWorkflow, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listMigrationWorkflows + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listMigrationWorkflows, request), + ); + assert( + ( + client.descriptors.page.listMigrationWorkflows + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listMigrationWorkflowsStream with error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMigrationWorkflows.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listMigrationWorkflowsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.bigquery.migration.v2.MigrationWorkflow[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.bigquery.migration.v2.MigrationWorkflow, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listMigrationWorkflows + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listMigrationWorkflows, request), + ); + assert( + ( + client.descriptors.page.listMigrationWorkflows + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listMigrationWorkflows without error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), + ), + ]; + client.descriptors.page.listMigrationWorkflows.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow[] = + []; + const iterable = client.listMigrationWorkflowsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listMigrationWorkflows + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listMigrationWorkflows + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listMigrationWorkflows with error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMigrationWorkflows.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMigrationWorkflowsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listMigrationWorkflows + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listMigrationWorkflows + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listMigrationSubtasks', () => { + it('invokes listMigrationSubtasks without error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), + ), + ]; + client.innerApiCalls.listMigrationSubtasks = + stubSimpleCall(expectedResponse); + const [response] = await client.listMigrationSubtasks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMigrationSubtasks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMigrationSubtasks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMigrationSubtasks without error using callback', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), + ), + ]; + client.innerApiCalls.listMigrationSubtasks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMigrationSubtasks( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.bigquery.migration.v2.IMigrationSubtask[] + | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMigrationSubtasks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMigrationSubtasks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMigrationSubtasks with error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMigrationSubtasks = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listMigrationSubtasks(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listMigrationSubtasks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMigrationSubtasks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMigrationSubtasksStream without error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), + ), + ]; + client.descriptors.page.listMigrationSubtasks.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listMigrationSubtasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.bigquery.migration.v2.MigrationSubtask[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.bigquery.migration.v2.MigrationSubtask, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listMigrationSubtasks + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listMigrationSubtasks, request), + ); + assert( + ( + client.descriptors.page.listMigrationSubtasks + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listMigrationSubtasksStream with error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMigrationSubtasks.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listMigrationSubtasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.bigquery.migration.v2.MigrationSubtask[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.bigquery.migration.v2.MigrationSubtask, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listMigrationSubtasks + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listMigrationSubtasks, request), + ); + assert( + ( + client.descriptors.page.listMigrationSubtasks + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listMigrationSubtasks without error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), + ), + ]; + client.descriptors.page.listMigrationSubtasks.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.bigquery.migration.v2.IMigrationSubtask[] = + []; + const iterable = client.listMigrationSubtasksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listMigrationSubtasks + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listMigrationSubtasks + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listMigrationSubtasks with error', async () => { + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMigrationSubtasks.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMigrationSubtasksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.bigquery.migration.v2.IMigrationSubtask[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listMigrationSubtasks + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listMigrationSubtasks + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('Path templates', () => { + describe('location', async () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('migrationSubtask', async () => { + const fakePath = '/rendered/path/migrationSubtask'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + workflow: 'workflowValue', + subtask: 'subtaskValue', + }; + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.migrationSubtaskPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.migrationSubtaskPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('migrationSubtaskPath', () => { + const result = client.migrationSubtaskPath( + 'projectValue', + 'locationValue', + 'workflowValue', + 'subtaskValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.migrationSubtaskPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromMigrationSubtaskName', () => { + const result = client.matchProjectFromMigrationSubtaskName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromMigrationSubtaskName', () => { + const result = client.matchLocationFromMigrationSubtaskName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchWorkflowFromMigrationSubtaskName', () => { + const result = client.matchWorkflowFromMigrationSubtaskName(fakePath); + assert.strictEqual(result, 'workflowValue'); + assert( + (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchSubtaskFromMigrationSubtaskName', () => { + const result = client.matchSubtaskFromMigrationSubtaskName(fakePath); + assert.strictEqual(result, 'subtaskValue'); + assert( + (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('migrationWorkflow', async () => { + const fakePath = '/rendered/path/migrationWorkflow'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + workflow: 'workflowValue', + }; + const client = new migrationserviceModule.v2.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.migrationWorkflowPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.migrationWorkflowPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('migrationWorkflowPath', () => { + const result = client.migrationWorkflowPath( + 'projectValue', + 'locationValue', + 'workflowValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.migrationWorkflowPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromMigrationWorkflowName', () => { + const result = client.matchProjectFromMigrationWorkflowName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.migrationWorkflowPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromMigrationWorkflowName', () => { + const result = client.matchLocationFromMigrationWorkflowName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.migrationWorkflowPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchWorkflowFromMigrationWorkflowName', () => { + const result = client.matchWorkflowFromMigrationWorkflowName(fakePath); + assert.strictEqual(result, 'workflowValue'); + assert( + ( + client.pathTemplates.migrationWorkflowPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2alpha.ts b/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2alpha.ts new file mode 100644 index 000000000000..2e058697e623 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2alpha.ts @@ -0,0 +1,1934 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import { SinonStub } from 'sinon'; +import { describe, it } from 'mocha'; +import * as migrationserviceModule from '../src'; + +import { PassThrough } from 'stream'; + +import { protobuf } from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json'), +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, { defaults: true }); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject, + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error, +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error, +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error, +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({ done: true, value: undefined }); + } + return Promise.resolve({ done: false, value: responses![counter++] }); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v2alpha.MigrationServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = + new migrationserviceModule.v2alpha.MigrationServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigquerymigration.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = + new migrationserviceModule.v2alpha.MigrationServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = + migrationserviceModule.v2alpha.MigrationServiceClient.servicePath; + assert.strictEqual(servicePath, 'bigquerymigration.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + migrationserviceModule.v2alpha.MigrationServiceClient.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigquerymigration.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + universeDomain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigquerymigration.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + universe_domain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigquerymigration.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new migrationserviceModule.v2alpha.MigrationServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigquerymigration.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new migrationserviceModule.v2alpha.MigrationServiceClient({ + universeDomain: 'configured.example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual( + servicePath, + 'bigquerymigration.configured.example.com', + ); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new migrationserviceModule.v2alpha.MigrationServiceClient({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); + }); + + it('has port', () => { + const port = migrationserviceModule.v2alpha.MigrationServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new migrationserviceModule.v2alpha.MigrationServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.migrationServiceStub, undefined); + await client.initialize(); + assert(client.migrationServiceStub); + }); + + it('has close method for the initialized client', (done) => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.initialize().catch((err) => { + throw err; + }); + assert(client.migrationServiceStub); + client + .close() + .then(() => { + done(); + }) + .catch((err) => { + throw err; + }); + }); + + it('has close method for the non-initialized client', (done) => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.migrationServiceStub, undefined); + client + .close() + .then(() => { + done(); + }) + .catch((err) => { + throw err; + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('createMigrationWorkflow', () => { + it('invokes createMigrationWorkflow without error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ); + client.innerApiCalls.createMigrationWorkflow = + stubSimpleCall(expectedResponse); + const [response] = await client.createMigrationWorkflow(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMigrationWorkflow without error using callback', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ); + client.innerApiCalls.createMigrationWorkflow = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createMigrationWorkflow( + request, + ( + err?: Error | null, + result?: protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMigrationWorkflow with error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createMigrationWorkflow = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.createMigrationWorkflow(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.createMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createMigrationWorkflow with closed client', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.createMigrationWorkflow(request), + expectedError, + ); + }); + }); + + describe('getMigrationWorkflow', () => { + it('invokes getMigrationWorkflow without error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ); + client.innerApiCalls.getMigrationWorkflow = + stubSimpleCall(expectedResponse); + const [response] = await client.getMigrationWorkflow(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMigrationWorkflow without error using callback', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ); + client.innerApiCalls.getMigrationWorkflow = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMigrationWorkflow( + request, + ( + err?: Error | null, + result?: protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMigrationWorkflow with error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMigrationWorkflow = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getMigrationWorkflow(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMigrationWorkflow with closed client', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getMigrationWorkflow(request), expectedError); + }); + }); + + describe('deleteMigrationWorkflow', () => { + it('invokes deleteMigrationWorkflow without error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteMigrationWorkflow = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteMigrationWorkflow(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMigrationWorkflow without error using callback', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.deleteMigrationWorkflow = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteMigrationWorkflow( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMigrationWorkflow with error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteMigrationWorkflow = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.deleteMigrationWorkflow(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.deleteMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteMigrationWorkflow with closed client', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.deleteMigrationWorkflow(request), + expectedError, + ); + }); + }); + + describe('startMigrationWorkflow', () => { + it('invokes startMigrationWorkflow without error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.startMigrationWorkflow = + stubSimpleCall(expectedResponse); + const [response] = await client.startMigrationWorkflow(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.startMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.startMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes startMigrationWorkflow without error using callback', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty(), + ); + client.innerApiCalls.startMigrationWorkflow = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.startMigrationWorkflow( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.startMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.startMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes startMigrationWorkflow with error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.startMigrationWorkflow = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.startMigrationWorkflow(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.startMigrationWorkflow as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.startMigrationWorkflow as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes startMigrationWorkflow with closed client', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects( + client.startMigrationWorkflow(request), + expectedError, + ); + }); + }); + + describe('getMigrationSubtask', () => { + it('invokes getMigrationSubtask without error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), + ); + client.innerApiCalls.getMigrationSubtask = + stubSimpleCall(expectedResponse); + const [response] = await client.getMigrationSubtask(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMigrationSubtask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMigrationSubtask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMigrationSubtask without error using callback', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), + ); + client.innerApiCalls.getMigrationSubtask = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getMigrationSubtask( + request, + ( + err?: Error | null, + result?: protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getMigrationSubtask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMigrationSubtask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMigrationSubtask with error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getMigrationSubtask = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.getMigrationSubtask(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getMigrationSubtask as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getMigrationSubtask as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getMigrationSubtask with closed client', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest', + ['name'], + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.getMigrationSubtask(request), expectedError); + }); + }); + + describe('listMigrationWorkflows', () => { + it('invokes listMigrationWorkflows without error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ), + ]; + client.innerApiCalls.listMigrationWorkflows = + stubSimpleCall(expectedResponse); + const [response] = await client.listMigrationWorkflows(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMigrationWorkflows as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMigrationWorkflows as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMigrationWorkflows without error using callback', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ), + ]; + client.innerApiCalls.listMigrationWorkflows = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMigrationWorkflows( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[] + | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMigrationWorkflows as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMigrationWorkflows as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMigrationWorkflows with error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMigrationWorkflows = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listMigrationWorkflows(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listMigrationWorkflows as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMigrationWorkflows as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMigrationWorkflowsStream without error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ), + ]; + client.descriptors.page.listMigrationWorkflows.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listMigrationWorkflowsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listMigrationWorkflows + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listMigrationWorkflows, request), + ); + assert( + ( + client.descriptors.page.listMigrationWorkflows + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listMigrationWorkflowsStream with error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMigrationWorkflows.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listMigrationWorkflowsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listMigrationWorkflows + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listMigrationWorkflows, request), + ); + assert( + ( + client.descriptors.page.listMigrationWorkflows + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listMigrationWorkflows without error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), + ), + ]; + client.descriptors.page.listMigrationWorkflows.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[] = + []; + const iterable = client.listMigrationWorkflowsAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listMigrationWorkflows + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listMigrationWorkflows + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listMigrationWorkflows with error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMigrationWorkflows.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMigrationWorkflowsAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listMigrationWorkflows + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listMigrationWorkflows + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('listMigrationSubtasks', () => { + it('invokes listMigrationSubtasks without error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), + ), + ]; + client.innerApiCalls.listMigrationSubtasks = + stubSimpleCall(expectedResponse); + const [response] = await client.listMigrationSubtasks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMigrationSubtasks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMigrationSubtasks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMigrationSubtasks without error using callback', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), + ), + ]; + client.innerApiCalls.listMigrationSubtasks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listMigrationSubtasks( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[] + | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listMigrationSubtasks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMigrationSubtasks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMigrationSubtasks with error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listMigrationSubtasks = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects( + client.listMigrationSubtasks(request), + expectedError, + ); + const actualRequest = ( + client.innerApiCalls.listMigrationSubtasks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listMigrationSubtasks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listMigrationSubtasksStream without error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), + ), + ]; + client.descriptors.page.listMigrationSubtasks.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listMigrationSubtasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + const responses = await promise; + assert.deepStrictEqual(responses, expectedResponse); + assert( + ( + client.descriptors.page.listMigrationSubtasks + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listMigrationSubtasks, request), + ); + assert( + ( + client.descriptors.page.listMigrationSubtasks + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('invokes listMigrationSubtasksStream with error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMigrationSubtasks.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listMigrationSubtasksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask, + ) => { + responses.push(response); + }, + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listMigrationSubtasks + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listMigrationSubtasks, request), + ); + assert( + ( + client.descriptors.page.listMigrationSubtasks + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listMigrationSubtasks without error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), + ), + generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), + ), + ]; + client.descriptors.page.listMigrationSubtasks.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[] = + []; + const iterable = client.listMigrationSubtasksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listMigrationSubtasks + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listMigrationSubtasks + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + + it('uses async iteration with listMigrationSubtasks with error', async () => { + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.descriptors.page.listMigrationSubtasks.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listMigrationSubtasksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listMigrationSubtasks + .asyncIterate as SinonStub + ).getCall(0).args[1], + request, + ); + assert( + ( + client.descriptors.page.listMigrationSubtasks + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams, + ), + ); + }); + }); + + describe('Path templates', () => { + describe('location', async () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('migrationSubtask', async () => { + const fakePath = '/rendered/path/migrationSubtask'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + workflow: 'workflowValue', + subtask: 'subtaskValue', + }; + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.migrationSubtaskPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.migrationSubtaskPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('migrationSubtaskPath', () => { + const result = client.migrationSubtaskPath( + 'projectValue', + 'locationValue', + 'workflowValue', + 'subtaskValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.migrationSubtaskPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromMigrationSubtaskName', () => { + const result = client.matchProjectFromMigrationSubtaskName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromMigrationSubtaskName', () => { + const result = client.matchLocationFromMigrationSubtaskName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchWorkflowFromMigrationSubtaskName', () => { + const result = client.matchWorkflowFromMigrationSubtaskName(fakePath); + assert.strictEqual(result, 'workflowValue'); + assert( + (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchSubtaskFromMigrationSubtaskName', () => { + const result = client.matchSubtaskFromMigrationSubtaskName(fakePath); + assert.strictEqual(result, 'subtaskValue'); + assert( + (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('migrationWorkflow', async () => { + const fakePath = '/rendered/path/migrationWorkflow'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + workflow: 'workflowValue', + }; + const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.migrationWorkflowPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.migrationWorkflowPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('migrationWorkflowPath', () => { + const result = client.migrationWorkflowPath( + 'projectValue', + 'locationValue', + 'workflowValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.migrationWorkflowPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromMigrationWorkflowName', () => { + const result = client.matchProjectFromMigrationWorkflowName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.migrationWorkflowPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromMigrationWorkflowName', () => { + const result = client.matchLocationFromMigrationWorkflowName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.migrationWorkflowPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchWorkflowFromMigrationWorkflowName', () => { + const result = client.matchWorkflowFromMigrationWorkflowName(fakePath); + assert.strictEqual(result, 'workflowValue'); + assert( + ( + client.pathTemplates.migrationWorkflowPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_sql_translation_service_v2alpha.ts b/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_sql_translation_service_v2alpha.ts new file mode 100644 index 000000000000..1edcf7e64f1b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_sql_translation_service_v2alpha.ts @@ -0,0 +1,620 @@ +// Copyright 2026 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://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. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import * as protos from '../protos/protos'; +import * as assert from 'assert'; +import * as sinon from 'sinon'; +import { SinonStub } from 'sinon'; +import { describe, it } from 'mocha'; +import * as sqltranslationserviceModule from '../src'; + +import { protobuf } from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json'), +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, { defaults: true }); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject, + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error, +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +describe('v2alpha.SqlTranslationServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigquerymigration.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient(); + const universeDomain = client.universeDomain; + assert.strictEqual(universeDomain, 'googleapis.com'); + }); + + if ( + typeof process === 'object' && + typeof process.emitWarning === 'function' + ) { + it('throws DeprecationWarning if static servicePath is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const servicePath = + sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient + .servicePath; + assert.strictEqual(servicePath, 'bigquerymigration.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient + .apiEndpoint; + assert.strictEqual(apiEndpoint, 'bigquerymigration.googleapis.com'); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + universeDomain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigquerymigration.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + universe_domain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigquerymigration.example.com'); + }); + + if (typeof process === 'object' && 'env' in process) { + describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { + it('sets apiEndpoint from environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'bigquerymigration.example.com'); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + + it('value configured in code has priority over environment variable', () => { + const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient( + { universeDomain: 'configured.example.com' }, + ); + const servicePath = client.apiEndpoint; + assert.strictEqual( + servicePath, + 'bigquerymigration.configured.example.com', + ); + if (saved) { + process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; + } else { + delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; + } + }); + }); + } + it('does not allow setting both universeDomain and universe_domain', () => { + assert.throws(() => { + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); + }); + + it('has port', () => { + const port = + sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.sqlTranslationServiceStub, undefined); + await client.initialize(); + assert(client.sqlTranslationServiceStub); + }); + + it('has close method for the initialized client', (done) => { + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.initialize().catch((err) => { + throw err; + }); + assert(client.sqlTranslationServiceStub); + client + .close() + .then(() => { + done(); + }) + .catch((err) => { + throw err; + }); + }); + + it('has close method for the non-initialized client', (done) => { + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + assert.strictEqual(client.sqlTranslationServiceStub, undefined); + client + .close() + .then(() => { + done(); + }) + .catch((err) => { + throw err; + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); + const result = await client.getProjectId(); + assert.strictEqual(result, fakeProjectId); + assert((client.auth.getProjectId as SinonStub).calledWithExactly()); + }); + + it('has getProjectId method with callback', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + client.auth.getProjectId = sinon + .stub() + .callsArgWith(0, null, fakeProjectId); + const promise = new Promise((resolve, reject) => { + client.getProjectId((err?: Error | null, projectId?: string | null) => { + if (err) { + reject(err); + } else { + resolve(projectId); + } + }); + }); + const result = await promise; + assert.strictEqual(result, fakeProjectId); + }); + }); + + describe('translateQuery', () => { + it('invokes translateQuery without error', async () => { + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse(), + ); + client.innerApiCalls.translateQuery = stubSimpleCall(expectedResponse); + const [response] = await client.translateQuery(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.translateQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.translateQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes translateQuery without error using callback', async () => { + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse(), + ); + client.innerApiCalls.translateQuery = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.translateQuery( + request, + ( + err?: Error | null, + result?: protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse | null, + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + }, + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.translateQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.translateQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes translateQuery with error', async () => { + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; + const expectedError = new Error('expected'); + client.innerApiCalls.translateQuery = stubSimpleCall( + undefined, + expectedError, + ); + await assert.rejects(client.translateQuery(request), expectedError); + const actualRequest = ( + client.innerApiCalls.translateQuery as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.translateQuery as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes translateQuery with closed client', async () => { + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest(), + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest', + ['parent'], + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close().catch((err) => { + throw err; + }); + await assert.rejects(client.translateQuery(request), expectedError); + }); + }); + + describe('Path templates', () => { + describe('location', async () => { + const fakePath = '/rendered/path/location'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.locationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.locationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('locationPath', () => { + const result = client.locationPath('projectValue', 'locationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.locationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromLocationName', () => { + const result = client.matchProjectFromLocationName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromLocationName', () => { + const result = client.matchLocationFromLocationName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.locationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('migrationSubtask', async () => { + const fakePath = '/rendered/path/migrationSubtask'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + workflow: 'workflowValue', + subtask: 'subtaskValue', + }; + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.migrationSubtaskPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.migrationSubtaskPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('migrationSubtaskPath', () => { + const result = client.migrationSubtaskPath( + 'projectValue', + 'locationValue', + 'workflowValue', + 'subtaskValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.migrationSubtaskPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromMigrationSubtaskName', () => { + const result = client.matchProjectFromMigrationSubtaskName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromMigrationSubtaskName', () => { + const result = client.matchLocationFromMigrationSubtaskName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchWorkflowFromMigrationSubtaskName', () => { + const result = client.matchWorkflowFromMigrationSubtaskName(fakePath); + assert.strictEqual(result, 'workflowValue'); + assert( + (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchSubtaskFromMigrationSubtaskName', () => { + const result = client.matchSubtaskFromMigrationSubtaskName(fakePath); + assert.strictEqual(result, 'subtaskValue'); + assert( + (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + + describe('migrationWorkflow', async () => { + const fakePath = '/rendered/path/migrationWorkflow'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + workflow: 'workflowValue', + }; + const client = + new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ + credentials: { client_email: 'bogus', private_key: 'bogus' }, + projectId: 'bogus', + }); + await client.initialize(); + client.pathTemplates.migrationWorkflowPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.migrationWorkflowPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('migrationWorkflowPath', () => { + const result = client.migrationWorkflowPath( + 'projectValue', + 'locationValue', + 'workflowValue', + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.migrationWorkflowPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters), + ); + }); + + it('matchProjectFromMigrationWorkflowName', () => { + const result = client.matchProjectFromMigrationWorkflowName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + ( + client.pathTemplates.migrationWorkflowPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchLocationFromMigrationWorkflowName', () => { + const result = client.matchLocationFromMigrationWorkflowName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + ( + client.pathTemplates.migrationWorkflowPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + + it('matchWorkflowFromMigrationWorkflowName', () => { + const result = client.matchWorkflowFromMigrationWorkflowName(fakePath); + assert.strictEqual(result, 'workflowValue'); + assert( + ( + client.pathTemplates.migrationWorkflowPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath), + ); + }); + }); + }); +}); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/tsconfig.json b/owl-bot-staging/google-cloud-bigquery-migration/tsconfig.json new file mode 100644 index 000000000000..ca73e7bfc824 --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/tsconfig.json @@ -0,0 +1,22 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2023", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts", + "src/**/*.json", + "samples/**/*.json", + "protos/protos.json" + ] +} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/webpack.config.js b/owl-bot-staging/google-cloud-bigquery-migration/webpack.config.js new file mode 100644 index 000000000000..9178c4b3e04b --- /dev/null +++ b/owl-bot-staging/google-cloud-bigquery-migration/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 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 +// +// https://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. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'MigrationService', + filename: './migration-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/ + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader' + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader' + }, + ], + }, + mode: 'production', +}; From bd2b146c0338c1f0c86fce74ea303a37d2a64b85 Mon Sep 17 00:00:00 2001 From: Owl Bot Date: Wed, 20 May 2026 20:25:36 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=A6=89=20Updates=20from=20OwlBot=20po?= =?UTF-8?q?st-processor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --- .../.eslintignore | 7 - .../.eslintrc.json | 4 - .../.gitignore | 14 - .../google-cloud-bigquery-migration/.jsdoc.js | 55 - .../.mocharc.js | 33 - .../google-cloud-bigquery-migration/.nycrc | 24 - .../google-cloud-bigquery-migration/README.md | 130 - .../migration/v2/migration_entities.proto | 313 - .../v2/migration_error_details.proto | 64 - .../migration/v2/migration_metrics.proto | 115 - .../migration/v2/migration_service.proto | 256 - .../migration/v2/translation_config.proto | 294 - .../migration/v2/translation_details.proto | 161 - .../migration/v2/translation_suggestion.proto | 63 - .../migration/v2/translation_usability.proto | 65 - .../migration/v2alpha/assessment_task.proto | 49 - .../v2alpha/migration_entities.proto | 244 - .../v2alpha/migration_error_details.proto | 62 - .../migration/v2alpha/migration_metrics.proto | 111 - .../migration/v2alpha/migration_service.proto | 247 - .../v2alpha/translation_service.proto | 135 - .../migration/v2alpha/translation_task.proto | 207 - .../protos/protos.d.ts | 20596 ------ .../protos/protos.js | 53890 ---------------- .../protos/protos.json | 5006 -- ...ation_service.create_migration_workflow.js | 67 - ...ation_service.delete_migration_workflow.js | 62 - ...migration_service.get_migration_subtask.js | 66 - ...igration_service.get_migration_workflow.js | 66 - ...gration_service.list_migration_subtasks.js | 86 - ...ration_service.list_migration_workflows.js | 80 - ...ration_service.start_migration_workflow.js | 62 - ...ta_google.cloud.bigquery.migration.v2.json | 335 - ...ation_service.create_migration_workflow.js | 67 - ...ation_service.delete_migration_workflow.js | 62 - ...migration_service.get_migration_subtask.js | 66 - ...igration_service.get_migration_workflow.js | 66 - ...gration_service.list_migration_subtasks.js | 86 - ...ration_service.list_migration_workflows.js | 80 - ...ration_service.start_migration_workflow.js | 62 - ...ogle.cloud.bigquery.migration.v2alpha.json | 383 - ...sql_translation_service.translate_query.js | 72 - .../src/index.ts | 28 - .../src/v2/gapic_metadata.json | 101 - .../src/v2/index.ts | 19 - .../src/v2/migration_service_client.ts | 1817 - .../v2/migration_service_client_config.json | 71 - .../src/v2/migration_service_proto_list.json | 11 - .../src/v2alpha/gapic_metadata.json | 125 - .../src/v2alpha/index.ts | 20 - .../src/v2alpha/migration_service_client.ts | 1817 - .../migration_service_client_config.json | 73 - .../v2alpha/migration_service_proto_list.json | 9 - .../v2alpha/sql_translation_service_client.ts | 711 - ...sql_translation_service_client_config.json | 30 - .../sql_translation_service_proto_list.json | 9 - .../system-test/fixtures/sample/src/index.js | 27 - .../system-test/fixtures/sample/src/index.ts | 32 - .../system-test/install.ts | 51 - .../test/gapic_migration_service_v2.ts | 1929 - .../test/gapic_migration_service_v2alpha.ts | 1934 - .../gapic_sql_translation_service_v2alpha.ts | 620 - .../tsconfig.json | 22 - .../webpack.config.js | 64 - .../migration/v2/assessment_task.proto | 0 .../migration/v2/migration_entities.proto | 104 +- .../v2/migration_error_details.proto | 2 +- .../migration/v2/migration_metrics.proto | 2 +- .../migration/v2/migration_service.proto | 2 +- .../migration/v2/translation_config.proto | 2 +- .../migration/v2/translation_details.proto | 47 +- .../migration/v2/translation_usability.proto | 2 +- .../protos/protos.d.ts | 463 +- .../protos/protos.js | 7685 ++- .../protos/protos.json | 183 +- .../src/v2/migration_service_proto_list.json | 1 + 76 files changed, 5184 insertions(+), 96742 deletions(-) delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/.eslintignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/.eslintrc.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/.gitignore delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/.jsdoc.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/.mocharc.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/.nycrc delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/README.md delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_entities.proto delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_suggestion.proto delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/assessment_task.proto delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_entities.proto delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_error_details.proto delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_metrics.proto delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_service.proto delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_service.proto delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_task.proto delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/protos.d.ts delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/protos.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/protos/protos.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.create_migration_workflow.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.delete_migration_workflow.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_subtask.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_workflow.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_subtasks.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_workflows.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.start_migration_workflow.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.create_migration_workflow.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.delete_migration_workflow.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_subtask.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_workflow.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_subtasks.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_workflows.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.start_migration_workflow.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/sql_translation_service.translate_query.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2/index.ts delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/gapic_metadata.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/index.ts delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client.ts delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client_config.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_proto_list.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.js delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.ts delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/system-test/install.ts delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2.ts delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2alpha.ts delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/test/gapic_sql_translation_service_v2alpha.ts delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/tsconfig.json delete mode 100644 owl-bot-staging/google-cloud-bigquery-migration/webpack.config.js rename {owl-bot-staging => packages}/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/assessment_task.proto (100%) diff --git a/owl-bot-staging/google-cloud-bigquery-migration/.eslintignore b/owl-bot-staging/google-cloud-bigquery-migration/.eslintignore deleted file mode 100644 index cfc348ec4d11..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/.eslintignore +++ /dev/null @@ -1,7 +0,0 @@ -**/node_modules -**/.coverage -build/ -docs/ -protos/ -system-test/ -samples/generated/ diff --git a/owl-bot-staging/google-cloud-bigquery-migration/.eslintrc.json b/owl-bot-staging/google-cloud-bigquery-migration/.eslintrc.json deleted file mode 100644 index 3e8d97ccb390..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/.eslintrc.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "extends": "./node_modules/gts", - "root": true -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/.gitignore b/owl-bot-staging/google-cloud-bigquery-migration/.gitignore deleted file mode 100644 index d4f03a0df2e8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/.gitignore +++ /dev/null @@ -1,14 +0,0 @@ -**/*.log -**/node_modules -/.coverage -/coverage -/.nyc_output -/docs/ -/out/ -/build/ -system-test/secrets.js -system-test/*key.json -*.lock -.DS_Store -package-lock.json -__pycache__ diff --git a/owl-bot-staging/google-cloud-bigquery-migration/.jsdoc.js b/owl-bot-staging/google-cloud-bigquery-migration/.jsdoc.js deleted file mode 100644 index 11c30322277c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/.jsdoc.js +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -'use strict'; - -module.exports = { - opts: { - readme: './README.md', - package: './package.json', - template: './node_modules/jsdoc-fresh', - recurse: true, - verbose: true, - destination: './docs/' - }, - plugins: [ - 'plugins/markdown', - 'jsdoc-region-tag' - ], - source: { - excludePattern: '(^|\\/|\\\\)[._]', - include: [ - 'build/src', - 'protos' - ], - includePattern: '\\.js$' - }, - templates: { - copyright: 'Copyright 2026 Google LLC', - includeDate: false, - sourceFiles: false, - systemName: '@google-cloud/bigquery-migration', - theme: 'lumen', - default: { - outputSourceFiles: false - } - }, - markdown: { - idInHeadings: true - } -}; diff --git a/owl-bot-staging/google-cloud-bigquery-migration/.mocharc.js b/owl-bot-staging/google-cloud-bigquery-migration/.mocharc.js deleted file mode 100644 index 5eb34e86c874..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/.mocharc.js +++ /dev/null @@ -1,33 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -const config = { - "enable-source-maps": true, - "throw-deprecation": true, - "timeout": 10000 -} -if (process.env.MOCHA_THROW_DEPRECATION === 'false') { - delete config['throw-deprecation']; -} -if (process.env.MOCHA_REPORTER) { - config.reporter = process.env.MOCHA_REPORTER; -} -if (process.env.MOCHA_REPORTER_OUTPUT) { - config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; -} -module.exports = config diff --git a/owl-bot-staging/google-cloud-bigquery-migration/.nycrc b/owl-bot-staging/google-cloud-bigquery-migration/.nycrc deleted file mode 100644 index 81a95fc94b00..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/.nycrc +++ /dev/null @@ -1,24 +0,0 @@ -{ - "report-dir": "./.coverage", - "reporter": ["text", "lcov"], - "exclude": [ - "**/*-test", - "**/.coverage", - "**/apis", - "**/benchmark", - "**/conformance", - "**/docs", - "**/samples", - "**/scripts", - "**/protos", - "**/test", - "**/*.d.ts", - ".jsdoc.js", - "**/.jsdoc.js", - "karma.conf.js", - "webpack-tests.config.js", - "webpack.config.js" - ], - "exclude-after-remap": false, - "all": true -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-migration/README.md b/owl-bot-staging/google-cloud-bigquery-migration/README.md deleted file mode 100644 index da131647a246..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/README.md +++ /dev/null @@ -1,130 +0,0 @@ -[//]: # "This README.md file is auto-generated, all changes to this file will be lost." -[//]: # "The comments you see below are used to generate those parts of the template in later states." -Google Cloud Platform logo - -# [BigQuery Migration API: Nodejs Client][homepage] - -This library is considered to be **stable**. The code surface will not change in backwards-incompatible ways -unless absolutely necessary (e.g. because of critical security issues) or with -an extensive deprecation period. Issues and requests against **stable** libraries -are addressed with the highest priority - -[![npm version](https://img.shields.io/npm/v/@google-cloud/bigquery-migration.svg)](https://www.npmjs.org/package/@google-cloud/bigquery-migration) - -BigQuery Migration API client for Node.js - -[//]: # "partials.introduction" - -A comprehensive list of changes in each version may be found in -[the CHANGELOG][homepage_changelog]. - -* [BigQuery Migration API Nodejs Client API Reference](https://cloud.google.com/nodejs/docs/reference/migration/latest) - - -Read more about the client libraries for Cloud APIs, including the older -Google APIs Client Libraries, in [Client Libraries Explained][explained]. - -[explained]: https://cloud.google.com/apis/docs/client-libraries-explained - -**Table of contents:** - -* [Quickstart](#quickstart) - * [Before you begin](#before-you-begin) - * [Installing the client library](#installing-the-client-library) - -* [Versioning](#versioning) -* [Contributing](#contributing) -* [License](#license) - -## Quickstart -### Before you begin - -1. [Select or create a Cloud Platform project][projects]. -1. [Enable billing for your project][billing]. -1. [Enable the BigQuery Migration API API][enable_api]. -1. [Set up authentication][auth] so you can access the - API from your local workstation. -### Installing the client library - -```bash -npm install @google-cloud/bigquery-migration -``` - -[//]: # "partials.body" - -## Samples - -Samples are in the [`samples/`][homepage_samples] directory. Each sample's `README.md` has instructions for running its sample. - -| Sample | Source Code | -| --------------------------- | --------------------------------- | -| create migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/migration_service.create_migration_workflow.js) | -| delete migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/migration_service.delete_migration_workflow.js) | -| get migration subtask | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_subtask.js) | -| get migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_workflow.js) | -| list migration subtasks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_subtasks.js) | -| list migration workflows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_workflows.js) | -| start migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/migration_service.start_migration_workflow.js) | -| cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json) | -| create migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.create_migration_workflow.js) | -| delete migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.delete_migration_workflow.js) | -| get migration subtask | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_subtask.js) | -| get migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_workflow.js) | -| list migration subtasks | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_subtasks.js) | -| list migration workflows | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_workflows.js) | -| start migration workflow | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.start_migration_workflow.js) | -| cloud | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json) | -| translate query | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples/generated/v2alpha/sql_translation_service.translate_query.js) | - - -## Supported Node.js Versions - -Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). -Libraries are compatible with all current _active_ and _maintenance_ versions of -Node.js. -If you are using an end-of-life version of Node.js, we recommend that you update -as soon as possible to an actively supported LTS version. - -Google's client libraries support legacy versions of Node.js runtimes on a -best-efforts basis with the following warnings: - -* Legacy versions are not tested in continuous integration. -* Some security patches and features cannot be backported. -* Dependencies cannot be kept up-to-date. - -Client libraries targeting some end-of-life versions of Node.js are available, and -can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). -The dist-tags follow the naming convention `legacy-(version)`. -For example, `npm install @google-cloud/bigquery-migration@legacy-8` installs client libraries -for versions compatible with Node.js 8. - -## Versioning - -This library follows [Semantic Versioning](http://semver.org/). - -More Information: [Google Cloud Platform Launch Stages][launch_stages] - -[launch_stages]: https://cloud.google.com/terms/launch-stages - -## Contributing - -Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). - -Please note that this `README.md` -and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) -are generated from a central template. - -## License - -Apache Version 2.0 - -See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) - -[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png -[projects]: https://console.cloud.google.com/project -[billing]: https://support.google.com/cloud/answer/6293499#enable-billing -[enable_api]: https://console.cloud.google.com/flows/enableapi?apiid=bigquerymigration.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local -[homepage_samples]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/samples -[homepage_changelog]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration/CHANGELOG.md -[homepage]: https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-bigquery-migration diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_entities.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_entities.proto deleted file mode 100644 index 775e3d426ee4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_entities.proto +++ /dev/null @@ -1,313 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.bigquery.migration.v2; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/bigquery/migration/v2/assessment_task.proto"; -import "google/cloud/bigquery/migration/v2/migration_error_details.proto"; -import "google/cloud/bigquery/migration/v2/migration_metrics.proto"; -import "google/cloud/bigquery/migration/v2/translation_config.proto"; -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"; - -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 = "MigrationEntitiesProto"; -option java_package = "com.google.cloud.bigquery.migration.v2"; -option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2"; - -// A migration workflow which specifies what needs to be done for an EDW -// migration. -message MigrationWorkflow { - option (google.api.resource) = { - type: "bigquerymigration.googleapis.com/MigrationWorkflow" - pattern: "projects/{project}/locations/{location}/workflows/{workflow}" - }; - - // Possible migration workflow states. - enum State { - // Workflow state is unspecified. - STATE_UNSPECIFIED = 0; - - // Workflow is in draft status, i.e. tasks are not yet eligible for - // execution. - DRAFT = 1; - - // Workflow is running (i.e. tasks are eligible for execution). - RUNNING = 2; - - // Workflow is paused. Tasks currently in progress may continue, but no - // further tasks will be scheduled. - PAUSED = 3; - - // Workflow is complete. There should not be any task in a non-terminal - // state, but if they are (e.g. forced termination), they will not be - // scheduled. - COMPLETED = 4; - } - - // 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) = IDENTIFIER - ]; - - // The display name of the workflow. This can be set to give a workflow - // a descriptive name. There is no guarantee or enforcement of uniqueness. - string display_name = 6; - - // The tasks in a workflow in a named map. The name (i.e. key) has no - // meaning and is merely a convenient way to address a specific task - // in a workflow. - map tasks = 2; - - // Output only. That status of the workflow. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time when the workflow was created. - google.protobuf.Timestamp create_time = 4 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time when the workflow was last updated. - google.protobuf.Timestamp last_update_time = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A single task for a migration which has details about the configuration of -// the task. -message MigrationTask { - // Possible states of a migration task. - enum State { - // The state is unspecified. - STATE_UNSPECIFIED = 0; - - // The task is waiting for orchestration. - PENDING = 1; - - // The task is assigned to an orchestrator. - ORCHESTRATING = 2; - - // The task is running, i.e. its subtasks are ready for execution. - RUNNING = 3; - - // The task is paused. Assigned subtasks can continue, but no new subtasks - // will be scheduled. - PAUSED = 4; - - // The task finished successfully. - SUCCEEDED = 5; - - // The task finished unsuccessfully. - FAILED = 6; - } - - // The details of the task. - oneof task_details { - // Task configuration for Assessment. - AssessmentTaskDetails assessment_task_details = 12; - - // Task configuration for CW Batch/Offline SQL Translation. - TranslationConfigDetails translation_config_details = 14; - - // Task details for unified SQL Translation. - TranslationDetails translation_details = 16; - } - - // Output only. Immutable. The unique identifier for the migration task. The - // ID is server-generated. - string id = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IMMUTABLE - ]; - - // The type of the task. This must be one of the supported task types. - // - // Assessment: - // - // - `Assessment_Hive` - Assessment for Hive. - // - `Assessment_Redshift` - Assessment for Redshift. - // - `Assessment_Snowflake` - Assessment for Snowflake. - // - `Assessment_Teradata_v2` - Assessment for Teradata. - // - `Assessment_Oracle` - Assessment for Oracle. - // - `Assessment_Hadoop` - Assessment for Hadoop. - // - `Assessment_Informatica` - Assessment for Informatica. - // - // Translation: - // See [Supported Task - // Types](https://docs.cloud.google.com/bigquery/docs/api-sql-translator#supported_task_types) - // for a list of supported task types. - string type = 2; - - // Output only. The current state of the task. - State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. An explanation that may be populated when the task is in - // FAILED state. - google.rpc.ErrorInfo processing_error = 5 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time when the task was created. - google.protobuf.Timestamp create_time = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time when the task was last updated. - google.protobuf.Timestamp last_update_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Provides details to errors and issues encountered while - // processing the task. Presence of error details does not mean that the task - // failed. - repeated ResourceErrorDetail resource_error_details = 17 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number or resources with errors. Note: This is not the - // total number of errors as each resource can have more than one error. This - // is used to indicate truncation by having a `resource_error_count` that is - // higher than the size of `resource_error_details`. - int32 resource_error_count = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The metrics for the task. - repeated TimeSeries metrics = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The result of the task. - MigrationTaskResult task_result = 20 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Count of all the processing errors in this task and its - // subtasks. - int32 total_processing_error_count = 21 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Count of all the resource errors in this task and its - // subtasks. - int32 total_resource_error_count = 22 - [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A subtask for a migration which carries details about the configuration of -// the subtask. The content of the details should not matter to the end user, -// but is a contract between the subtask creator and subtask worker. -message MigrationSubtask { - option (google.api.resource) = { - type: "bigquerymigration.googleapis.com/MigrationSubtask" - pattern: "projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}" - }; - - // Possible states of a migration subtask. - enum State { - // The state is unspecified. - STATE_UNSPECIFIED = 0; - - // The subtask is ready, i.e. it is ready for execution. - ACTIVE = 1; - - // The subtask is running, i.e. it is assigned to a worker for execution. - RUNNING = 2; - - // The subtask finished successfully. - SUCCEEDED = 3; - - // The subtask finished unsuccessfully. - FAILED = 4; - - // The subtask is paused, i.e., it will not be scheduled. If it was already - // assigned,it might still finish but no new lease renewals will be granted. - PAUSED = 5; - - // The subtask is pending a dependency. It will be scheduled once its - // dependencies are done. - PENDING_DEPENDENCY = 6; - } - - // Output only. Immutable. The resource name for the migration subtask. The ID - // is server-generated. - // - // Example: `projects/123/locations/us/workflows/345/subtasks/678` - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IMMUTABLE - ]; - - // The unique ID of the task to which this subtask belongs. - string task_id = 2; - - // The type of the Subtask. The migration service does not check whether this - // is a known type. It is up to the task creator (i.e. orchestrator or worker) - // to ensure it only creates subtasks for which there are compatible workers - // polling for Subtasks. - string type = 3; - - // Output only. The current state of the subtask. - State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. An explanation that may be populated when the task is in - // FAILED state. - google.rpc.ErrorInfo processing_error = 6 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Provides details to errors and issues encountered while - // processing the subtask. Presence of error details does not mean that the - // subtask failed. - repeated ResourceErrorDetail resource_error_details = 12 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The number or resources with errors. Note: This is not the - // total number of errors as each resource can have more than one error. This - // is used to indicate truncation by having a `resource_error_count` that is - // higher than the size of `resource_error_details`. - int32 resource_error_count = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time when the subtask was created. - google.protobuf.Timestamp create_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Time when the subtask was last updated. - google.protobuf.Timestamp last_update_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. The metrics for the subtask. - repeated TimeSeries metrics = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// 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; - - // The Cloud Console URI for the migration workflow. - string console_uri = 3; -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto deleted file mode 100644 index 4f7db8c68a06..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.bigquery.migration.v2; - -import "google/api/field_behavior.proto"; -import "google/rpc/error_details.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 = "MigrationErrorDetailsProto"; -option java_package = "com.google.cloud.bigquery.migration.v2"; -option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2"; - -// Provides details for errors and the corresponding resources. -message ResourceErrorDetail { - // Required. Information about the resource where the error is located. - google.rpc.ResourceInfo resource_info = 1 - [(google.api.field_behavior) = REQUIRED]; - - // Required. The error details for the resource. - repeated ErrorDetail error_details = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Required. How many errors there are in total for the resource. Truncation - // can be indicated by having an `error_count` that is higher than the size of - // `error_details`. - int32 error_count = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Provides details for errors, e.g. issues that where encountered when -// processing a subtask. -message ErrorDetail { - // Optional. The exact location within the resource (if applicable). - ErrorLocation location = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Describes the cause of the error with structured detail. - google.rpc.ErrorInfo error_info = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Holds information about where the error is located. -message ErrorLocation { - // Optional. If applicable, denotes the line where the error occurred. A zero - // value means that there is no line information. - int32 line = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If applicable, denotes the column where the error occurred. A - // zero value means that there is no columns information. - int32 column = 2 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto deleted file mode 100644 index 50b6e9b53632..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto +++ /dev/null @@ -1,115 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.bigquery.migration.v2; - -import "google/api/distribution.proto"; -import "google/api/field_behavior.proto"; -import "google/api/metric.proto"; -import "google/protobuf/timestamp.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 = "MigrationMetricsProto"; -option java_package = "com.google.cloud.bigquery.migration.v2"; -option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2"; - -// The metrics object for a SubTask. -message TimeSeries { - // Required. The name of the metric. - // - // If the metric is not known by the service yet, it will be auto-created. - string metric = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The value type of the time series. - google.api.MetricDescriptor.ValueType value_type = 2 - [(google.api.field_behavior) = REQUIRED]; - - // Optional. The metric kind of the time series. - // - // If present, it must be the same as the metric kind of the associated - // metric. If the associated metric's descriptor must be auto-created, then - // this field specifies the metric kind of the new descriptor and must be - // either `GAUGE` (the default) or `CUMULATIVE`. - google.api.MetricDescriptor.MetricKind metric_kind = 3 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. The data points of this time series. When listing time series, - // points are returned in reverse time order. - // - // When creating a time series, this field must contain exactly one point and - // the point's type must be the same as the value type of the associated - // metric. If the associated metric's descriptor must be auto-created, then - // the value type of the descriptor is determined by the point's type, which - // must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. - repeated Point points = 4 [(google.api.field_behavior) = REQUIRED]; -} - -// A single data point in a time series. -message Point { - // The time interval to which the data point applies. For `GAUGE` metrics, - // the start time does not need to be supplied, but if it is supplied, it must - // equal the end time. For `DELTA` metrics, the start and end time should - // specify a non-zero interval, with subsequent points specifying contiguous - // and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end - // time should specify a non-zero interval, with subsequent points specifying - // the same start time and increasing end times, until an event resets the - // cumulative value to zero and sets a new start time for the following - // points. - TimeInterval interval = 1; - - // The value of the data point. - TypedValue value = 2; -} - -// A time interval extending just after a start time through an end time. -// If the start time is the same as the end time, then the interval -// represents a single point in time. -message TimeInterval { - // Optional. The beginning of the time interval. The default value - // for the start time is the end time. The start time must not be - // later than the end time. - google.protobuf.Timestamp start_time = 1 - [(google.api.field_behavior) = OPTIONAL]; - - // Required. The end of the time interval. - google.protobuf.Timestamp end_time = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// A single strongly-typed value. -message TypedValue { - // The typed value field. - oneof value { - // A Boolean value: `true` or `false`. - bool bool_value = 1; - - // A 64-bit integer. Its range is approximately `+/-9.2x10^18`. - int64 int64_value = 2; - - // A 64-bit double-precision floating-point number. Its magnitude - // is approximately `+/-10^(+/-300)` and it has 16 significant digits of - // precision. - double double_value = 3; - - // A variable-length string value. - string string_value = 4; - - // A distribution value. - google.api.Distribution distribution_value = 5; - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto deleted file mode 100644 index 53032afd5780..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto +++ /dev/null @@ -1,256 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.bigquery.migration.v2; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/bigquery/migration/v2/migration_entities.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.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 = "MigrationServiceProto"; -option java_package = "com.google.cloud.bigquery.migration.v2"; -option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2"; - -// Service to handle EDW migrations. -service MigrationService { - option (google.api.default_host) = "bigquerymigration.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; - - // Creates a migration workflow. - rpc CreateMigrationWorkflow(CreateMigrationWorkflowRequest) - returns (MigrationWorkflow) { - option (google.api.http) = { - post: "/v2/{parent=projects/*/locations/*}/workflows" - body: "migration_workflow" - }; - option (google.api.method_signature) = "parent,migration_workflow"; - } - - // Gets a previously created migration workflow. - rpc GetMigrationWorkflow(GetMigrationWorkflowRequest) - returns (MigrationWorkflow) { - option (google.api.http) = { - get: "/v2/{name=projects/*/locations/*/workflows/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists previously created migration workflow. - rpc ListMigrationWorkflows(ListMigrationWorkflowsRequest) - returns (ListMigrationWorkflowsResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*/locations/*}/workflows" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a migration workflow by name. - rpc DeleteMigrationWorkflow(DeleteMigrationWorkflowRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2/{name=projects/*/locations/*/workflows/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Starts a previously created migration workflow. I.e., the state transitions - // from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. - // An error will be signaled if the state is anything other than DRAFT or - // RUNNING. - rpc StartMigrationWorkflow(StartMigrationWorkflowRequest) - returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v2/{name=projects/*/locations/*/workflows/*}:start" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Gets a previously created migration subtask. - rpc GetMigrationSubtask(GetMigrationSubtaskRequest) - returns (MigrationSubtask) { - option (google.api.http) = { - get: "/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists previously created migration subtasks. - rpc ListMigrationSubtasks(ListMigrationSubtasksRequest) - returns (ListMigrationSubtasksResponse) { - option (google.api.http) = { - get: "/v2/{parent=projects/*/locations/*/workflows/*}/subtasks" - }; - option (google.api.method_signature) = "parent"; - } -} - -// Request to create a migration workflow resource. -message CreateMigrationWorkflowRequest { - // Required. The name of the project to which this migration workflow belongs. - // Example: `projects/foo/locations/bar` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The migration workflow to create. - MigrationWorkflow migration_workflow = 2 - [(google.api.field_behavior) = REQUIRED]; -} - -// A request to get a previously created migration workflow. -message GetMigrationWorkflowRequest { - // Required. The unique identifier for the migration workflow. - // Example: `projects/123/locations/us/workflows/1234` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "bigquerymigration.googleapis.com/MigrationWorkflow" - } - ]; - - // The list of fields to be retrieved. - google.protobuf.FieldMask read_mask = 2; -} - -// A request to list previously created migration workflows. -message ListMigrationWorkflowsRequest { - // Required. The project and location of the migration workflows to list. - // Example: `projects/123/locations/us` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // The list of fields to be retrieved. - google.protobuf.FieldMask read_mask = 2; - - // The maximum number of migration workflows to return. The service may return - // fewer than this number. - int32 page_size = 3; - - // A page token, received from previous `ListMigrationWorkflows` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListMigrationWorkflows` - // must match the call that provided the page token. - string page_token = 4; -} - -// Response object for a `ListMigrationWorkflows` call. -message ListMigrationWorkflowsResponse { - // The migration workflows for the specified project / location. - repeated MigrationWorkflow migration_workflows = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// A request to delete a previously created migration workflow. -message DeleteMigrationWorkflowRequest { - // Required. The unique identifier for the migration workflow. - // Example: `projects/123/locations/us/workflows/1234` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "bigquerymigration.googleapis.com/MigrationWorkflow" - } - ]; -} - -// A request to start a previously created migration workflow. -message StartMigrationWorkflowRequest { - // Required. The unique identifier for the migration workflow. - // Example: `projects/123/locations/us/workflows/1234` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "bigquerymigration.googleapis.com/MigrationWorkflow" - } - ]; -} - -// A request to get a previously created migration subtasks. -message GetMigrationSubtaskRequest { - // Required. The unique identifier for the migration subtask. - // Example: `projects/123/locations/us/workflows/1234/subtasks/543` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "bigquerymigration.googleapis.com/MigrationSubtask" - } - ]; - - // Optional. The list of fields to be retrieved. - google.protobuf.FieldMask read_mask = 2 - [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to list previously created migration subtasks. -message ListMigrationSubtasksRequest { - // Required. The migration task of the subtasks to list. - // Example: `projects/123/locations/us/workflows/1234` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "bigquerymigration.googleapis.com/MigrationWorkflow" - } - ]; - - // Optional. The list of fields to be retrieved. - google.protobuf.FieldMask read_mask = 2 - [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maximum number of migration tasks to return. The service may - // return fewer than this number. - int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from previous `ListMigrationSubtasks` - // call. Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListMigrationSubtasks` - // must match the call that provided the page token. - string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to apply. This can be used to get the subtasks of a - // specific tasks in a workflow, e.g. `migration_task = "ab012"` where - // `"ab012"` is the task ID (not the name in the named map). - string filter = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response object for a `ListMigrationSubtasks` call. -message ListMigrationSubtasksResponse { - // The migration subtasks for the specified task. - repeated MigrationSubtask migration_subtasks = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto deleted file mode 100644 index 82bbfb9b38e8..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto +++ /dev/null @@ -1,294 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.bigquery.migration.v2; - -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2"; -option go_package = "cloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb"; -option java_multiple_files = true; -option java_outer_classname = "TranslationConfigProto"; -option java_package = "com.google.cloud.bigquery.migration.v2"; -option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2"; - -// The translation config to capture necessary settings for a translation task -// and subtask. -message TranslationConfigDetails { - // The chosen path where the source for input files will be found. - oneof source_location { - // The Cloud Storage path for a directory of files to translate in a task. - string gcs_source_path = 1; - } - - // The chosen path where the destination for output files will be found. - oneof target_location { - // The Cloud Storage path to write back the corresponding input files to. - string gcs_target_path = 2; - } - - // The mapping of full SQL object names from their current state to the - // desired output. - oneof output_name_mapping { - // The mapping of objects to their desired output names in list form. - ObjectNameMappingList name_mapping_list = 5; - } - - // The dialect of the input files. - Dialect source_dialect = 3; - - // The target dialect for the engine to translate the input to. - Dialect target_dialect = 4; - - // The default source environment values for the translation. - SourceEnv source_env = 6; - - // 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. -message Dialect { - // The possible dialect options that this message represents. - oneof dialect_value { - // The BigQuery dialect - BigQueryDialect bigquery_dialect = 1; - - // The HiveQL dialect - HiveQLDialect hiveql_dialect = 2; - - // The Redshift dialect - RedshiftDialect redshift_dialect = 3; - - // The Teradata dialect - TeradataDialect teradata_dialect = 4; - - // The Oracle dialect - OracleDialect oracle_dialect = 5; - - // The SparkSQL dialect - SparkSQLDialect sparksql_dialect = 6; - - // The Snowflake dialect - SnowflakeDialect snowflake_dialect = 7; - - // The Netezza dialect - NetezzaDialect netezza_dialect = 8; - - // The Azure Synapse dialect - AzureSynapseDialect azure_synapse_dialect = 9; - - // The Vertica dialect - VerticaDialect vertica_dialect = 10; - - // The SQL Server dialect - SQLServerDialect sql_server_dialect = 11; - - // The Postgresql dialect - PostgresqlDialect postgresql_dialect = 12; - - // The Presto dialect - PrestoDialect presto_dialect = 13; - - // 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; - } -} - -// The dialect definition for BigQuery. -message BigQueryDialect {} - -// The dialect definition for HiveQL. -message HiveQLDialect {} - -// The dialect definition for Redshift. -message RedshiftDialect {} - -// The dialect definition for Teradata. -message TeradataDialect { - // The sub-dialect options for Teradata. - enum Mode { - // Unspecified mode. - MODE_UNSPECIFIED = 0; - - // Teradata SQL mode. - SQL = 1; - - // BTEQ mode (which includes SQL). - BTEQ = 2; - } - - // Which Teradata sub-dialect mode the user specifies. - Mode mode = 1; -} - -// The dialect definition for Oracle. -message OracleDialect {} - -// The dialect definition for SparkSQL. -message SparkSQLDialect {} - -// The dialect definition for Snowflake. -message SnowflakeDialect {} - -// The dialect definition for Netezza. -message NetezzaDialect {} - -// The dialect definition for Azure Synapse. -message AzureSynapseDialect {} - -// The dialect definition for Vertica. -message VerticaDialect {} - -// The dialect definition for SQL Server. -message SQLServerDialect {} - -// The dialect definition for Postgresql. -message PostgresqlDialect {} - -// The dialect definition for Presto. -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 { - // The elements of the object name map. - repeated ObjectNameMapping name_map = 1; -} - -// Represents a key-value pair of NameMappingKey to NameMappingValue to -// represent the mapping of SQL names from the input value to desired output. -message ObjectNameMapping { - // The name of the object in source that is being mapped. - NameMappingKey source = 1; - - // The desired target name of the object that is being mapped. - NameMappingValue target = 2; -} - -// The potential components of a full name mapping that will be mapped -// during translation in the source data warehouse. -message NameMappingKey { - // The type of the object that is being mapped. - enum Type { - // Unspecified name mapping type. - TYPE_UNSPECIFIED = 0; - - // The object being mapped is a database. - DATABASE = 1; - - // The object being mapped is a schema. - SCHEMA = 2; - - // The object being mapped is a relation. - RELATION = 3; - - // The object being mapped is an attribute. - ATTRIBUTE = 4; - - // The object being mapped is a relation alias. - RELATION_ALIAS = 5; - - // The object being mapped is a an attribute alias. - ATTRIBUTE_ALIAS = 6; - - // The object being mapped is a function. - FUNCTION = 7; - } - - // The type of object that is being mapped. - Type type = 1; - - // The database name (BigQuery project ID equivalent in the source data - // warehouse). - string database = 2; - - // The schema name (BigQuery dataset equivalent in the source data warehouse). - string schema = 3; - - // The relation name (BigQuery table or view equivalent in the source data - // warehouse). - string relation = 4; - - // The attribute name (BigQuery column equivalent in the source data - // warehouse). - string attribute = 5; -} - -// The potential components of a full name mapping that will be mapped -// during translation in the target data warehouse. -message NameMappingValue { - // The database name (BigQuery project ID equivalent in the target data - // warehouse). - string database = 1; - - // The schema name (BigQuery dataset equivalent in the target data warehouse). - string schema = 2; - - // The relation name (BigQuery table or view equivalent in the target data - // warehouse). - string relation = 3; - - // The attribute name (BigQuery column equivalent in the target data - // warehouse). - string attribute = 4; -} - -// Represents the default source environment values for the translation. -message SourceEnv { - // 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 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/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto deleted file mode 100644 index 5737556cda17..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto +++ /dev/null @@ -1,161 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.bigquery.migration.v2; - -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2"; -option go_package = "cloud.google.com/go/bigquery/migration/apiv2/migrationpb;migrationpb"; -option java_multiple_files = true; -option java_outer_classname = "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; - - // The configuration for the suggestion if requested as a target type. - SuggestionConfig suggestion_config = 6; -} - -// The configuration for the suggestion if requested as a target type. -message SuggestionConfig { - // The list of suggestion steps to skip. - repeated SuggestionStep skip_suggestion_steps = 1; -} - -// Suggestion step to skip. -message SuggestionStep { - // Suggestion type. - enum SuggestionType { - // Suggestion type unspecified. - SUGGESTION_TYPE_UNSPECIFIED = 0; - - // Query customization. - QUERY_CUSTOMIZATION = 1; - - // Translation explanation. - TRANSLATION_EXPLANATION = 2; - } - - // The target to apply the suggestion to. - enum RewriteTarget { - // Rewrite target unspecified. - REWRITE_TARGET_UNSPECIFIED = 0; - - // Source SQL. - SOURCE_SQL = 1; - - // Target SQL. - TARGET_SQL = 2; - } - - // The type of suggestion. - SuggestionType suggestion_type = 1; - - // The rewrite target. - RewriteTarget rewrite_target = 2; -} - -// Represents one mapping from a source SQL to a target SQL. -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; - - // The path to a single source file in Cloud Storage. - string gcs_file_path = 4; - } - - // Optional. The optional field to specify the encoding of the sql bytes. - 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/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_suggestion.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_suggestion.proto deleted file mode 100644 index aaa051eb8d29..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_suggestion.proto +++ /dev/null @@ -1,63 +0,0 @@ -// Copyright 2025 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/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto deleted file mode 100644 index 944a687f64de..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto +++ /dev/null @@ -1,65 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package google.cloud.bigquery.migration.v2; - -import "google/api/field_behavior.proto"; -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/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/assessment_task.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/assessment_task.proto deleted file mode 100644 index ffe32100a8da..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/assessment_task.proto +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2025 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.v2alpha; - -import "google/api/field_behavior.proto"; - -option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2Alpha"; -option go_package = "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb"; -option java_multiple_files = true; -option java_outer_classname = "AssessmentTaskProto"; -option java_package = "com.google.cloud.bigquery.migration.v2alpha"; -option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2alpha"; - -// Assessment task config. -message AssessmentTaskDetails { - // Required. The Cloud Storage path for assessment input files. - string input_path = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The BigQuery dataset for output. - string output_dataset = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. An optional Cloud Storage path to write the query logs (which is - // then used as an input path on the translation task) - string querylogs_path = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The data source or data warehouse type (eg: TERADATA/REDSHIFT) - // from which the input data is extracted. - string data_source = 4 [(google.api.field_behavior) = REQUIRED]; -} - -// Details for an assessment task orchestration result. -message AssessmentOrchestrationResultDetails { - // Optional. The version used for the output table schemas. - string output_tables_schema_version = 1 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_entities.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_entities.proto deleted file mode 100644 index 4cd0c912d484..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_entities.proto +++ /dev/null @@ -1,244 +0,0 @@ -// Copyright 2025 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.v2alpha; - -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/bigquery/migration/v2alpha/assessment_task.proto"; -import "google/cloud/bigquery/migration/v2alpha/migration_error_details.proto"; -import "google/cloud/bigquery/migration/v2alpha/migration_metrics.proto"; -import "google/cloud/bigquery/migration/v2alpha/translation_task.proto"; -import "google/protobuf/any.proto"; -import "google/protobuf/timestamp.proto"; -import "google/rpc/error_details.proto"; - -option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2Alpha"; -option go_package = "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb"; -option java_multiple_files = true; -option java_outer_classname = "MigrationEntitiesProto"; -option java_package = "com.google.cloud.bigquery.migration.v2alpha"; -option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2alpha"; - -// A migration workflow which specifies what needs to be done for an EDW -// migration. -message MigrationWorkflow { - option (google.api.resource) = { - type: "bigquerymigration.googleapis.com/MigrationWorkflow" - pattern: "projects/{project}/locations/{location}/workflows/{workflow}" - }; - - // Possible migration workflow states. - enum State { - // Workflow state is unspecified. - STATE_UNSPECIFIED = 0; - - // Workflow is in draft status, i.e. tasks are not yet eligible for - // execution. - DRAFT = 1; - - // Workflow is running (i.e. tasks are eligible for execution). - RUNNING = 2; - - // Workflow is paused. Tasks currently in progress may continue, but no - // further tasks will be scheduled. - PAUSED = 3; - - // Workflow is complete. There should not be any task in a non-terminal - // state, but if they are (e.g. forced termination), they will not be - // scheduled. - COMPLETED = 4; - } - - // Output only. Immutable. 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 - ]; - - // The display name of the workflow. This can be set to give a workflow - // a descriptive name. There is no guarantee or enforcement of uniqueness. - string display_name = 6; - - // The tasks in a workflow in a named map. The name (i.e. key) has no - // meaning and is merely a convenient way to address a specific task - // in a workflow. - map tasks = 2; - - // Output only. That status of the workflow. - State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Time when the workflow was created. - google.protobuf.Timestamp create_time = 4; - - // Time when the workflow was last updated. - google.protobuf.Timestamp last_update_time = 5; -} - -// A single task for a migration which has details about the configuration of -// the task. -message MigrationTask { - // Possible states of a migration task. - enum State { - // The state is unspecified. - STATE_UNSPECIFIED = 0; - - // The task is waiting for orchestration. - PENDING = 1; - - // The task is assigned to an orchestrator. - ORCHESTRATING = 2; - - // The task is running, i.e. its subtasks are ready for execution. - RUNNING = 3; - - // Tha task is paused. Assigned subtasks can continue, but no new subtasks - // will be scheduled. - PAUSED = 4; - - // The task finished successfully. - SUCCEEDED = 5; - - // The task finished unsuccessfully. - FAILED = 6; - } - - // The details of the task. - oneof task_details { - // Task configuration for Assessment. - AssessmentTaskDetails assessment_task_details = 12; - - // Task configuration for Batch/Offline SQL Translation. - TranslationTaskDetails translation_task_details = 13; - } - - // Output only. Immutable. The unique identifier for the migration task. The ID is server-generated. - string id = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IMMUTABLE - ]; - - // The type of the task. This must be a supported task type. - string type = 2; - - // DEPRECATED! Use one of the task_details below. - // The details of the task. The type URL must be one of the supported task - // details messages and correspond to the Task's type. - google.protobuf.Any details = 3; - - // Output only. The current state of the task. - State state = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. An explanation that may be populated when the task is in FAILED state. - google.rpc.ErrorInfo processing_error = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Time when the task was created. - google.protobuf.Timestamp create_time = 6; - - // Time when the task was last updated. - google.protobuf.Timestamp last_update_time = 7; - - // Output only. Additional information about the orchestration. - MigrationTaskOrchestrationResult orchestration_result = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; -} - -// A subtask for a migration which carries details about the configuration of -// the subtask. The content of the details should not matter to the end user, -// but is a contract between the subtask creator and subtask worker. -message MigrationSubtask { - option (google.api.resource) = { - type: "bigquerymigration.googleapis.com/MigrationSubtask" - pattern: "projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}" - }; - - // Possible states of a migration subtask. - enum State { - // The state is unspecified. - STATE_UNSPECIFIED = 0; - - // The subtask is ready, i.e. it is ready for execution. - ACTIVE = 1; - - // The subtask is running, i.e. it is assigned to a worker for execution. - RUNNING = 2; - - // The subtask finished successfully. - SUCCEEDED = 3; - - // The subtask finished unsuccessfully. - FAILED = 4; - - // The subtask is paused, i.e., it will not be scheduled. If it was already - // assigned,it might still finish but no new lease renewals will be granted. - PAUSED = 5; - } - - // Output only. Immutable. The resource name for the migration subtask. The ID is - // server-generated. - // - // Example: `projects/123/locations/us/workflows/345/subtasks/678` - string name = 1 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IMMUTABLE - ]; - - // The unique ID of the task to which this subtask belongs. - string task_id = 2; - - // The type of the Subtask. The migration service does not check whether this - // is a known type. It is up to the task creator (i.e. orchestrator or worker) - // to ensure it only creates subtasks for which there are compatible workers - // polling for Subtasks. - string type = 3; - - // Output only. The current state of the subtask. - State state = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. An explanation that may be populated when the task is in FAILED state. - google.rpc.ErrorInfo processing_error = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // Output only. Provides details to errors and issues encountered while processing the - // subtask. Presence of error details does not mean that the subtask failed. - repeated ResourceErrorDetail resource_error_details = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - - // The number or resources with errors. Note: This is not the total - // number of errors as each resource can have more than one error. - // This is used to indicate truncation by having a `resource_error_count` - // that is higher than the size of `resource_error_details`. - int32 resource_error_count = 13; - - // Time when the subtask was created. - google.protobuf.Timestamp create_time = 7; - - // Time when the subtask was last updated. - google.protobuf.Timestamp last_update_time = 8; - - // The metrics for the subtask. - repeated TimeSeries metrics = 11; -} - -// Additional information from the orchestrator when it is done with the -// task orchestration. -message MigrationTaskOrchestrationResult { - // Details specific to the task type. - oneof details { - // Details specific to assessment task types. - AssessmentOrchestrationResultDetails assessment_details = 1; - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_error_details.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_error_details.proto deleted file mode 100644 index 4800e9f887ab..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_error_details.proto +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2025 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.v2alpha; - -import "google/api/field_behavior.proto"; -import "google/rpc/error_details.proto"; - -option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2Alpha"; -option go_package = "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb"; -option java_multiple_files = true; -option java_outer_classname = "MigrationErrorDetailsProto"; -option java_package = "com.google.cloud.bigquery.migration.v2alpha"; -option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2alpha"; - -// Provides details for errors and the corresponding resources. -message ResourceErrorDetail { - // Required. Information about the resource where the error is located. - google.rpc.ResourceInfo resource_info = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The error details for the resource. - repeated ErrorDetail error_details = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. How many errors there are in total for the resource. Truncation can be - // indicated by having an `error_count` that is higher than the size of - // `error_details`. - int32 error_count = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// Provides details for errors, e.g. issues that where encountered when -// processing a subtask. -message ErrorDetail { - // Optional. The exact location within the resource (if applicable). - ErrorLocation location = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. Describes the cause of the error with structured detail. - google.rpc.ErrorInfo error_info = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// Holds information about where the error is located. -message ErrorLocation { - // Optional. If applicable, denotes the line where the error occurred. A zero value - // means that there is no line information. - int32 line = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. If applicable, denotes the column where the error occurred. A zero value - // means that there is no columns information. - int32 column = 2 [(google.api.field_behavior) = OPTIONAL]; -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_metrics.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_metrics.proto deleted file mode 100644 index 1f0d19c46bf5..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_metrics.proto +++ /dev/null @@ -1,111 +0,0 @@ -// Copyright 2025 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.v2alpha; - -import "google/api/distribution.proto"; -import "google/api/field_behavior.proto"; -import "google/api/metric.proto"; -import "google/protobuf/timestamp.proto"; - -option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2Alpha"; -option go_package = "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb"; -option java_multiple_files = true; -option java_outer_classname = "MigrationMetricsProto"; -option java_package = "com.google.cloud.bigquery.migration.v2alpha"; -option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2alpha"; - -// The metrics object for a SubTask. -message TimeSeries { - // Required. The name of the metric. - // - // If the metric is not known by the service yet, it will be auto-created. - string metric = 1 [(google.api.field_behavior) = REQUIRED]; - - // Required. The value type of the time series. - google.api.MetricDescriptor.ValueType value_type = 2 [(google.api.field_behavior) = REQUIRED]; - - // Optional. The metric kind of the time series. - // - // If present, it must be the same as the metric kind of the associated - // metric. If the associated metric's descriptor must be auto-created, then - // this field specifies the metric kind of the new descriptor and must be - // either `GAUGE` (the default) or `CUMULATIVE`. - google.api.MetricDescriptor.MetricKind metric_kind = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The data points of this time series. When listing time series, points are - // returned in reverse time order. - // - // When creating a time series, this field must contain exactly one point and - // the point's type must be the same as the value type of the associated - // metric. If the associated metric's descriptor must be auto-created, then - // the value type of the descriptor is determined by the point's type, which - // must be `BOOL`, `INT64`, `DOUBLE`, or `DISTRIBUTION`. - repeated Point points = 4 [(google.api.field_behavior) = REQUIRED]; -} - -// A single data point in a time series. -message Point { - // The time interval to which the data point applies. For `GAUGE` metrics, - // the start time does not need to be supplied, but if it is supplied, it must - // equal the end time. For `DELTA` metrics, the start and end time should - // specify a non-zero interval, with subsequent points specifying contiguous - // and non-overlapping intervals. For `CUMULATIVE` metrics, the start and end - // time should specify a non-zero interval, with subsequent points specifying - // the same start time and increasing end times, until an event resets the - // cumulative value to zero and sets a new start time for the following - // points. - TimeInterval interval = 1; - - // The value of the data point. - TypedValue value = 2; -} - -// A time interval extending just after a start time through an end time. -// If the start time is the same as the end time, then the interval -// represents a single point in time. -message TimeInterval { - // Optional. The beginning of the time interval. The default value - // for the start time is the end time. The start time must not be - // later than the end time. - google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OPTIONAL]; - - // Required. The end of the time interval. - google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// A single strongly-typed value. -message TypedValue { - // The typed value field. - oneof value { - // A Boolean value: `true` or `false`. - bool bool_value = 1; - - // A 64-bit integer. Its range is approximately +/-9.2x10^18. - int64 int64_value = 2; - - // A 64-bit double-precision floating-point number. Its magnitude - // is approximately +/-10^(+/-300) and it has 16 significant digits of - // precision. - double double_value = 3; - - // A variable-length string value. - string string_value = 4; - - // A distribution value. - google.api.Distribution distribution_value = 5; - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_service.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_service.proto deleted file mode 100644 index 573be39621fa..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/migration_service.proto +++ /dev/null @@ -1,247 +0,0 @@ -// Copyright 2025 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.v2alpha; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; -import "google/cloud/bigquery/migration/v2alpha/migration_entities.proto"; -import "google/cloud/bigquery/migration/v2alpha/migration_error_details.proto"; -import "google/cloud/bigquery/migration/v2alpha/migration_metrics.proto"; -import "google/protobuf/empty.proto"; -import "google/protobuf/field_mask.proto"; - -option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2Alpha"; -option go_package = "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb"; -option java_multiple_files = true; -option java_outer_classname = "MigrationServiceProto"; -option java_package = "com.google.cloud.bigquery.migration.v2alpha"; -option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2alpha"; - -// Service to handle EDW migrations. -service MigrationService { - option (google.api.default_host) = "bigquerymigration.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Creates a migration workflow. - rpc CreateMigrationWorkflow(CreateMigrationWorkflowRequest) returns (MigrationWorkflow) { - option (google.api.http) = { - post: "/v2alpha/{parent=projects/*/locations/*}/workflows" - body: "migration_workflow" - }; - option (google.api.method_signature) = "parent,migration_workflow"; - } - - // Gets a previously created migration workflow. - rpc GetMigrationWorkflow(GetMigrationWorkflowRequest) returns (MigrationWorkflow) { - option (google.api.http) = { - get: "/v2alpha/{name=projects/*/locations/*/workflows/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists previously created migration workflow. - rpc ListMigrationWorkflows(ListMigrationWorkflowsRequest) returns (ListMigrationWorkflowsResponse) { - option (google.api.http) = { - get: "/v2alpha/{parent=projects/*/locations/*}/workflows" - }; - option (google.api.method_signature) = "parent"; - } - - // Deletes a migration workflow by name. - rpc DeleteMigrationWorkflow(DeleteMigrationWorkflowRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - delete: "/v2alpha/{name=projects/*/locations/*/workflows/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Starts a previously created migration workflow. I.e., the state transitions - // from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. - // An error will be signaled if the state is anything other than DRAFT or - // RUNNING. - rpc StartMigrationWorkflow(StartMigrationWorkflowRequest) returns (google.protobuf.Empty) { - option (google.api.http) = { - post: "/v2alpha/{name=projects/*/locations/*/workflows/*}:start" - body: "*" - }; - option (google.api.method_signature) = "name"; - } - - // Gets a previously created migration subtask. - rpc GetMigrationSubtask(GetMigrationSubtaskRequest) returns (MigrationSubtask) { - option (google.api.http) = { - get: "/v2alpha/{name=projects/*/locations/*/workflows/*/subtasks/*}" - }; - option (google.api.method_signature) = "name"; - } - - // Lists previously created migration subtasks. - rpc ListMigrationSubtasks(ListMigrationSubtasksRequest) returns (ListMigrationSubtasksResponse) { - option (google.api.http) = { - get: "/v2alpha/{parent=projects/*/locations/*/workflows/*}/subtasks" - }; - option (google.api.method_signature) = "parent"; - } -} - -// Request to create a migration workflow resource. -message CreateMigrationWorkflowRequest { - // Required. The name of the project to which this migration workflow belongs. - // Example: `projects/foo/locations/bar` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The migration workflow to create. - MigrationWorkflow migration_workflow = 2 [(google.api.field_behavior) = REQUIRED]; -} - -// A request to get a previously created migration workflow. -message GetMigrationWorkflowRequest { - // Required. The unique identifier for the migration workflow. - // Example: `projects/123/locations/us/workflows/1234` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "bigquerymigration.googleapis.com/MigrationWorkflow" - } - ]; - - // The list of fields to be retrieved. - google.protobuf.FieldMask read_mask = 2; -} - -// A request to list previously created migration workflows. -message ListMigrationWorkflowsRequest { - // Required. The project and location of the migration workflows to list. - // Example: `projects/123/locations/us` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // The list of fields to be retrieved. - google.protobuf.FieldMask read_mask = 2; - - // The maximum number of migration workflows to return. The service may return - // fewer than this number. - int32 page_size = 3; - - // A page token, received from previous `ListMigrationWorkflows` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListMigrationWorkflows` - // must match the call that provided the page token. - string page_token = 4; -} - -// Response object for a `ListMigrationWorkflows` call. -message ListMigrationWorkflowsResponse { - // The migration workflows for the specified project / location. - repeated MigrationWorkflow migration_workflows = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} - -// A request to delete a previously created migration workflow. -message DeleteMigrationWorkflowRequest { - // Required. The unique identifier for the migration workflow. - // Example: `projects/123/locations/us/workflows/1234` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "bigquerymigration.googleapis.com/MigrationWorkflow" - } - ]; -} - -// A request to start a previously created migration workflow. -message StartMigrationWorkflowRequest { - // Required. The unique identifier for the migration workflow. - // Example: `projects/123/locations/us/workflows/1234` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "bigquerymigration.googleapis.com/MigrationWorkflow" - } - ]; -} - -// A request to get a previously created migration subtasks. -message GetMigrationSubtaskRequest { - // Required. The unique identifier for the migration subtask. - // Example: `projects/123/locations/us/workflows/1234/subtasks/543` - string name = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "bigquerymigration.googleapis.com/MigrationSubtask" - } - ]; - - // Optional. The list of fields to be retrieved. - google.protobuf.FieldMask read_mask = 2 [(google.api.field_behavior) = OPTIONAL]; -} - -// A request to list previously created migration subtasks. -message ListMigrationSubtasksRequest { - // Required. The migration task of the subtasks to list. - // Example: `projects/123/locations/us/workflows/1234` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "bigquerymigration.googleapis.com/MigrationWorkflow" - } - ]; - - // Optional. The list of fields to be retrieved. - google.protobuf.FieldMask read_mask = 2 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The maximum number of migration tasks to return. The service may return - // fewer than this number. - int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. A page token, received from previous `ListMigrationSubtasks` call. - // Provide this to retrieve the subsequent page. - // - // When paginating, all other parameters provided to `ListMigrationSubtasks` - // must match the call that provided the page token. - string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; - - // Optional. The filter to apply. This can be used to get the subtasks of a specific - // tasks in a workflow, e.g. `migration_task = "ab012"` where `"ab012"` is the - // task ID (not the name in the named map). - string filter = 5 [(google.api.field_behavior) = OPTIONAL]; -} - -// Response object for a `ListMigrationSubtasks` call. -message ListMigrationSubtasksResponse { - // The migration subtasks for the specified task. - repeated MigrationSubtask migration_subtasks = 1; - - // A token, which can be sent as `page_token` to retrieve the next page. - // If this field is omitted, there are no subsequent pages. - string next_page_token = 2; -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_service.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_service.proto deleted file mode 100644 index c40b3918b347..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_service.proto +++ /dev/null @@ -1,135 +0,0 @@ -// Copyright 2025 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.v2alpha; - -import "google/api/annotations.proto"; -import "google/api/client.proto"; -import "google/api/field_behavior.proto"; -import "google/api/resource.proto"; - -option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2Alpha"; -option go_package = "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb"; -option java_multiple_files = true; -option java_outer_classname = "TranslationServiceProto"; -option java_package = "com.google.cloud.bigquery.migration.v2alpha"; -option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2alpha"; - -// Provides other SQL dialects to GoogleSQL translation operations. -service SqlTranslationService { - option (google.api.default_host) = "bigquerymigration.googleapis.com"; - option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; - - // Translates input queries from source dialects to GoogleSQL. - rpc TranslateQuery(TranslateQueryRequest) returns (TranslateQueryResponse) { - option (google.api.http) = { - post: "/v2alpha/{parent=projects/*/locations/*}:translateQuery" - body: "*" - }; - option (google.api.method_signature) = "parent,source_dialect,query"; - } -} - -// The request of translating a SQL query to Standard SQL. -message TranslateQueryRequest { - // Supported SQL translation source dialects. - enum SqlTranslationSourceDialect { - // SqlTranslationSourceDialect not specified. - SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED = 0; - - // Teradata SQL. - TERADATA = 1; - } - - // Required. The name of the project to which this translation request belongs. - // Example: `projects/foo/locations/bar` - string parent = 1 [ - (google.api.field_behavior) = REQUIRED, - (google.api.resource_reference) = { - type: "locations.googleapis.com/Location" - } - ]; - - // Required. The source SQL dialect of `queries`. - SqlTranslationSourceDialect source_dialect = 2 [(google.api.field_behavior) = REQUIRED]; - - // Required. The query to be translated. - string query = 3 [(google.api.field_behavior) = REQUIRED]; -} - -// The response of translating a SQL query to Standard SQL. -message TranslateQueryResponse { - // Output only. Immutable. The unique identifier for the SQL translation job. - // Example: `projects/123/locations/us/translation/1234` - string translation_job = 4 [ - (google.api.field_behavior) = OUTPUT_ONLY, - (google.api.field_behavior) = IMMUTABLE - ]; - - // The translated result. This will be empty if the translation fails. - string translated_query = 1; - - // The list of errors encountered during the translation, if present. - repeated SqlTranslationError errors = 2; - - // The list of warnings encountered during the translation, if present, - // indicates non-semantically correct translation. - repeated SqlTranslationWarning warnings = 3; -} - -// Structured error object capturing the error message and the location in the -// source text where the error occurs. -message SqlTranslationErrorDetail { - // Specifies the row from the source text where the error occurred. - int64 row = 1; - - // Specifie the column from the source texts where the error occurred. - int64 column = 2; - - // A human-readable description of the error. - string message = 3; -} - -// The detailed error object if the SQL translation job fails. -message SqlTranslationError { - // The error type of the SQL translation job. - enum SqlTranslationErrorType { - // SqlTranslationErrorType not specified. - SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED = 0; - - // Failed to parse the input text as a SQL query. - SQL_PARSE_ERROR = 1; - - // Found unsupported functions in the input SQL query that are not able to - // translate. - UNSUPPORTED_SQL_FUNCTION = 2; - } - - // The type of SQL translation error. - SqlTranslationErrorType error_type = 1; - - // Specifies the details of the error, including the error message and - // location from the source text. - SqlTranslationErrorDetail error_detail = 2; -} - -// The detailed warning object if the SQL translation job is completed but not -// semantically correct. -message SqlTranslationWarning { - // Specifies the details of the warning, including the warning message and - // location from the source text. - SqlTranslationErrorDetail warning_detail = 1; -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_task.proto b/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_task.proto deleted file mode 100644 index 405ea08883e7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2alpha/translation_task.proto +++ /dev/null @@ -1,207 +0,0 @@ -// Copyright 2025 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.v2alpha; - -option csharp_namespace = "Google.Cloud.BigQuery.Migration.V2Alpha"; -option go_package = "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb"; -option java_multiple_files = true; -option java_outer_classname = "TranslationTaskProto"; -option java_package = "com.google.cloud.bigquery.migration.v2alpha"; -option php_namespace = "Google\\Cloud\\BigQuery\\Migration\\V2alpha"; - -// Mapping between an input and output file to be translated in a subtask. -message TranslationFileMapping { - // The Cloud Storage path for a file to translation in a subtask. - string input_path = 1; - - // The Cloud Storage path to write back the corresponding input file to. - string output_path = 2; -} - -// The translation task config to capture necessary settings for a translation -// task and subtask. -message TranslationTaskDetails { - // The file encoding types. - enum FileEncoding { - // File encoding setting is not specified. - FILE_ENCODING_UNSPECIFIED = 0; - - // File encoding is UTF_8. - UTF_8 = 1; - - // File encoding is ISO_8859_1. - ISO_8859_1 = 2; - - // File encoding is US_ASCII. - US_ASCII = 3; - - // File encoding is UTF_16. - UTF_16 = 4; - - // File encoding is UTF_16LE. - UTF_16LE = 5; - - // File encoding is UTF_16BE. - UTF_16BE = 6; - } - - // The special token data type. - enum TokenType { - // Token type is not specified. - TOKEN_TYPE_UNSPECIFIED = 0; - - // Token type as string. - STRING = 1; - - // Token type as integer. - INT64 = 2; - - // Token type as numeric. - NUMERIC = 3; - - // Token type as boolean. - BOOL = 4; - - // Token type as float. - FLOAT64 = 5; - - // Token type as date. - DATE = 6; - - // Token type as timestamp. - TIMESTAMP = 7; - } - - // The language specific settings for the translation task. - oneof language_options { - // The Teradata SQL specific settings for the translation task. - TeradataOptions teradata_options = 10; - - // The BTEQ specific settings for the translation task. - BteqOptions bteq_options = 11; - } - - // The Cloud Storage path for translation input files. - string input_path = 1; - - // The Cloud Storage path for translation output files. - string output_path = 2; - - // Cloud Storage files to be processed for translation. - repeated TranslationFileMapping file_paths = 12; - - // The Cloud Storage path to DDL files as table schema to assist semantic - // translation. - string schema_path = 3; - - // The file encoding type. - FileEncoding file_encoding = 4; - - // The settings for SQL identifiers. - IdentifierSettings identifier_settings = 5; - - // The map capturing special tokens to be replaced during translation. The key - // is special token in string. The value is the token data type. This is used - // to translate SQL query template which contains special token as place - // holder. The special token makes a query invalid to parse. This map will be - // applied to annotate those special token with types to let parser understand - // how to parse them into proper structure with type information. - map special_token_map = 6; - - // The filter applied to translation details. - Filter filter = 7; - - // Specifies the exact name of the bigquery table ("dataset.table") to be used - // for surfacing raw translation errors. If the table does not exist, we will - // create it. If it already exists and the schema is the same, we will re-use. - // If the table exists and the schema is different, we will throw an error. - string translation_exception_table = 13; -} - -// The filter applied to fields of translation details. -message Filter { - // The list of prefixes used to exclude processing for input files. - repeated string input_file_exclusion_prefixes = 1; -} - -// Settings related to SQL identifiers. -message IdentifierSettings { - // The identifier case type. - enum IdentifierCase { - // The identifier case is not specified. - IDENTIFIER_CASE_UNSPECIFIED = 0; - - // Identifiers' cases will be kept as the original cases. - ORIGINAL = 1; - - // Identifiers will be in upper cases. - UPPER = 2; - - // Identifiers will be in lower cases. - LOWER = 3; - } - - // The SQL identifier rewrite mode. - enum IdentifierRewriteMode { - // SQL Identifier rewrite mode is unspecified. - IDENTIFIER_REWRITE_MODE_UNSPECIFIED = 0; - - // SQL identifiers won't be rewrite. - NONE = 1; - - // All SQL identifiers will be rewrite. - REWRITE_ALL = 2; - } - - // The setting to control output queries' identifier case. - IdentifierCase output_identifier_case = 1; - - // Specifies the rewrite mode for SQL identifiers. - IdentifierRewriteMode identifier_rewrite_mode = 2; -} - -// Teradata SQL specific translation task related settings. -message TeradataOptions { - -} - -// BTEQ translation task related settings. -message BteqOptions { - // Specifies the project and dataset in BigQuery that will be used for - // external table creation during the translation. - DatasetReference project_dataset = 1; - - // The Cloud Storage location to be used as the default path for files that - // are not otherwise specified in the file replacement map. - string default_path_uri = 2; - - // Maps the local paths that are used in BTEQ scripts (the keys) to the paths - // in Cloud Storage that should be used in their stead in the translation (the - // value). - map file_replacement_map = 3; -} - -// Reference to a BigQuery dataset. -message DatasetReference { - // A unique ID for this dataset, without the project name. The ID - // must contain only letters (a-z, A-Z), numbers (0-9), or underscores (_). - // The maximum length is 1,024 characters. - string dataset_id = 1; - - // The ID of the project containing this dataset. - string project_id = 2; -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.d.ts b/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.d.ts deleted file mode 100644 index 4d0e9970c82e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.d.ts +++ /dev/null @@ -1,20596 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -import type {protobuf as $protobuf} from "google-gax"; -import Long = require("long"); -/** Namespace google. */ -export namespace google { - - /** Namespace cloud. */ - namespace cloud { - - /** Namespace bigquery. */ - namespace bigquery { - - /** Namespace migration. */ - namespace migration { - - /** Namespace v2. */ - namespace v2 { - - /** Properties of an AssessmentTaskDetails. */ - interface IAssessmentTaskDetails { - - /** AssessmentTaskDetails inputPath */ - inputPath?: (string|null); - - /** AssessmentTaskDetails outputDataset */ - outputDataset?: (string|null); - - /** AssessmentTaskDetails querylogsPath */ - querylogsPath?: (string|null); - - /** AssessmentTaskDetails dataSource */ - dataSource?: (string|null); - - /** AssessmentTaskDetails featureHandle */ - featureHandle?: (google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null); - } - - /** Represents an AssessmentTaskDetails. */ - class AssessmentTaskDetails implements IAssessmentTaskDetails { - - /** - * Constructs a new AssessmentTaskDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails); - - /** AssessmentTaskDetails inputPath. */ - public inputPath: string; - - /** AssessmentTaskDetails outputDataset. */ - public outputDataset: string; - - /** AssessmentTaskDetails querylogsPath. */ - public querylogsPath: string; - - /** AssessmentTaskDetails dataSource. */ - public dataSource: string; - - /** AssessmentTaskDetails featureHandle. */ - public featureHandle?: (google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null); - - /** - * Creates a new AssessmentTaskDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns AssessmentTaskDetails instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; - - /** - * Encodes the specified AssessmentTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. - * @param message AssessmentTaskDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AssessmentTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. - * @param message AssessmentTaskDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AssessmentTaskDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AssessmentTaskDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; - - /** - * Decodes an AssessmentTaskDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AssessmentTaskDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; - - /** - * Verifies an AssessmentTaskDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AssessmentTaskDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AssessmentTaskDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; - - /** - * Creates a plain object from an AssessmentTaskDetails message. Also converts values to other types if specified. - * @param message AssessmentTaskDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.AssessmentTaskDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AssessmentTaskDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AssessmentTaskDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AssessmentFeatureHandle. */ - interface IAssessmentFeatureHandle { - - /** AssessmentFeatureHandle addShareableDataset */ - addShareableDataset?: (boolean|null); - } - - /** Represents an AssessmentFeatureHandle. */ - class AssessmentFeatureHandle implements IAssessmentFeatureHandle { - - /** - * Constructs a new AssessmentFeatureHandle. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle); - - /** AssessmentFeatureHandle addShareableDataset. */ - public addShareableDataset?: (boolean|null); - - /** - * Creates a new AssessmentFeatureHandle instance using the specified properties. - * @param [properties] Properties to set - * @returns AssessmentFeatureHandle instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; - - /** - * Encodes the specified AssessmentFeatureHandle message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. - * @param message AssessmentFeatureHandle message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AssessmentFeatureHandle message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. - * @param message AssessmentFeatureHandle message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AssessmentFeatureHandle message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AssessmentFeatureHandle - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; - - /** - * Decodes an AssessmentFeatureHandle message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AssessmentFeatureHandle - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; - - /** - * Verifies an AssessmentFeatureHandle message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AssessmentFeatureHandle message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AssessmentFeatureHandle - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; - - /** - * Creates a plain object from an AssessmentFeatureHandle message. Also converts values to other types if specified. - * @param message AssessmentFeatureHandle - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.AssessmentFeatureHandle, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AssessmentFeatureHandle to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AssessmentFeatureHandle - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MigrationWorkflow. */ - interface IMigrationWorkflow { - - /** MigrationWorkflow name */ - name?: (string|null); - - /** MigrationWorkflow displayName */ - displayName?: (string|null); - - /** MigrationWorkflow tasks */ - tasks?: ({ [k: string]: google.cloud.bigquery.migration.v2.IMigrationTask }|null); - - /** MigrationWorkflow state */ - state?: (google.cloud.bigquery.migration.v2.MigrationWorkflow.State|keyof typeof google.cloud.bigquery.migration.v2.MigrationWorkflow.State|null); - - /** MigrationWorkflow createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** MigrationWorkflow lastUpdateTime */ - lastUpdateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a MigrationWorkflow. */ - class MigrationWorkflow implements IMigrationWorkflow { - - /** - * Constructs a new MigrationWorkflow. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IMigrationWorkflow); - - /** MigrationWorkflow name. */ - public name: string; - - /** MigrationWorkflow displayName. */ - public displayName: string; - - /** MigrationWorkflow tasks. */ - public tasks: { [k: string]: google.cloud.bigquery.migration.v2.IMigrationTask }; - - /** MigrationWorkflow state. */ - public state: (google.cloud.bigquery.migration.v2.MigrationWorkflow.State|keyof typeof google.cloud.bigquery.migration.v2.MigrationWorkflow.State); - - /** MigrationWorkflow createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** MigrationWorkflow lastUpdateTime. */ - public lastUpdateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new MigrationWorkflow instance using the specified properties. - * @param [properties] Properties to set - * @returns MigrationWorkflow instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IMigrationWorkflow): google.cloud.bigquery.migration.v2.MigrationWorkflow; - - /** - * Encodes the specified MigrationWorkflow message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. - * @param message MigrationWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IMigrationWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MigrationWorkflow message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. - * @param message MigrationWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IMigrationWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MigrationWorkflow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MigrationWorkflow - * @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.MigrationWorkflow; - - /** - * Decodes a MigrationWorkflow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MigrationWorkflow - * @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.MigrationWorkflow; - - /** - * Verifies a MigrationWorkflow 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 MigrationWorkflow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MigrationWorkflow - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.MigrationWorkflow; - - /** - * Creates a plain object from a MigrationWorkflow message. Also converts values to other types if specified. - * @param message MigrationWorkflow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.MigrationWorkflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MigrationWorkflow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MigrationWorkflow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MigrationWorkflow { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - DRAFT = 1, - RUNNING = 2, - PAUSED = 3, - COMPLETED = 4 - } - } - - /** Properties of a MigrationTask. */ - interface IMigrationTask { - - /** MigrationTask assessmentTaskDetails */ - assessmentTaskDetails?: (google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null); - - /** MigrationTask translationConfigDetails */ - translationConfigDetails?: (google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null); - - /** MigrationTask translationDetails */ - translationDetails?: (google.cloud.bigquery.migration.v2.ITranslationDetails|null); - - /** MigrationTask id */ - id?: (string|null); - - /** MigrationTask type */ - type?: (string|null); - - /** MigrationTask state */ - state?: (google.cloud.bigquery.migration.v2.MigrationTask.State|keyof typeof google.cloud.bigquery.migration.v2.MigrationTask.State|null); - - /** MigrationTask processingError */ - processingError?: (google.rpc.IErrorInfo|null); - - /** MigrationTask createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** 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. */ - class MigrationTask implements IMigrationTask { - - /** - * Constructs a new MigrationTask. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IMigrationTask); - - /** MigrationTask assessmentTaskDetails. */ - public assessmentTaskDetails?: (google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null); - - /** MigrationTask translationConfigDetails. */ - public translationConfigDetails?: (google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null); - - /** MigrationTask translationDetails. */ - public translationDetails?: (google.cloud.bigquery.migration.v2.ITranslationDetails|null); - - /** MigrationTask id. */ - public id: string; - - /** MigrationTask type. */ - public type: string; - - /** MigrationTask state. */ - public state: (google.cloud.bigquery.migration.v2.MigrationTask.State|keyof typeof google.cloud.bigquery.migration.v2.MigrationTask.State); - - /** MigrationTask processingError. */ - public processingError?: (google.rpc.IErrorInfo|null); - - /** MigrationTask createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** 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?: ("assessmentTaskDetails"|"translationConfigDetails"|"translationDetails"); - - /** - * Creates a new MigrationTask instance using the specified properties. - * @param [properties] Properties to set - * @returns MigrationTask instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IMigrationTask): google.cloud.bigquery.migration.v2.MigrationTask; - - /** - * Encodes the specified MigrationTask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. - * @param message MigrationTask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IMigrationTask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MigrationTask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. - * @param message MigrationTask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IMigrationTask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MigrationTask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MigrationTask - * @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.MigrationTask; - - /** - * Decodes a MigrationTask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MigrationTask - * @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.MigrationTask; - - /** - * Verifies a MigrationTask 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 MigrationTask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MigrationTask - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.MigrationTask; - - /** - * Creates a plain object from a MigrationTask message. Also converts values to other types if specified. - * @param message MigrationTask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.MigrationTask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MigrationTask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MigrationTask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MigrationTask { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - PENDING = 1, - ORCHESTRATING = 2, - RUNNING = 3, - PAUSED = 4, - SUCCEEDED = 5, - FAILED = 6 - } - } - - /** Properties of a MigrationSubtask. */ - interface IMigrationSubtask { - - /** MigrationSubtask name */ - name?: (string|null); - - /** MigrationSubtask taskId */ - taskId?: (string|null); - - /** MigrationSubtask type */ - type?: (string|null); - - /** MigrationSubtask state */ - state?: (google.cloud.bigquery.migration.v2.MigrationSubtask.State|keyof typeof google.cloud.bigquery.migration.v2.MigrationSubtask.State|null); - - /** MigrationSubtask processingError */ - processingError?: (google.rpc.IErrorInfo|null); - - /** MigrationSubtask resourceErrorDetails */ - resourceErrorDetails?: (google.cloud.bigquery.migration.v2.IResourceErrorDetail[]|null); - - /** MigrationSubtask resourceErrorCount */ - resourceErrorCount?: (number|null); - - /** MigrationSubtask createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** MigrationSubtask lastUpdateTime */ - lastUpdateTime?: (google.protobuf.ITimestamp|null); - - /** MigrationSubtask metrics */ - metrics?: (google.cloud.bigquery.migration.v2.ITimeSeries[]|null); - } - - /** Represents a MigrationSubtask. */ - class MigrationSubtask implements IMigrationSubtask { - - /** - * Constructs a new MigrationSubtask. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IMigrationSubtask); - - /** MigrationSubtask name. */ - public name: string; - - /** MigrationSubtask taskId. */ - public taskId: string; - - /** MigrationSubtask type. */ - public type: string; - - /** MigrationSubtask state. */ - public state: (google.cloud.bigquery.migration.v2.MigrationSubtask.State|keyof typeof google.cloud.bigquery.migration.v2.MigrationSubtask.State); - - /** MigrationSubtask processingError. */ - public processingError?: (google.rpc.IErrorInfo|null); - - /** MigrationSubtask resourceErrorDetails. */ - public resourceErrorDetails: google.cloud.bigquery.migration.v2.IResourceErrorDetail[]; - - /** MigrationSubtask resourceErrorCount. */ - public resourceErrorCount: number; - - /** MigrationSubtask createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** MigrationSubtask lastUpdateTime. */ - public lastUpdateTime?: (google.protobuf.ITimestamp|null); - - /** MigrationSubtask metrics. */ - public metrics: google.cloud.bigquery.migration.v2.ITimeSeries[]; - - /** - * Creates a new MigrationSubtask instance using the specified properties. - * @param [properties] Properties to set - * @returns MigrationSubtask instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IMigrationSubtask): google.cloud.bigquery.migration.v2.MigrationSubtask; - - /** - * Encodes the specified MigrationSubtask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. - * @param message MigrationSubtask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IMigrationSubtask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MigrationSubtask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. - * @param message MigrationSubtask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IMigrationSubtask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MigrationSubtask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MigrationSubtask - * @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.MigrationSubtask; - - /** - * Decodes a MigrationSubtask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MigrationSubtask - * @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.MigrationSubtask; - - /** - * Verifies a MigrationSubtask 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 MigrationSubtask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MigrationSubtask - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.MigrationSubtask; - - /** - * Creates a plain object from a MigrationSubtask message. Also converts values to other types if specified. - * @param message MigrationSubtask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.MigrationSubtask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MigrationSubtask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MigrationSubtask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MigrationSubtask { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - RUNNING = 2, - SUCCEEDED = 3, - FAILED = 4, - PAUSED = 5, - PENDING_DEPENDENCY = 6 - } - } - - /** 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); - - /** TranslationTaskResult consoleUri */ - consoleUri?: (string|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[]; - - /** TranslationTaskResult consoleUri. */ - public consoleUri: string; - - /** - * 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 { - - /** ResourceErrorDetail resourceInfo */ - resourceInfo?: (google.rpc.IResourceInfo|null); - - /** ResourceErrorDetail errorDetails */ - errorDetails?: (google.cloud.bigquery.migration.v2.IErrorDetail[]|null); - - /** ResourceErrorDetail errorCount */ - errorCount?: (number|null); - } - - /** Represents a ResourceErrorDetail. */ - class ResourceErrorDetail implements IResourceErrorDetail { - - /** - * Constructs a new ResourceErrorDetail. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IResourceErrorDetail); - - /** ResourceErrorDetail resourceInfo. */ - public resourceInfo?: (google.rpc.IResourceInfo|null); - - /** ResourceErrorDetail errorDetails. */ - public errorDetails: google.cloud.bigquery.migration.v2.IErrorDetail[]; - - /** ResourceErrorDetail errorCount. */ - public errorCount: number; - - /** - * Creates a new ResourceErrorDetail instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceErrorDetail instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IResourceErrorDetail): google.cloud.bigquery.migration.v2.ResourceErrorDetail; - - /** - * Encodes the specified ResourceErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify|verify} messages. - * @param message ResourceErrorDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IResourceErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify|verify} messages. - * @param message ResourceErrorDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IResourceErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceErrorDetail message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceErrorDetail - * @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.ResourceErrorDetail; - - /** - * Decodes a ResourceErrorDetail message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceErrorDetail - * @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.ResourceErrorDetail; - - /** - * Verifies a ResourceErrorDetail 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 ResourceErrorDetail message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceErrorDetail - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ResourceErrorDetail; - - /** - * Creates a plain object from a ResourceErrorDetail message. Also converts values to other types if specified. - * @param message ResourceErrorDetail - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.ResourceErrorDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceErrorDetail to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceErrorDetail - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ErrorDetail. */ - interface IErrorDetail { - - /** ErrorDetail location */ - location?: (google.cloud.bigquery.migration.v2.IErrorLocation|null); - - /** ErrorDetail errorInfo */ - errorInfo?: (google.rpc.IErrorInfo|null); - } - - /** Represents an ErrorDetail. */ - class ErrorDetail implements IErrorDetail { - - /** - * Constructs a new ErrorDetail. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IErrorDetail); - - /** ErrorDetail location. */ - public location?: (google.cloud.bigquery.migration.v2.IErrorLocation|null); - - /** ErrorDetail errorInfo. */ - public errorInfo?: (google.rpc.IErrorInfo|null); - - /** - * Creates a new ErrorDetail instance using the specified properties. - * @param [properties] Properties to set - * @returns ErrorDetail instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IErrorDetail): google.cloud.bigquery.migration.v2.ErrorDetail; - - /** - * Encodes the specified ErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. - * @param message ErrorDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. - * @param message ErrorDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ErrorDetail message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ErrorDetail - * @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.ErrorDetail; - - /** - * Decodes an ErrorDetail message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ErrorDetail - * @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.ErrorDetail; - - /** - * Verifies an ErrorDetail 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 ErrorDetail message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ErrorDetail - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ErrorDetail; - - /** - * Creates a plain object from an ErrorDetail message. Also converts values to other types if specified. - * @param message ErrorDetail - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.ErrorDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ErrorDetail to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ErrorDetail - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ErrorLocation. */ - interface IErrorLocation { - - /** ErrorLocation line */ - line?: (number|null); - - /** ErrorLocation column */ - column?: (number|null); - } - - /** Represents an ErrorLocation. */ - class ErrorLocation implements IErrorLocation { - - /** - * Constructs a new ErrorLocation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IErrorLocation); - - /** ErrorLocation line. */ - public line: number; - - /** ErrorLocation column. */ - public column: number; - - /** - * Creates a new ErrorLocation instance using the specified properties. - * @param [properties] Properties to set - * @returns ErrorLocation instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IErrorLocation): google.cloud.bigquery.migration.v2.ErrorLocation; - - /** - * Encodes the specified ErrorLocation message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorLocation.verify|verify} messages. - * @param message ErrorLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IErrorLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ErrorLocation message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorLocation.verify|verify} messages. - * @param message ErrorLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IErrorLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ErrorLocation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ErrorLocation - * @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.ErrorLocation; - - /** - * Decodes an ErrorLocation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ErrorLocation - * @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.ErrorLocation; - - /** - * Verifies an ErrorLocation 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 ErrorLocation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ErrorLocation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ErrorLocation; - - /** - * Creates a plain object from an ErrorLocation message. Also converts values to other types if specified. - * @param message ErrorLocation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.ErrorLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ErrorLocation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ErrorLocation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TimeSeries. */ - interface ITimeSeries { - - /** TimeSeries metric */ - metric?: (string|null); - - /** TimeSeries valueType */ - valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); - - /** TimeSeries metricKind */ - metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); - - /** TimeSeries points */ - points?: (google.cloud.bigquery.migration.v2.IPoint[]|null); - } - - /** Represents a TimeSeries. */ - class TimeSeries implements ITimeSeries { - - /** - * Constructs a new TimeSeries. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.ITimeSeries); - - /** TimeSeries metric. */ - public metric: string; - - /** TimeSeries valueType. */ - public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); - - /** TimeSeries metricKind. */ - public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); - - /** TimeSeries points. */ - public points: google.cloud.bigquery.migration.v2.IPoint[]; - - /** - * Creates a new TimeSeries instance using the specified properties. - * @param [properties] Properties to set - * @returns TimeSeries instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.ITimeSeries): google.cloud.bigquery.migration.v2.TimeSeries; - - /** - * Encodes the specified TimeSeries message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeSeries.verify|verify} messages. - * @param message TimeSeries message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeSeries.verify|verify} messages. - * @param message TimeSeries message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimeSeries message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimeSeries - * @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.TimeSeries; - - /** - * Decodes a TimeSeries message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimeSeries - * @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.TimeSeries; - - /** - * Verifies a TimeSeries 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 TimeSeries message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimeSeries - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.TimeSeries; - - /** - * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. - * @param message TimeSeries - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.TimeSeries, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimeSeries to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TimeSeries - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Point. */ - interface IPoint { - - /** Point interval */ - interval?: (google.cloud.bigquery.migration.v2.ITimeInterval|null); - - /** Point value */ - value?: (google.cloud.bigquery.migration.v2.ITypedValue|null); - } - - /** Represents a Point. */ - class Point implements IPoint { - - /** - * Constructs a new Point. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IPoint); - - /** Point interval. */ - public interval?: (google.cloud.bigquery.migration.v2.ITimeInterval|null); - - /** Point value. */ - public value?: (google.cloud.bigquery.migration.v2.ITypedValue|null); - - /** - * Creates a new Point instance using the specified properties. - * @param [properties] Properties to set - * @returns Point instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IPoint): google.cloud.bigquery.migration.v2.Point; - - /** - * Encodes the specified Point message. Does not implicitly {@link google.cloud.bigquery.migration.v2.Point.verify|verify} messages. - * @param message Point message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Point message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.Point.verify|verify} messages. - * @param message Point message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Point message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Point - * @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.Point; - - /** - * Decodes a Point message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Point - * @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.Point; - - /** - * Verifies a Point 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 Point message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Point - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.Point; - - /** - * Creates a plain object from a Point message. Also converts values to other types if specified. - * @param message Point - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.Point, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Point to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Point - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TimeInterval. */ - interface ITimeInterval { - - /** TimeInterval startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** TimeInterval endTime */ - endTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a TimeInterval. */ - class TimeInterval implements ITimeInterval { - - /** - * Constructs a new TimeInterval. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.ITimeInterval); - - /** TimeInterval startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** TimeInterval endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new TimeInterval instance using the specified properties. - * @param [properties] Properties to set - * @returns TimeInterval instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.ITimeInterval): google.cloud.bigquery.migration.v2.TimeInterval; - - /** - * Encodes the specified TimeInterval message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeInterval.verify|verify} messages. - * @param message TimeInterval message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.ITimeInterval, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimeInterval message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TimeInterval.verify|verify} messages. - * @param message TimeInterval message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ITimeInterval, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimeInterval message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimeInterval - * @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.TimeInterval; - - /** - * Decodes a TimeInterval message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimeInterval - * @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.TimeInterval; - - /** - * Verifies a TimeInterval 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 TimeInterval message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimeInterval - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.TimeInterval; - - /** - * Creates a plain object from a TimeInterval message. Also converts values to other types if specified. - * @param message TimeInterval - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.TimeInterval, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimeInterval to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TimeInterval - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TypedValue. */ - interface ITypedValue { - - /** TypedValue boolValue */ - boolValue?: (boolean|null); - - /** TypedValue int64Value */ - int64Value?: (number|Long|string|null); - - /** TypedValue doubleValue */ - doubleValue?: (number|null); - - /** TypedValue stringValue */ - stringValue?: (string|null); - - /** TypedValue distributionValue */ - distributionValue?: (google.api.IDistribution|null); - } - - /** Represents a TypedValue. */ - class TypedValue implements ITypedValue { - - /** - * Constructs a new TypedValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.ITypedValue); - - /** TypedValue boolValue. */ - public boolValue?: (boolean|null); - - /** TypedValue int64Value. */ - public int64Value?: (number|Long|string|null); - - /** TypedValue doubleValue. */ - public doubleValue?: (number|null); - - /** TypedValue stringValue. */ - public stringValue?: (string|null); - - /** TypedValue distributionValue. */ - public distributionValue?: (google.api.IDistribution|null); - - /** TypedValue value. */ - public value?: ("boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"); - - /** - * Creates a new TypedValue instance using the specified properties. - * @param [properties] Properties to set - * @returns TypedValue instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.ITypedValue): google.cloud.bigquery.migration.v2.TypedValue; - - /** - * Encodes the specified TypedValue message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TypedValue.verify|verify} messages. - * @param message TypedValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.ITypedValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TypedValue message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TypedValue.verify|verify} messages. - * @param message TypedValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ITypedValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TypedValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TypedValue - * @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.TypedValue; - - /** - * Decodes a TypedValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TypedValue - * @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.TypedValue; - - /** - * Verifies a TypedValue 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 TypedValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TypedValue - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.TypedValue; - - /** - * Creates a plain object from a TypedValue message. Also converts values to other types if specified. - * @param message TypedValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.TypedValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TypedValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TypedValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TranslationConfigDetails. */ - interface ITranslationConfigDetails { - - /** TranslationConfigDetails gcsSourcePath */ - gcsSourcePath?: (string|null); - - /** TranslationConfigDetails gcsTargetPath */ - gcsTargetPath?: (string|null); - - /** TranslationConfigDetails nameMappingList */ - nameMappingList?: (google.cloud.bigquery.migration.v2.IObjectNameMappingList|null); - - /** TranslationConfigDetails sourceDialect */ - sourceDialect?: (google.cloud.bigquery.migration.v2.IDialect|null); - - /** TranslationConfigDetails targetDialect */ - targetDialect?: (google.cloud.bigquery.migration.v2.IDialect|null); - - /** TranslationConfigDetails sourceEnv */ - sourceEnv?: (google.cloud.bigquery.migration.v2.ISourceEnv|null); - - /** TranslationConfigDetails requestSource */ - requestSource?: (string|null); - - /** TranslationConfigDetails targetTypes */ - targetTypes?: (string[]|null); - } - - /** Represents a TranslationConfigDetails. */ - class TranslationConfigDetails implements ITranslationConfigDetails { - - /** - * Constructs a new TranslationConfigDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.ITranslationConfigDetails); - - /** TranslationConfigDetails gcsSourcePath. */ - public gcsSourcePath?: (string|null); - - /** TranslationConfigDetails gcsTargetPath. */ - public gcsTargetPath?: (string|null); - - /** TranslationConfigDetails nameMappingList. */ - public nameMappingList?: (google.cloud.bigquery.migration.v2.IObjectNameMappingList|null); - - /** TranslationConfigDetails sourceDialect. */ - public sourceDialect?: (google.cloud.bigquery.migration.v2.IDialect|null); - - /** TranslationConfigDetails targetDialect. */ - public targetDialect?: (google.cloud.bigquery.migration.v2.IDialect|null); - - /** TranslationConfigDetails sourceEnv. */ - public sourceEnv?: (google.cloud.bigquery.migration.v2.ISourceEnv|null); - - /** TranslationConfigDetails requestSource. */ - public requestSource: string; - - /** TranslationConfigDetails targetTypes. */ - public targetTypes: string[]; - - /** TranslationConfigDetails sourceLocation. */ - public sourceLocation?: "gcsSourcePath"; - - /** TranslationConfigDetails targetLocation. */ - public targetLocation?: "gcsTargetPath"; - - /** TranslationConfigDetails outputNameMapping. */ - public outputNameMapping?: "nameMappingList"; - - /** - * Creates a new TranslationConfigDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns TranslationConfigDetails instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.ITranslationConfigDetails): google.cloud.bigquery.migration.v2.TranslationConfigDetails; - - /** - * Encodes the specified TranslationConfigDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationConfigDetails.verify|verify} messages. - * @param message TranslationConfigDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.ITranslationConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TranslationConfigDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationConfigDetails.verify|verify} messages. - * @param message TranslationConfigDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ITranslationConfigDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TranslationConfigDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TranslationConfigDetails - * @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.TranslationConfigDetails; - - /** - * Decodes a TranslationConfigDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TranslationConfigDetails - * @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.TranslationConfigDetails; - - /** - * Verifies a TranslationConfigDetails 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 TranslationConfigDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TranslationConfigDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.TranslationConfigDetails; - - /** - * Creates a plain object from a TranslationConfigDetails message. Also converts values to other types if specified. - * @param message TranslationConfigDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.TranslationConfigDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TranslationConfigDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TranslationConfigDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Dialect. */ - interface IDialect { - - /** Dialect bigqueryDialect */ - bigqueryDialect?: (google.cloud.bigquery.migration.v2.IBigQueryDialect|null); - - /** Dialect hiveqlDialect */ - hiveqlDialect?: (google.cloud.bigquery.migration.v2.IHiveQLDialect|null); - - /** Dialect redshiftDialect */ - redshiftDialect?: (google.cloud.bigquery.migration.v2.IRedshiftDialect|null); - - /** Dialect teradataDialect */ - teradataDialect?: (google.cloud.bigquery.migration.v2.ITeradataDialect|null); - - /** Dialect oracleDialect */ - oracleDialect?: (google.cloud.bigquery.migration.v2.IOracleDialect|null); - - /** Dialect sparksqlDialect */ - sparksqlDialect?: (google.cloud.bigquery.migration.v2.ISparkSQLDialect|null); - - /** Dialect snowflakeDialect */ - snowflakeDialect?: (google.cloud.bigquery.migration.v2.ISnowflakeDialect|null); - - /** Dialect netezzaDialect */ - netezzaDialect?: (google.cloud.bigquery.migration.v2.INetezzaDialect|null); - - /** Dialect azureSynapseDialect */ - azureSynapseDialect?: (google.cloud.bigquery.migration.v2.IAzureSynapseDialect|null); - - /** Dialect verticaDialect */ - verticaDialect?: (google.cloud.bigquery.migration.v2.IVerticaDialect|null); - - /** Dialect sqlServerDialect */ - sqlServerDialect?: (google.cloud.bigquery.migration.v2.ISQLServerDialect|null); - - /** Dialect postgresqlDialect */ - postgresqlDialect?: (google.cloud.bigquery.migration.v2.IPostgresqlDialect|null); - - /** Dialect prestoDialect */ - prestoDialect?: (google.cloud.bigquery.migration.v2.IPrestoDialect|null); - - /** 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. */ - class Dialect implements IDialect { - - /** - * Constructs a new Dialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IDialect); - - /** Dialect bigqueryDialect. */ - public bigqueryDialect?: (google.cloud.bigquery.migration.v2.IBigQueryDialect|null); - - /** Dialect hiveqlDialect. */ - public hiveqlDialect?: (google.cloud.bigquery.migration.v2.IHiveQLDialect|null); - - /** Dialect redshiftDialect. */ - public redshiftDialect?: (google.cloud.bigquery.migration.v2.IRedshiftDialect|null); - - /** Dialect teradataDialect. */ - public teradataDialect?: (google.cloud.bigquery.migration.v2.ITeradataDialect|null); - - /** Dialect oracleDialect. */ - public oracleDialect?: (google.cloud.bigquery.migration.v2.IOracleDialect|null); - - /** Dialect sparksqlDialect. */ - public sparksqlDialect?: (google.cloud.bigquery.migration.v2.ISparkSQLDialect|null); - - /** Dialect snowflakeDialect. */ - public snowflakeDialect?: (google.cloud.bigquery.migration.v2.ISnowflakeDialect|null); - - /** Dialect netezzaDialect. */ - public netezzaDialect?: (google.cloud.bigquery.migration.v2.INetezzaDialect|null); - - /** Dialect azureSynapseDialect. */ - public azureSynapseDialect?: (google.cloud.bigquery.migration.v2.IAzureSynapseDialect|null); - - /** Dialect verticaDialect. */ - public verticaDialect?: (google.cloud.bigquery.migration.v2.IVerticaDialect|null); - - /** Dialect sqlServerDialect. */ - public sqlServerDialect?: (google.cloud.bigquery.migration.v2.ISQLServerDialect|null); - - /** Dialect postgresqlDialect. */ - public postgresqlDialect?: (google.cloud.bigquery.migration.v2.IPostgresqlDialect|null); - - /** Dialect prestoDialect. */ - public prestoDialect?: (google.cloud.bigquery.migration.v2.IPrestoDialect|null); - - /** 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"|"db2Dialect"|"sqliteDialect"|"greenplumDialect"); - - /** - * Creates a new Dialect instance using the specified properties. - * @param [properties] Properties to set - * @returns Dialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IDialect): google.cloud.bigquery.migration.v2.Dialect; - - /** - * Encodes the specified Dialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.Dialect.verify|verify} messages. - * @param message Dialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Dialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.Dialect.verify|verify} messages. - * @param message Dialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Dialect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Dialect - * @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.Dialect; - - /** - * Decodes a Dialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Dialect - * @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.Dialect; - - /** - * Verifies a Dialect 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 Dialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Dialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.Dialect; - - /** - * Creates a plain object from a Dialect message. Also converts values to other types if specified. - * @param message Dialect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.Dialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Dialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Dialect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BigQueryDialect. */ - interface IBigQueryDialect { - } - - /** Represents a BigQueryDialect. */ - class BigQueryDialect implements IBigQueryDialect { - - /** - * Constructs a new BigQueryDialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IBigQueryDialect); - - /** - * Creates a new BigQueryDialect instance using the specified properties. - * @param [properties] Properties to set - * @returns BigQueryDialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IBigQueryDialect): google.cloud.bigquery.migration.v2.BigQueryDialect; - - /** - * Encodes the specified BigQueryDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.BigQueryDialect.verify|verify} messages. - * @param message BigQueryDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IBigQueryDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BigQueryDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.BigQueryDialect.verify|verify} messages. - * @param message BigQueryDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IBigQueryDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BigQueryDialect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BigQueryDialect - * @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.BigQueryDialect; - - /** - * Decodes a BigQueryDialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BigQueryDialect - * @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.BigQueryDialect; - - /** - * Verifies a BigQueryDialect 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 BigQueryDialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BigQueryDialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.BigQueryDialect; - - /** - * Creates a plain object from a BigQueryDialect message. Also converts values to other types if specified. - * @param message BigQueryDialect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.BigQueryDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BigQueryDialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BigQueryDialect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HiveQLDialect. */ - interface IHiveQLDialect { - } - - /** Represents a HiveQLDialect. */ - class HiveQLDialect implements IHiveQLDialect { - - /** - * Constructs a new HiveQLDialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IHiveQLDialect); - - /** - * Creates a new HiveQLDialect instance using the specified properties. - * @param [properties] Properties to set - * @returns HiveQLDialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IHiveQLDialect): google.cloud.bigquery.migration.v2.HiveQLDialect; - - /** - * Encodes the specified HiveQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. - * @param message HiveQLDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IHiveQLDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HiveQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. - * @param message HiveQLDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IHiveQLDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HiveQLDialect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HiveQLDialect - * @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.HiveQLDialect; - - /** - * Decodes a HiveQLDialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HiveQLDialect - * @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.HiveQLDialect; - - /** - * Verifies a HiveQLDialect 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 HiveQLDialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HiveQLDialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.HiveQLDialect; - - /** - * Creates a plain object from a HiveQLDialect message. Also converts values to other types if specified. - * @param message HiveQLDialect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.HiveQLDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HiveQLDialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HiveQLDialect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RedshiftDialect. */ - interface IRedshiftDialect { - } - - /** Represents a RedshiftDialect. */ - class RedshiftDialect implements IRedshiftDialect { - - /** - * Constructs a new RedshiftDialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IRedshiftDialect); - - /** - * Creates a new RedshiftDialect instance using the specified properties. - * @param [properties] Properties to set - * @returns RedshiftDialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IRedshiftDialect): google.cloud.bigquery.migration.v2.RedshiftDialect; - - /** - * Encodes the specified RedshiftDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.RedshiftDialect.verify|verify} messages. - * @param message RedshiftDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IRedshiftDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RedshiftDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.RedshiftDialect.verify|verify} messages. - * @param message RedshiftDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IRedshiftDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RedshiftDialect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RedshiftDialect - * @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.RedshiftDialect; - - /** - * Decodes a RedshiftDialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RedshiftDialect - * @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.RedshiftDialect; - - /** - * Verifies a RedshiftDialect 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 RedshiftDialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RedshiftDialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.RedshiftDialect; - - /** - * Creates a plain object from a RedshiftDialect message. Also converts values to other types if specified. - * @param message RedshiftDialect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.RedshiftDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RedshiftDialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RedshiftDialect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TeradataDialect. */ - interface ITeradataDialect { - - /** TeradataDialect mode */ - mode?: (google.cloud.bigquery.migration.v2.TeradataDialect.Mode|keyof typeof google.cloud.bigquery.migration.v2.TeradataDialect.Mode|null); - } - - /** Represents a TeradataDialect. */ - class TeradataDialect implements ITeradataDialect { - - /** - * Constructs a new TeradataDialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.ITeradataDialect); - - /** TeradataDialect mode. */ - public mode: (google.cloud.bigquery.migration.v2.TeradataDialect.Mode|keyof typeof google.cloud.bigquery.migration.v2.TeradataDialect.Mode); - - /** - * Creates a new TeradataDialect instance using the specified properties. - * @param [properties] Properties to set - * @returns TeradataDialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.ITeradataDialect): google.cloud.bigquery.migration.v2.TeradataDialect; - - /** - * Encodes the specified TeradataDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TeradataDialect.verify|verify} messages. - * @param message TeradataDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.ITeradataDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TeradataDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TeradataDialect.verify|verify} messages. - * @param message TeradataDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ITeradataDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TeradataDialect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TeradataDialect - * @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.TeradataDialect; - - /** - * Decodes a TeradataDialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TeradataDialect - * @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.TeradataDialect; - - /** - * Verifies a TeradataDialect 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 TeradataDialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TeradataDialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.TeradataDialect; - - /** - * Creates a plain object from a TeradataDialect message. Also converts values to other types if specified. - * @param message TeradataDialect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.TeradataDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TeradataDialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TeradataDialect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace TeradataDialect { - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - SQL = 1, - BTEQ = 2 - } - } - - /** Properties of an OracleDialect. */ - interface IOracleDialect { - } - - /** Represents an OracleDialect. */ - class OracleDialect implements IOracleDialect { - - /** - * Constructs a new OracleDialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IOracleDialect); - - /** - * Creates a new OracleDialect instance using the specified properties. - * @param [properties] Properties to set - * @returns OracleDialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IOracleDialect): google.cloud.bigquery.migration.v2.OracleDialect; - - /** - * Encodes the specified OracleDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.OracleDialect.verify|verify} messages. - * @param message OracleDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IOracleDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OracleDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.OracleDialect.verify|verify} messages. - * @param message OracleDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IOracleDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OracleDialect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OracleDialect - * @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.OracleDialect; - - /** - * Decodes an OracleDialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OracleDialect - * @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.OracleDialect; - - /** - * Verifies an OracleDialect 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 OracleDialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OracleDialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.OracleDialect; - - /** - * Creates a plain object from an OracleDialect message. Also converts values to other types if specified. - * @param message OracleDialect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.OracleDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OracleDialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OracleDialect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SparkSQLDialect. */ - interface ISparkSQLDialect { - } - - /** Represents a SparkSQLDialect. */ - class SparkSQLDialect implements ISparkSQLDialect { - - /** - * Constructs a new SparkSQLDialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.ISparkSQLDialect); - - /** - * Creates a new SparkSQLDialect instance using the specified properties. - * @param [properties] Properties to set - * @returns SparkSQLDialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.ISparkSQLDialect): google.cloud.bigquery.migration.v2.SparkSQLDialect; - - /** - * Encodes the specified SparkSQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SparkSQLDialect.verify|verify} messages. - * @param message SparkSQLDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.ISparkSQLDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SparkSQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SparkSQLDialect.verify|verify} messages. - * @param message SparkSQLDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISparkSQLDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SparkSQLDialect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SparkSQLDialect - * @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.SparkSQLDialect; - - /** - * Decodes a SparkSQLDialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SparkSQLDialect - * @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.SparkSQLDialect; - - /** - * Verifies a SparkSQLDialect 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 SparkSQLDialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SparkSQLDialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SparkSQLDialect; - - /** - * Creates a plain object from a SparkSQLDialect message. Also converts values to other types if specified. - * @param message SparkSQLDialect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.SparkSQLDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SparkSQLDialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SparkSQLDialect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SnowflakeDialect. */ - interface ISnowflakeDialect { - } - - /** Represents a SnowflakeDialect. */ - class SnowflakeDialect implements ISnowflakeDialect { - - /** - * Constructs a new SnowflakeDialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.ISnowflakeDialect); - - /** - * Creates a new SnowflakeDialect instance using the specified properties. - * @param [properties] Properties to set - * @returns SnowflakeDialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.ISnowflakeDialect): google.cloud.bigquery.migration.v2.SnowflakeDialect; - - /** - * Encodes the specified SnowflakeDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SnowflakeDialect.verify|verify} messages. - * @param message SnowflakeDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.ISnowflakeDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SnowflakeDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SnowflakeDialect.verify|verify} messages. - * @param message SnowflakeDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISnowflakeDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SnowflakeDialect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SnowflakeDialect - * @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.SnowflakeDialect; - - /** - * Decodes a SnowflakeDialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SnowflakeDialect - * @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.SnowflakeDialect; - - /** - * Verifies a SnowflakeDialect 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 SnowflakeDialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SnowflakeDialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SnowflakeDialect; - - /** - * Creates a plain object from a SnowflakeDialect message. Also converts values to other types if specified. - * @param message SnowflakeDialect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.SnowflakeDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SnowflakeDialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SnowflakeDialect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a NetezzaDialect. */ - interface INetezzaDialect { - } - - /** Represents a NetezzaDialect. */ - class NetezzaDialect implements INetezzaDialect { - - /** - * Constructs a new NetezzaDialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.INetezzaDialect); - - /** - * Creates a new NetezzaDialect instance using the specified properties. - * @param [properties] Properties to set - * @returns NetezzaDialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.INetezzaDialect): google.cloud.bigquery.migration.v2.NetezzaDialect; - - /** - * Encodes the specified NetezzaDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NetezzaDialect.verify|verify} messages. - * @param message NetezzaDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.INetezzaDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NetezzaDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NetezzaDialect.verify|verify} messages. - * @param message NetezzaDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.INetezzaDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NetezzaDialect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NetezzaDialect - * @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.NetezzaDialect; - - /** - * Decodes a NetezzaDialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NetezzaDialect - * @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.NetezzaDialect; - - /** - * Verifies a NetezzaDialect 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 NetezzaDialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NetezzaDialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.NetezzaDialect; - - /** - * Creates a plain object from a NetezzaDialect message. Also converts values to other types if specified. - * @param message NetezzaDialect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.NetezzaDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NetezzaDialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NetezzaDialect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AzureSynapseDialect. */ - interface IAzureSynapseDialect { - } - - /** Represents an AzureSynapseDialect. */ - class AzureSynapseDialect implements IAzureSynapseDialect { - - /** - * Constructs a new AzureSynapseDialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IAzureSynapseDialect); - - /** - * Creates a new AzureSynapseDialect instance using the specified properties. - * @param [properties] Properties to set - * @returns AzureSynapseDialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IAzureSynapseDialect): google.cloud.bigquery.migration.v2.AzureSynapseDialect; - - /** - * Encodes the specified AzureSynapseDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AzureSynapseDialect.verify|verify} messages. - * @param message AzureSynapseDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IAzureSynapseDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AzureSynapseDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AzureSynapseDialect.verify|verify} messages. - * @param message AzureSynapseDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IAzureSynapseDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AzureSynapseDialect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AzureSynapseDialect - * @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.AzureSynapseDialect; - - /** - * Decodes an AzureSynapseDialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AzureSynapseDialect - * @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.AzureSynapseDialect; - - /** - * Verifies an AzureSynapseDialect 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 AzureSynapseDialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AzureSynapseDialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.AzureSynapseDialect; - - /** - * Creates a plain object from an AzureSynapseDialect message. Also converts values to other types if specified. - * @param message AzureSynapseDialect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.AzureSynapseDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AzureSynapseDialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AzureSynapseDialect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a VerticaDialect. */ - interface IVerticaDialect { - } - - /** Represents a VerticaDialect. */ - class VerticaDialect implements IVerticaDialect { - - /** - * Constructs a new VerticaDialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IVerticaDialect); - - /** - * Creates a new VerticaDialect instance using the specified properties. - * @param [properties] Properties to set - * @returns VerticaDialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IVerticaDialect): google.cloud.bigquery.migration.v2.VerticaDialect; - - /** - * Encodes the specified VerticaDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.VerticaDialect.verify|verify} messages. - * @param message VerticaDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IVerticaDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VerticaDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.VerticaDialect.verify|verify} messages. - * @param message VerticaDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IVerticaDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VerticaDialect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VerticaDialect - * @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.VerticaDialect; - - /** - * Decodes a VerticaDialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VerticaDialect - * @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.VerticaDialect; - - /** - * Verifies a VerticaDialect 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 VerticaDialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VerticaDialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.VerticaDialect; - - /** - * Creates a plain object from a VerticaDialect message. Also converts values to other types if specified. - * @param message VerticaDialect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.VerticaDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VerticaDialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VerticaDialect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SQLServerDialect. */ - interface ISQLServerDialect { - } - - /** Represents a SQLServerDialect. */ - class SQLServerDialect implements ISQLServerDialect { - - /** - * Constructs a new SQLServerDialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.ISQLServerDialect); - - /** - * Creates a new SQLServerDialect instance using the specified properties. - * @param [properties] Properties to set - * @returns SQLServerDialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.ISQLServerDialect): google.cloud.bigquery.migration.v2.SQLServerDialect; - - /** - * Encodes the specified SQLServerDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLServerDialect.verify|verify} messages. - * @param message SQLServerDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.ISQLServerDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SQLServerDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLServerDialect.verify|verify} messages. - * @param message SQLServerDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISQLServerDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SQLServerDialect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SQLServerDialect - * @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.SQLServerDialect; - - /** - * Decodes a SQLServerDialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SQLServerDialect - * @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.SQLServerDialect; - - /** - * Verifies a SQLServerDialect 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 SQLServerDialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SQLServerDialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SQLServerDialect; - - /** - * Creates a plain object from a SQLServerDialect message. Also converts values to other types if specified. - * @param message SQLServerDialect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.SQLServerDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SQLServerDialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SQLServerDialect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PostgresqlDialect. */ - interface IPostgresqlDialect { - } - - /** Represents a PostgresqlDialect. */ - class PostgresqlDialect implements IPostgresqlDialect { - - /** - * Constructs a new PostgresqlDialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IPostgresqlDialect); - - /** - * Creates a new PostgresqlDialect instance using the specified properties. - * @param [properties] Properties to set - * @returns PostgresqlDialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IPostgresqlDialect): google.cloud.bigquery.migration.v2.PostgresqlDialect; - - /** - * Encodes the specified PostgresqlDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.PostgresqlDialect.verify|verify} messages. - * @param message PostgresqlDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IPostgresqlDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PostgresqlDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PostgresqlDialect.verify|verify} messages. - * @param message PostgresqlDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IPostgresqlDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PostgresqlDialect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PostgresqlDialect - * @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.PostgresqlDialect; - - /** - * Decodes a PostgresqlDialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PostgresqlDialect - * @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.PostgresqlDialect; - - /** - * Verifies a PostgresqlDialect 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 PostgresqlDialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PostgresqlDialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.PostgresqlDialect; - - /** - * Creates a plain object from a PostgresqlDialect message. Also converts values to other types if specified. - * @param message PostgresqlDialect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.PostgresqlDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PostgresqlDialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PostgresqlDialect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PrestoDialect. */ - interface IPrestoDialect { - } - - /** Represents a PrestoDialect. */ - class PrestoDialect implements IPrestoDialect { - - /** - * Constructs a new PrestoDialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IPrestoDialect); - - /** - * Creates a new PrestoDialect instance using the specified properties. - * @param [properties] Properties to set - * @returns PrestoDialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IPrestoDialect): google.cloud.bigquery.migration.v2.PrestoDialect; - - /** - * Encodes the specified PrestoDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.PrestoDialect.verify|verify} messages. - * @param message PrestoDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IPrestoDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PrestoDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PrestoDialect.verify|verify} messages. - * @param message PrestoDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IPrestoDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PrestoDialect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PrestoDialect - * @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.PrestoDialect; - - /** - * Decodes a PrestoDialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PrestoDialect - * @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.PrestoDialect; - - /** - * Verifies a PrestoDialect 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 PrestoDialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PrestoDialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.PrestoDialect; - - /** - * Creates a plain object from a PrestoDialect message. Also converts values to other types if specified. - * @param message PrestoDialect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.PrestoDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PrestoDialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PrestoDialect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MySQLDialect. */ - interface IMySQLDialect { - } - - /** Represents a MySQLDialect. */ - class MySQLDialect implements IMySQLDialect { - - /** - * Constructs a new MySQLDialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IMySQLDialect); - - /** - * Creates a new MySQLDialect instance using the specified properties. - * @param [properties] Properties to set - * @returns MySQLDialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IMySQLDialect): google.cloud.bigquery.migration.v2.MySQLDialect; - - /** - * Encodes the specified MySQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MySQLDialect.verify|verify} messages. - * @param message MySQLDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IMySQLDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MySQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MySQLDialect.verify|verify} messages. - * @param message MySQLDialect message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IMySQLDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MySQLDialect message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MySQLDialect - * @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.MySQLDialect; - - /** - * Decodes a MySQLDialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MySQLDialect - * @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.MySQLDialect; - - /** - * Verifies a MySQLDialect 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 MySQLDialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MySQLDialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.MySQLDialect; - - /** - * Creates a plain object from a MySQLDialect message. Also converts values to other types if specified. - * @param message MySQLDialect - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.MySQLDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MySQLDialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MySQLDialect - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DB2Dialect. */ - interface IDB2Dialect { - } - - /** Represents a DB2Dialect. */ - class DB2Dialect implements IDB2Dialect { - - /** - * Constructs a new DB2Dialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IDB2Dialect); - - /** - * Creates a new DB2Dialect instance using the specified properties. - * @param [properties] Properties to set - * @returns DB2Dialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IDB2Dialect): google.cloud.bigquery.migration.v2.DB2Dialect; - - /** - * 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.IDB2Dialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.IDB2Dialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.DB2Dialect; - - /** - * Decodes a DB2Dialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.DB2Dialect; - - /** - * 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 a DB2Dialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DB2Dialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.DB2Dialect; - - /** - * 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.DB2Dialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DB2Dialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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 a SQLiteDialect. */ - interface ISQLiteDialect { - } - - /** Represents a SQLiteDialect. */ - class SQLiteDialect implements ISQLiteDialect { - - /** - * Constructs a new SQLiteDialect. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.ISQLiteDialect); - - /** - * Creates a new SQLiteDialect instance using the specified properties. - * @param [properties] Properties to set - * @returns SQLiteDialect instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.ISQLiteDialect): google.cloud.bigquery.migration.v2.SQLiteDialect; - - /** - * 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.ISQLiteDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.ISQLiteDialect, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.SQLiteDialect; - - /** - * Decodes a SQLiteDialect message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.SQLiteDialect; - - /** - * 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 a SQLiteDialect message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SQLiteDialect - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SQLiteDialect; - - /** - * 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.SQLiteDialect, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SQLiteDialect to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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 GreenplumDialect. */ - interface IGreenplumDialect { - } - - /** Represents a GreenplumDialect. */ - class GreenplumDialect implements IGreenplumDialect { - - /** - * Constructs a new GreenplumDialect. - * @param [properties] Properties to set - */ - 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 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); - - /** TranslationDetails suggestionConfig */ - suggestionConfig?: (google.cloud.bigquery.migration.v2.ISuggestionConfig|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[]; - - /** TranslationDetails suggestionConfig. */ - public suggestionConfig?: (google.cloud.bigquery.migration.v2.ISuggestionConfig|null); - - /** - * Creates a new TranslationDetails instance using the specified properties. - * @param [properties] Properties to set - * @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 SuggestionConfig. */ - interface ISuggestionConfig { - - /** SuggestionConfig skipSuggestionSteps */ - skipSuggestionSteps?: (google.cloud.bigquery.migration.v2.ISuggestionStep[]|null); - } - - /** Represents a SuggestionConfig. */ - class SuggestionConfig implements ISuggestionConfig { - - /** - * Constructs a new SuggestionConfig. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.ISuggestionConfig); - - /** SuggestionConfig skipSuggestionSteps. */ - public skipSuggestionSteps: google.cloud.bigquery.migration.v2.ISuggestionStep[]; - - /** - * Creates a new SuggestionConfig instance using the specified properties. - * @param [properties] Properties to set - * @returns SuggestionConfig instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.ISuggestionConfig): google.cloud.bigquery.migration.v2.SuggestionConfig; - - /** - * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. - * @param message SuggestionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. - * @param message SuggestionConfig message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SuggestionConfig message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SuggestionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.SuggestionConfig; - - /** - * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SuggestionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.SuggestionConfig; - - /** - * Verifies a SuggestionConfig message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SuggestionConfig message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SuggestionConfig - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SuggestionConfig; - - /** - * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. - * @param message SuggestionConfig - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.SuggestionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SuggestionConfig to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SuggestionConfig - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SuggestionStep. */ - interface ISuggestionStep { - - /** SuggestionStep suggestionType */ - suggestionType?: (google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|null); - - /** SuggestionStep rewriteTarget */ - rewriteTarget?: (google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|null); - } - - /** Represents a SuggestionStep. */ - class SuggestionStep implements ISuggestionStep { - - /** - * Constructs a new SuggestionStep. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.ISuggestionStep); - - /** SuggestionStep suggestionType. */ - public suggestionType: (google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType); - - /** SuggestionStep rewriteTarget. */ - public rewriteTarget: (google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget); - - /** - * Creates a new SuggestionStep instance using the specified properties. - * @param [properties] Properties to set - * @returns SuggestionStep instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.ISuggestionStep): google.cloud.bigquery.migration.v2.SuggestionStep; - - /** - * Encodes the specified SuggestionStep message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. - * @param message SuggestionStep message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.ISuggestionStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SuggestionStep message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. - * @param message SuggestionStep message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISuggestionStep, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SuggestionStep message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SuggestionStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.SuggestionStep; - - /** - * Decodes a SuggestionStep message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SuggestionStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.SuggestionStep; - - /** - * Verifies a SuggestionStep message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a SuggestionStep message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SuggestionStep - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SuggestionStep; - - /** - * Creates a plain object from a SuggestionStep message. Also converts values to other types if specified. - * @param message SuggestionStep - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.SuggestionStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SuggestionStep to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SuggestionStep - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SuggestionStep { - - /** SuggestionType enum. */ - enum SuggestionType { - SUGGESTION_TYPE_UNSPECIFIED = 0, - QUERY_CUSTOMIZATION = 1, - TRANSLATION_EXPLANATION = 2 - } - - /** RewriteTarget enum. */ - enum RewriteTarget { - REWRITE_TARGET_UNSPECIFIED = 0, - SOURCE_SQL = 1, - TARGET_SQL = 2 - } - } - - /** Properties of a SourceTargetMapping. */ - interface ISourceTargetMapping { - - /** 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 gcsFilePath */ - gcsFilePath?: (string|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 gcsFilePath. */ - public gcsFilePath?: (string|null); - - /** SourceSpec encoding. */ - public encoding: string; - - /** SourceSpec source. */ - public source?: ("baseUri"|"literal"|"gcsFilePath"); - - /** - * 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 }; - - /** - * 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; - } - - /** Properties of a Literal. */ - interface ILiteral { - - /** Literal literalString */ - literalString?: (string|null); - - /** Literal literalBytes */ - literalBytes?: (Uint8Array|Buffer|string|null); - - /** Literal relativePath */ - relativePath?: (string|null); - } - - /** Represents a Literal. */ - class Literal implements ILiteral { - - /** - * Constructs a new Literal. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.ILiteral); - - /** Literal literalString. */ - public literalString?: (string|null); - - /** Literal literalBytes. */ - public literalBytes?: (Uint8Array|Buffer|string|null); - - /** Literal relativePath. */ - public relativePath: string; - - /** Literal literalData. */ - public literalData?: ("literalString"|"literalBytes"); - - /** - * 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.ILiteral, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.ILiteral, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.Literal; - - /** - * Decodes a Literal message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.Literal; - - /** - * 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 Literal message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Literal - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.Literal; - - /** - * 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.Literal, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Literal to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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; - } - - /** Properties of a SourceEnvironment. */ - interface ISourceEnvironment { - - /** SourceEnvironment defaultDatabase */ - defaultDatabase?: (string|null); - - /** SourceEnvironment schemaSearchPath */ - schemaSearchPath?: (string[]|null); - - /** SourceEnvironment metadataStoreDataset */ - metadataStoreDataset?: (string|null); - } - - /** Represents a SourceEnvironment. */ - class SourceEnvironment implements ISourceEnvironment { - - /** - * Constructs a new SourceEnvironment. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.ISourceEnvironment); - - /** SourceEnvironment defaultDatabase. */ - public defaultDatabase: string; - - /** SourceEnvironment schemaSearchPath. */ - public schemaSearchPath: string[]; - - /** SourceEnvironment metadataStoreDataset. */ - public metadataStoreDataset: string; - - /** - * Creates a new SourceEnvironment instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceEnvironment instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.ISourceEnvironment): google.cloud.bigquery.migration.v2.SourceEnvironment; - - /** - * 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.ISourceEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.ISourceEnvironment, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.SourceEnvironment; - - /** - * Decodes a SourceEnvironment message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.SourceEnvironment; - - /** - * 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 SourceEnvironment message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceEnvironment - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SourceEnvironment; - - /** - * 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.SourceEnvironment, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceEnvironment to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * 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 GcsReportLogMessage. */ - interface IGcsReportLogMessage { - - /** GcsReportLogMessage severity */ - severity?: (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 GcsReportLogMessage. */ - class GcsReportLogMessage implements IGcsReportLogMessage { - - /** - * Constructs a new GcsReportLogMessage. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IGcsReportLogMessage); - - /** GcsReportLogMessage severity. */ - public severity: 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 GcsReportLogMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns GcsReportLogMessage instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IGcsReportLogMessage): google.cloud.bigquery.migration.v2.GcsReportLogMessage; - - /** - * 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.IGcsReportLogMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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.IGcsReportLogMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * 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 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.GcsReportLogMessage; - - /** - * Decodes a GcsReportLogMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @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.GcsReportLogMessage; - - /** - * 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 GcsReportLogMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GcsReportLogMessage - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.GcsReportLogMessage; - - /** - * 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.GcsReportLogMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GcsReportLogMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GcsReportLogMessage - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a MigrationService */ - class MigrationService extends $protobuf.rpc.Service { - - /** - * Constructs a new MigrationService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new MigrationService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MigrationService; - - /** - * Calls CreateMigrationWorkflow. - * @param request CreateMigrationWorkflowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MigrationWorkflow - */ - public createMigrationWorkflow(request: google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2.MigrationService.CreateMigrationWorkflowCallback): void; - - /** - * Calls CreateMigrationWorkflow. - * @param request CreateMigrationWorkflowRequest message or plain object - * @returns Promise - */ - public createMigrationWorkflow(request: google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest): Promise; - - /** - * Calls GetMigrationWorkflow. - * @param request GetMigrationWorkflowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MigrationWorkflow - */ - public getMigrationWorkflow(request: google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2.MigrationService.GetMigrationWorkflowCallback): void; - - /** - * Calls GetMigrationWorkflow. - * @param request GetMigrationWorkflowRequest message or plain object - * @returns Promise - */ - public getMigrationWorkflow(request: google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest): Promise; - - /** - * Calls ListMigrationWorkflows. - * @param request ListMigrationWorkflowsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMigrationWorkflowsResponse - */ - public listMigrationWorkflows(request: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, callback: google.cloud.bigquery.migration.v2.MigrationService.ListMigrationWorkflowsCallback): void; - - /** - * Calls ListMigrationWorkflows. - * @param request ListMigrationWorkflowsRequest message or plain object - * @returns Promise - */ - public listMigrationWorkflows(request: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest): Promise; - - /** - * Calls DeleteMigrationWorkflow. - * @param request DeleteMigrationWorkflowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteMigrationWorkflow(request: google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2.MigrationService.DeleteMigrationWorkflowCallback): void; - - /** - * Calls DeleteMigrationWorkflow. - * @param request DeleteMigrationWorkflowRequest message or plain object - * @returns Promise - */ - public deleteMigrationWorkflow(request: google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest): Promise; - - /** - * Calls StartMigrationWorkflow. - * @param request StartMigrationWorkflowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public startMigrationWorkflow(request: google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2.MigrationService.StartMigrationWorkflowCallback): void; - - /** - * Calls StartMigrationWorkflow. - * @param request StartMigrationWorkflowRequest message or plain object - * @returns Promise - */ - public startMigrationWorkflow(request: google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest): Promise; - - /** - * Calls GetMigrationSubtask. - * @param request GetMigrationSubtaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MigrationSubtask - */ - public getMigrationSubtask(request: google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, callback: google.cloud.bigquery.migration.v2.MigrationService.GetMigrationSubtaskCallback): void; - - /** - * Calls GetMigrationSubtask. - * @param request GetMigrationSubtaskRequest message or plain object - * @returns Promise - */ - public getMigrationSubtask(request: google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest): Promise; - - /** - * Calls ListMigrationSubtasks. - * @param request ListMigrationSubtasksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMigrationSubtasksResponse - */ - public listMigrationSubtasks(request: google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, callback: google.cloud.bigquery.migration.v2.MigrationService.ListMigrationSubtasksCallback): void; - - /** - * Calls ListMigrationSubtasks. - * @param request ListMigrationSubtasksRequest message or plain object - * @returns Promise - */ - public listMigrationSubtasks(request: google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest): Promise; - } - - namespace MigrationService { - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|createMigrationWorkflow}. - * @param error Error, if any - * @param [response] MigrationWorkflow - */ - type CreateMigrationWorkflowCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2.MigrationWorkflow) => void; - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|getMigrationWorkflow}. - * @param error Error, if any - * @param [response] MigrationWorkflow - */ - type GetMigrationWorkflowCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2.MigrationWorkflow) => void; - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|listMigrationWorkflows}. - * @param error Error, if any - * @param [response] ListMigrationWorkflowsResponse - */ - type ListMigrationWorkflowsCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse) => void; - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|deleteMigrationWorkflow}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteMigrationWorkflowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|startMigrationWorkflow}. - * @param error Error, if any - * @param [response] Empty - */ - type StartMigrationWorkflowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|getMigrationSubtask}. - * @param error Error, if any - * @param [response] MigrationSubtask - */ - type GetMigrationSubtaskCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2.MigrationSubtask) => void; - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|listMigrationSubtasks}. - * @param error Error, if any - * @param [response] ListMigrationSubtasksResponse - */ - type ListMigrationSubtasksCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse) => void; - } - - /** Properties of a CreateMigrationWorkflowRequest. */ - interface ICreateMigrationWorkflowRequest { - - /** CreateMigrationWorkflowRequest parent */ - parent?: (string|null); - - /** CreateMigrationWorkflowRequest migrationWorkflow */ - migrationWorkflow?: (google.cloud.bigquery.migration.v2.IMigrationWorkflow|null); - } - - /** Represents a CreateMigrationWorkflowRequest. */ - class CreateMigrationWorkflowRequest implements ICreateMigrationWorkflowRequest { - - /** - * Constructs a new CreateMigrationWorkflowRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest); - - /** CreateMigrationWorkflowRequest parent. */ - public parent: string; - - /** CreateMigrationWorkflowRequest migrationWorkflow. */ - public migrationWorkflow?: (google.cloud.bigquery.migration.v2.IMigrationWorkflow|null); - - /** - * Creates a new CreateMigrationWorkflowRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateMigrationWorkflowRequest instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest): google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest; - - /** - * Encodes the specified CreateMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest.verify|verify} messages. - * @param message CreateMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest.verify|verify} messages. - * @param message CreateMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateMigrationWorkflowRequest - * @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.CreateMigrationWorkflowRequest; - - /** - * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateMigrationWorkflowRequest - * @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.CreateMigrationWorkflowRequest; - - /** - * Verifies a CreateMigrationWorkflowRequest 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 CreateMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateMigrationWorkflowRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest; - - /** - * Creates a plain object from a CreateMigrationWorkflowRequest message. Also converts values to other types if specified. - * @param message CreateMigrationWorkflowRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateMigrationWorkflowRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateMigrationWorkflowRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetMigrationWorkflowRequest. */ - interface IGetMigrationWorkflowRequest { - - /** GetMigrationWorkflowRequest name */ - name?: (string|null); - - /** GetMigrationWorkflowRequest readMask */ - readMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents a GetMigrationWorkflowRequest. */ - class GetMigrationWorkflowRequest implements IGetMigrationWorkflowRequest { - - /** - * Constructs a new GetMigrationWorkflowRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest); - - /** GetMigrationWorkflowRequest name. */ - public name: string; - - /** GetMigrationWorkflowRequest readMask. */ - public readMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new GetMigrationWorkflowRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetMigrationWorkflowRequest instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest): google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest; - - /** - * Encodes the specified GetMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest.verify|verify} messages. - * @param message GetMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest.verify|verify} messages. - * @param message GetMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetMigrationWorkflowRequest - * @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.GetMigrationWorkflowRequest; - - /** - * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetMigrationWorkflowRequest - * @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.GetMigrationWorkflowRequest; - - /** - * Verifies a GetMigrationWorkflowRequest 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 GetMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetMigrationWorkflowRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest; - - /** - * Creates a plain object from a GetMigrationWorkflowRequest message. Also converts values to other types if specified. - * @param message GetMigrationWorkflowRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetMigrationWorkflowRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetMigrationWorkflowRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListMigrationWorkflowsRequest. */ - interface IListMigrationWorkflowsRequest { - - /** ListMigrationWorkflowsRequest parent */ - parent?: (string|null); - - /** ListMigrationWorkflowsRequest readMask */ - readMask?: (google.protobuf.IFieldMask|null); - - /** ListMigrationWorkflowsRequest pageSize */ - pageSize?: (number|null); - - /** ListMigrationWorkflowsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListMigrationWorkflowsRequest. */ - class ListMigrationWorkflowsRequest implements IListMigrationWorkflowsRequest { - - /** - * Constructs a new ListMigrationWorkflowsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest); - - /** ListMigrationWorkflowsRequest parent. */ - public parent: string; - - /** ListMigrationWorkflowsRequest readMask. */ - public readMask?: (google.protobuf.IFieldMask|null); - - /** ListMigrationWorkflowsRequest pageSize. */ - public pageSize: number; - - /** ListMigrationWorkflowsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListMigrationWorkflowsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMigrationWorkflowsRequest instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest): google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest; - - /** - * Encodes the specified ListMigrationWorkflowsRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest.verify|verify} messages. - * @param message ListMigrationWorkflowsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListMigrationWorkflowsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest.verify|verify} messages. - * @param message ListMigrationWorkflowsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMigrationWorkflowsRequest - * @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.ListMigrationWorkflowsRequest; - - /** - * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMigrationWorkflowsRequest - * @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.ListMigrationWorkflowsRequest; - - /** - * Verifies a ListMigrationWorkflowsRequest 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 ListMigrationWorkflowsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMigrationWorkflowsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest; - - /** - * Creates a plain object from a ListMigrationWorkflowsRequest message. Also converts values to other types if specified. - * @param message ListMigrationWorkflowsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListMigrationWorkflowsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListMigrationWorkflowsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListMigrationWorkflowsResponse. */ - interface IListMigrationWorkflowsResponse { - - /** ListMigrationWorkflowsResponse migrationWorkflows */ - migrationWorkflows?: (google.cloud.bigquery.migration.v2.IMigrationWorkflow[]|null); - - /** ListMigrationWorkflowsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListMigrationWorkflowsResponse. */ - class ListMigrationWorkflowsResponse implements IListMigrationWorkflowsResponse { - - /** - * Constructs a new ListMigrationWorkflowsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse); - - /** ListMigrationWorkflowsResponse migrationWorkflows. */ - public migrationWorkflows: google.cloud.bigquery.migration.v2.IMigrationWorkflow[]; - - /** ListMigrationWorkflowsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListMigrationWorkflowsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMigrationWorkflowsResponse instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse): google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse; - - /** - * Encodes the specified ListMigrationWorkflowsResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse.verify|verify} messages. - * @param message ListMigrationWorkflowsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListMigrationWorkflowsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse.verify|verify} messages. - * @param message ListMigrationWorkflowsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMigrationWorkflowsResponse - * @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.ListMigrationWorkflowsResponse; - - /** - * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMigrationWorkflowsResponse - * @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.ListMigrationWorkflowsResponse; - - /** - * Verifies a ListMigrationWorkflowsResponse 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 ListMigrationWorkflowsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMigrationWorkflowsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse; - - /** - * Creates a plain object from a ListMigrationWorkflowsResponse message. Also converts values to other types if specified. - * @param message ListMigrationWorkflowsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListMigrationWorkflowsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListMigrationWorkflowsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteMigrationWorkflowRequest. */ - interface IDeleteMigrationWorkflowRequest { - - /** DeleteMigrationWorkflowRequest name */ - name?: (string|null); - } - - /** Represents a DeleteMigrationWorkflowRequest. */ - class DeleteMigrationWorkflowRequest implements IDeleteMigrationWorkflowRequest { - - /** - * Constructs a new DeleteMigrationWorkflowRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest); - - /** DeleteMigrationWorkflowRequest name. */ - public name: string; - - /** - * Creates a new DeleteMigrationWorkflowRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteMigrationWorkflowRequest instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest): google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest; - - /** - * Encodes the specified DeleteMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest.verify|verify} messages. - * @param message DeleteMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest.verify|verify} messages. - * @param message DeleteMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteMigrationWorkflowRequest - * @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.DeleteMigrationWorkflowRequest; - - /** - * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteMigrationWorkflowRequest - * @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.DeleteMigrationWorkflowRequest; - - /** - * Verifies a DeleteMigrationWorkflowRequest 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 DeleteMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteMigrationWorkflowRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest; - - /** - * Creates a plain object from a DeleteMigrationWorkflowRequest message. Also converts values to other types if specified. - * @param message DeleteMigrationWorkflowRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteMigrationWorkflowRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteMigrationWorkflowRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartMigrationWorkflowRequest. */ - interface IStartMigrationWorkflowRequest { - - /** StartMigrationWorkflowRequest name */ - name?: (string|null); - } - - /** Represents a StartMigrationWorkflowRequest. */ - class StartMigrationWorkflowRequest implements IStartMigrationWorkflowRequest { - - /** - * Constructs a new StartMigrationWorkflowRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest); - - /** StartMigrationWorkflowRequest name. */ - public name: string; - - /** - * Creates a new StartMigrationWorkflowRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StartMigrationWorkflowRequest instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest): google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest; - - /** - * Encodes the specified StartMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest.verify|verify} messages. - * @param message StartMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest.verify|verify} messages. - * @param message StartMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartMigrationWorkflowRequest - * @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.StartMigrationWorkflowRequest; - - /** - * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartMigrationWorkflowRequest - * @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.StartMigrationWorkflowRequest; - - /** - * Verifies a StartMigrationWorkflowRequest 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 StartMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartMigrationWorkflowRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest; - - /** - * Creates a plain object from a StartMigrationWorkflowRequest message. Also converts values to other types if specified. - * @param message StartMigrationWorkflowRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartMigrationWorkflowRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartMigrationWorkflowRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetMigrationSubtaskRequest. */ - interface IGetMigrationSubtaskRequest { - - /** GetMigrationSubtaskRequest name */ - name?: (string|null); - - /** GetMigrationSubtaskRequest readMask */ - readMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents a GetMigrationSubtaskRequest. */ - class GetMigrationSubtaskRequest implements IGetMigrationSubtaskRequest { - - /** - * Constructs a new GetMigrationSubtaskRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest); - - /** GetMigrationSubtaskRequest name. */ - public name: string; - - /** GetMigrationSubtaskRequest readMask. */ - public readMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new GetMigrationSubtaskRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetMigrationSubtaskRequest instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest): google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest; - - /** - * Encodes the specified GetMigrationSubtaskRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest.verify|verify} messages. - * @param message GetMigrationSubtaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetMigrationSubtaskRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest.verify|verify} messages. - * @param message GetMigrationSubtaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetMigrationSubtaskRequest - * @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.GetMigrationSubtaskRequest; - - /** - * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetMigrationSubtaskRequest - * @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.GetMigrationSubtaskRequest; - - /** - * Verifies a GetMigrationSubtaskRequest 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 GetMigrationSubtaskRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetMigrationSubtaskRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest; - - /** - * Creates a plain object from a GetMigrationSubtaskRequest message. Also converts values to other types if specified. - * @param message GetMigrationSubtaskRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetMigrationSubtaskRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetMigrationSubtaskRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListMigrationSubtasksRequest. */ - interface IListMigrationSubtasksRequest { - - /** ListMigrationSubtasksRequest parent */ - parent?: (string|null); - - /** ListMigrationSubtasksRequest readMask */ - readMask?: (google.protobuf.IFieldMask|null); - - /** ListMigrationSubtasksRequest pageSize */ - pageSize?: (number|null); - - /** ListMigrationSubtasksRequest pageToken */ - pageToken?: (string|null); - - /** ListMigrationSubtasksRequest filter */ - filter?: (string|null); - } - - /** Represents a ListMigrationSubtasksRequest. */ - class ListMigrationSubtasksRequest implements IListMigrationSubtasksRequest { - - /** - * Constructs a new ListMigrationSubtasksRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest); - - /** ListMigrationSubtasksRequest parent. */ - public parent: string; - - /** ListMigrationSubtasksRequest readMask. */ - public readMask?: (google.protobuf.IFieldMask|null); - - /** ListMigrationSubtasksRequest pageSize. */ - public pageSize: number; - - /** ListMigrationSubtasksRequest pageToken. */ - public pageToken: string; - - /** ListMigrationSubtasksRequest filter. */ - public filter: string; - - /** - * Creates a new ListMigrationSubtasksRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMigrationSubtasksRequest instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest): google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest; - - /** - * Encodes the specified ListMigrationSubtasksRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest.verify|verify} messages. - * @param message ListMigrationSubtasksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListMigrationSubtasksRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest.verify|verify} messages. - * @param message ListMigrationSubtasksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMigrationSubtasksRequest - * @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.ListMigrationSubtasksRequest; - - /** - * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMigrationSubtasksRequest - * @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.ListMigrationSubtasksRequest; - - /** - * Verifies a ListMigrationSubtasksRequest 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 ListMigrationSubtasksRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMigrationSubtasksRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest; - - /** - * Creates a plain object from a ListMigrationSubtasksRequest message. Also converts values to other types if specified. - * @param message ListMigrationSubtasksRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListMigrationSubtasksRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListMigrationSubtasksRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListMigrationSubtasksResponse. */ - interface IListMigrationSubtasksResponse { - - /** ListMigrationSubtasksResponse migrationSubtasks */ - migrationSubtasks?: (google.cloud.bigquery.migration.v2.IMigrationSubtask[]|null); - - /** ListMigrationSubtasksResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListMigrationSubtasksResponse. */ - class ListMigrationSubtasksResponse implements IListMigrationSubtasksResponse { - - /** - * Constructs a new ListMigrationSubtasksResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse); - - /** ListMigrationSubtasksResponse migrationSubtasks. */ - public migrationSubtasks: google.cloud.bigquery.migration.v2.IMigrationSubtask[]; - - /** ListMigrationSubtasksResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListMigrationSubtasksResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMigrationSubtasksResponse instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse): google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse; - - /** - * Encodes the specified ListMigrationSubtasksResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse.verify|verify} messages. - * @param message ListMigrationSubtasksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListMigrationSubtasksResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse.verify|verify} messages. - * @param message ListMigrationSubtasksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMigrationSubtasksResponse - * @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.ListMigrationSubtasksResponse; - - /** - * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMigrationSubtasksResponse - * @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.ListMigrationSubtasksResponse; - - /** - * Verifies a ListMigrationSubtasksResponse 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 ListMigrationSubtasksResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMigrationSubtasksResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse; - - /** - * Creates a plain object from a ListMigrationSubtasksResponse message. Also converts values to other types if specified. - * @param message ListMigrationSubtasksResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListMigrationSubtasksResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListMigrationSubtasksResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - 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. */ - namespace v2alpha { - - /** Properties of an AssessmentTaskDetails. */ - interface IAssessmentTaskDetails { - - /** AssessmentTaskDetails inputPath */ - inputPath?: (string|null); - - /** AssessmentTaskDetails outputDataset */ - outputDataset?: (string|null); - - /** AssessmentTaskDetails querylogsPath */ - querylogsPath?: (string|null); - - /** AssessmentTaskDetails dataSource */ - dataSource?: (string|null); - } - - /** Represents an AssessmentTaskDetails. */ - class AssessmentTaskDetails implements IAssessmentTaskDetails { - - /** - * Constructs a new AssessmentTaskDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails); - - /** AssessmentTaskDetails inputPath. */ - public inputPath: string; - - /** AssessmentTaskDetails outputDataset. */ - public outputDataset: string; - - /** AssessmentTaskDetails querylogsPath. */ - public querylogsPath: string; - - /** AssessmentTaskDetails dataSource. */ - public dataSource: string; - - /** - * Creates a new AssessmentTaskDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns AssessmentTaskDetails instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails): google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails; - - /** - * Encodes the specified AssessmentTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.verify|verify} messages. - * @param message AssessmentTaskDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AssessmentTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.verify|verify} messages. - * @param message AssessmentTaskDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AssessmentTaskDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AssessmentTaskDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails; - - /** - * Decodes an AssessmentTaskDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AssessmentTaskDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails; - - /** - * Verifies an AssessmentTaskDetails message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates an AssessmentTaskDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AssessmentTaskDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails; - - /** - * Creates a plain object from an AssessmentTaskDetails message. Also converts values to other types if specified. - * @param message AssessmentTaskDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AssessmentTaskDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AssessmentTaskDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an AssessmentOrchestrationResultDetails. */ - interface IAssessmentOrchestrationResultDetails { - - /** AssessmentOrchestrationResultDetails outputTablesSchemaVersion */ - outputTablesSchemaVersion?: (string|null); - } - - /** Represents an AssessmentOrchestrationResultDetails. */ - class AssessmentOrchestrationResultDetails implements IAssessmentOrchestrationResultDetails { - - /** - * Constructs a new AssessmentOrchestrationResultDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails); - - /** AssessmentOrchestrationResultDetails outputTablesSchemaVersion. */ - public outputTablesSchemaVersion: string; - - /** - * Creates a new AssessmentOrchestrationResultDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns AssessmentOrchestrationResultDetails instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails): google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails; - - /** - * Encodes the specified AssessmentOrchestrationResultDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.verify|verify} messages. - * @param message AssessmentOrchestrationResultDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified AssessmentOrchestrationResultDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.verify|verify} messages. - * @param message AssessmentOrchestrationResultDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an AssessmentOrchestrationResultDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns AssessmentOrchestrationResultDetails - * @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.v2alpha.AssessmentOrchestrationResultDetails; - - /** - * Decodes an AssessmentOrchestrationResultDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns AssessmentOrchestrationResultDetails - * @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.v2alpha.AssessmentOrchestrationResultDetails; - - /** - * Verifies an AssessmentOrchestrationResultDetails 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 AssessmentOrchestrationResultDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns AssessmentOrchestrationResultDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails; - - /** - * Creates a plain object from an AssessmentOrchestrationResultDetails message. Also converts values to other types if specified. - * @param message AssessmentOrchestrationResultDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this AssessmentOrchestrationResultDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for AssessmentOrchestrationResultDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MigrationWorkflow. */ - interface IMigrationWorkflow { - - /** MigrationWorkflow name */ - name?: (string|null); - - /** MigrationWorkflow displayName */ - displayName?: (string|null); - - /** MigrationWorkflow tasks */ - tasks?: ({ [k: string]: google.cloud.bigquery.migration.v2alpha.IMigrationTask }|null); - - /** MigrationWorkflow state */ - state?: (google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State|keyof typeof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State|null); - - /** MigrationWorkflow createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** MigrationWorkflow lastUpdateTime */ - lastUpdateTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a MigrationWorkflow. */ - class MigrationWorkflow implements IMigrationWorkflow { - - /** - * Constructs a new MigrationWorkflow. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow); - - /** MigrationWorkflow name. */ - public name: string; - - /** MigrationWorkflow displayName. */ - public displayName: string; - - /** MigrationWorkflow tasks. */ - public tasks: { [k: string]: google.cloud.bigquery.migration.v2alpha.IMigrationTask }; - - /** MigrationWorkflow state. */ - public state: (google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State|keyof typeof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State); - - /** MigrationWorkflow createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** MigrationWorkflow lastUpdateTime. */ - public lastUpdateTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new MigrationWorkflow instance using the specified properties. - * @param [properties] Properties to set - * @returns MigrationWorkflow instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow): google.cloud.bigquery.migration.v2alpha.MigrationWorkflow; - - /** - * Encodes the specified MigrationWorkflow message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.verify|verify} messages. - * @param message MigrationWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MigrationWorkflow message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.verify|verify} messages. - * @param message MigrationWorkflow message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MigrationWorkflow message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MigrationWorkflow - * @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.v2alpha.MigrationWorkflow; - - /** - * Decodes a MigrationWorkflow message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MigrationWorkflow - * @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.v2alpha.MigrationWorkflow; - - /** - * Verifies a MigrationWorkflow 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 MigrationWorkflow message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MigrationWorkflow - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.MigrationWorkflow; - - /** - * Creates a plain object from a MigrationWorkflow message. Also converts values to other types if specified. - * @param message MigrationWorkflow - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.MigrationWorkflow, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MigrationWorkflow to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MigrationWorkflow - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MigrationWorkflow { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - DRAFT = 1, - RUNNING = 2, - PAUSED = 3, - COMPLETED = 4 - } - } - - /** Properties of a MigrationTask. */ - interface IMigrationTask { - - /** MigrationTask assessmentTaskDetails */ - assessmentTaskDetails?: (google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails|null); - - /** MigrationTask translationTaskDetails */ - translationTaskDetails?: (google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails|null); - - /** MigrationTask id */ - id?: (string|null); - - /** MigrationTask type */ - type?: (string|null); - - /** MigrationTask details */ - details?: (google.protobuf.IAny|null); - - /** MigrationTask state */ - state?: (google.cloud.bigquery.migration.v2alpha.MigrationTask.State|keyof typeof google.cloud.bigquery.migration.v2alpha.MigrationTask.State|null); - - /** MigrationTask processingError */ - processingError?: (google.rpc.IErrorInfo|null); - - /** MigrationTask createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** MigrationTask lastUpdateTime */ - lastUpdateTime?: (google.protobuf.ITimestamp|null); - - /** MigrationTask orchestrationResult */ - orchestrationResult?: (google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult|null); - } - - /** Represents a MigrationTask. */ - class MigrationTask implements IMigrationTask { - - /** - * Constructs a new MigrationTask. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationTask); - - /** MigrationTask assessmentTaskDetails. */ - public assessmentTaskDetails?: (google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails|null); - - /** MigrationTask translationTaskDetails. */ - public translationTaskDetails?: (google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails|null); - - /** MigrationTask id. */ - public id: string; - - /** MigrationTask type. */ - public type: string; - - /** MigrationTask details. */ - public details?: (google.protobuf.IAny|null); - - /** MigrationTask state. */ - public state: (google.cloud.bigquery.migration.v2alpha.MigrationTask.State|keyof typeof google.cloud.bigquery.migration.v2alpha.MigrationTask.State); - - /** MigrationTask processingError. */ - public processingError?: (google.rpc.IErrorInfo|null); - - /** MigrationTask createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** MigrationTask lastUpdateTime. */ - public lastUpdateTime?: (google.protobuf.ITimestamp|null); - - /** MigrationTask orchestrationResult. */ - public orchestrationResult?: (google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult|null); - - /** MigrationTask taskDetails. */ - public taskDetails?: ("assessmentTaskDetails"|"translationTaskDetails"); - - /** - * Creates a new MigrationTask instance using the specified properties. - * @param [properties] Properties to set - * @returns MigrationTask instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationTask): google.cloud.bigquery.migration.v2alpha.MigrationTask; - - /** - * Encodes the specified MigrationTask message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTask.verify|verify} messages. - * @param message MigrationTask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IMigrationTask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MigrationTask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTask.verify|verify} messages. - * @param message MigrationTask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IMigrationTask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MigrationTask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MigrationTask - * @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.v2alpha.MigrationTask; - - /** - * Decodes a MigrationTask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MigrationTask - * @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.v2alpha.MigrationTask; - - /** - * Verifies a MigrationTask 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 MigrationTask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MigrationTask - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.MigrationTask; - - /** - * Creates a plain object from a MigrationTask message. Also converts values to other types if specified. - * @param message MigrationTask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.MigrationTask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MigrationTask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MigrationTask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MigrationTask { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - PENDING = 1, - ORCHESTRATING = 2, - RUNNING = 3, - PAUSED = 4, - SUCCEEDED = 5, - FAILED = 6 - } - } - - /** Properties of a MigrationSubtask. */ - interface IMigrationSubtask { - - /** MigrationSubtask name */ - name?: (string|null); - - /** MigrationSubtask taskId */ - taskId?: (string|null); - - /** MigrationSubtask type */ - type?: (string|null); - - /** MigrationSubtask state */ - state?: (google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State|keyof typeof google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State|null); - - /** MigrationSubtask processingError */ - processingError?: (google.rpc.IErrorInfo|null); - - /** MigrationSubtask resourceErrorDetails */ - resourceErrorDetails?: (google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail[]|null); - - /** MigrationSubtask resourceErrorCount */ - resourceErrorCount?: (number|null); - - /** MigrationSubtask createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** MigrationSubtask lastUpdateTime */ - lastUpdateTime?: (google.protobuf.ITimestamp|null); - - /** MigrationSubtask metrics */ - metrics?: (google.cloud.bigquery.migration.v2alpha.ITimeSeries[]|null); - } - - /** Represents a MigrationSubtask. */ - class MigrationSubtask implements IMigrationSubtask { - - /** - * Constructs a new MigrationSubtask. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationSubtask); - - /** MigrationSubtask name. */ - public name: string; - - /** MigrationSubtask taskId. */ - public taskId: string; - - /** MigrationSubtask type. */ - public type: string; - - /** MigrationSubtask state. */ - public state: (google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State|keyof typeof google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State); - - /** MigrationSubtask processingError. */ - public processingError?: (google.rpc.IErrorInfo|null); - - /** MigrationSubtask resourceErrorDetails. */ - public resourceErrorDetails: google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail[]; - - /** MigrationSubtask resourceErrorCount. */ - public resourceErrorCount: number; - - /** MigrationSubtask createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); - - /** MigrationSubtask lastUpdateTime. */ - public lastUpdateTime?: (google.protobuf.ITimestamp|null); - - /** MigrationSubtask metrics. */ - public metrics: google.cloud.bigquery.migration.v2alpha.ITimeSeries[]; - - /** - * Creates a new MigrationSubtask instance using the specified properties. - * @param [properties] Properties to set - * @returns MigrationSubtask instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationSubtask): google.cloud.bigquery.migration.v2alpha.MigrationSubtask; - - /** - * Encodes the specified MigrationSubtask message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationSubtask.verify|verify} messages. - * @param message MigrationSubtask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MigrationSubtask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationSubtask.verify|verify} messages. - * @param message MigrationSubtask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MigrationSubtask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MigrationSubtask - * @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.v2alpha.MigrationSubtask; - - /** - * Decodes a MigrationSubtask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MigrationSubtask - * @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.v2alpha.MigrationSubtask; - - /** - * Verifies a MigrationSubtask 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 MigrationSubtask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MigrationSubtask - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.MigrationSubtask; - - /** - * Creates a plain object from a MigrationSubtask message. Also converts values to other types if specified. - * @param message MigrationSubtask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.MigrationSubtask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MigrationSubtask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MigrationSubtask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MigrationSubtask { - - /** State enum. */ - enum State { - STATE_UNSPECIFIED = 0, - ACTIVE = 1, - RUNNING = 2, - SUCCEEDED = 3, - FAILED = 4, - PAUSED = 5 - } - } - - /** Properties of a MigrationTaskOrchestrationResult. */ - interface IMigrationTaskOrchestrationResult { - - /** MigrationTaskOrchestrationResult assessmentDetails */ - assessmentDetails?: (google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails|null); - } - - /** Represents a MigrationTaskOrchestrationResult. */ - class MigrationTaskOrchestrationResult implements IMigrationTaskOrchestrationResult { - - /** - * Constructs a new MigrationTaskOrchestrationResult. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult); - - /** MigrationTaskOrchestrationResult assessmentDetails. */ - public assessmentDetails?: (google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails|null); - - /** MigrationTaskOrchestrationResult details. */ - public details?: "assessmentDetails"; - - /** - * Creates a new MigrationTaskOrchestrationResult instance using the specified properties. - * @param [properties] Properties to set - * @returns MigrationTaskOrchestrationResult instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult): google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult; - - /** - * Encodes the specified MigrationTaskOrchestrationResult message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.verify|verify} messages. - * @param message MigrationTaskOrchestrationResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MigrationTaskOrchestrationResult message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.verify|verify} messages. - * @param message MigrationTaskOrchestrationResult message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MigrationTaskOrchestrationResult message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MigrationTaskOrchestrationResult - * @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.v2alpha.MigrationTaskOrchestrationResult; - - /** - * Decodes a MigrationTaskOrchestrationResult message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MigrationTaskOrchestrationResult - * @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.v2alpha.MigrationTaskOrchestrationResult; - - /** - * Verifies a MigrationTaskOrchestrationResult 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 MigrationTaskOrchestrationResult message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MigrationTaskOrchestrationResult - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult; - - /** - * Creates a plain object from a MigrationTaskOrchestrationResult message. Also converts values to other types if specified. - * @param message MigrationTaskOrchestrationResult - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MigrationTaskOrchestrationResult to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MigrationTaskOrchestrationResult - * @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 { - - /** ResourceErrorDetail resourceInfo */ - resourceInfo?: (google.rpc.IResourceInfo|null); - - /** ResourceErrorDetail errorDetails */ - errorDetails?: (google.cloud.bigquery.migration.v2alpha.IErrorDetail[]|null); - - /** ResourceErrorDetail errorCount */ - errorCount?: (number|null); - } - - /** Represents a ResourceErrorDetail. */ - class ResourceErrorDetail implements IResourceErrorDetail { - - /** - * Constructs a new ResourceErrorDetail. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail); - - /** ResourceErrorDetail resourceInfo. */ - public resourceInfo?: (google.rpc.IResourceInfo|null); - - /** ResourceErrorDetail errorDetails. */ - public errorDetails: google.cloud.bigquery.migration.v2alpha.IErrorDetail[]; - - /** ResourceErrorDetail errorCount. */ - public errorCount: number; - - /** - * Creates a new ResourceErrorDetail instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceErrorDetail instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail): google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail; - - /** - * Encodes the specified ResourceErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.verify|verify} messages. - * @param message ResourceErrorDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.verify|verify} messages. - * @param message ResourceErrorDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceErrorDetail message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceErrorDetail - * @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.v2alpha.ResourceErrorDetail; - - /** - * Decodes a ResourceErrorDetail message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceErrorDetail - * @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.v2alpha.ResourceErrorDetail; - - /** - * Verifies a ResourceErrorDetail 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 ResourceErrorDetail message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceErrorDetail - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail; - - /** - * Creates a plain object from a ResourceErrorDetail message. Also converts values to other types if specified. - * @param message ResourceErrorDetail - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceErrorDetail to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceErrorDetail - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ErrorDetail. */ - interface IErrorDetail { - - /** ErrorDetail location */ - location?: (google.cloud.bigquery.migration.v2alpha.IErrorLocation|null); - - /** ErrorDetail errorInfo */ - errorInfo?: (google.rpc.IErrorInfo|null); - } - - /** Represents an ErrorDetail. */ - class ErrorDetail implements IErrorDetail { - - /** - * Constructs a new ErrorDetail. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IErrorDetail); - - /** ErrorDetail location. */ - public location?: (google.cloud.bigquery.migration.v2alpha.IErrorLocation|null); - - /** ErrorDetail errorInfo. */ - public errorInfo?: (google.rpc.IErrorInfo|null); - - /** - * Creates a new ErrorDetail instance using the specified properties. - * @param [properties] Properties to set - * @returns ErrorDetail instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IErrorDetail): google.cloud.bigquery.migration.v2alpha.ErrorDetail; - - /** - * Encodes the specified ErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorDetail.verify|verify} messages. - * @param message ErrorDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorDetail.verify|verify} messages. - * @param message ErrorDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ErrorDetail message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ErrorDetail - * @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.v2alpha.ErrorDetail; - - /** - * Decodes an ErrorDetail message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ErrorDetail - * @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.v2alpha.ErrorDetail; - - /** - * Verifies an ErrorDetail 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 ErrorDetail message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ErrorDetail - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.ErrorDetail; - - /** - * Creates a plain object from an ErrorDetail message. Also converts values to other types if specified. - * @param message ErrorDetail - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.ErrorDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ErrorDetail to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ErrorDetail - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an ErrorLocation. */ - interface IErrorLocation { - - /** ErrorLocation line */ - line?: (number|null); - - /** ErrorLocation column */ - column?: (number|null); - } - - /** Represents an ErrorLocation. */ - class ErrorLocation implements IErrorLocation { - - /** - * Constructs a new ErrorLocation. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IErrorLocation); - - /** ErrorLocation line. */ - public line: number; - - /** ErrorLocation column. */ - public column: number; - - /** - * Creates a new ErrorLocation instance using the specified properties. - * @param [properties] Properties to set - * @returns ErrorLocation instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IErrorLocation): google.cloud.bigquery.migration.v2alpha.ErrorLocation; - - /** - * Encodes the specified ErrorLocation message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorLocation.verify|verify} messages. - * @param message ErrorLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IErrorLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ErrorLocation message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorLocation.verify|verify} messages. - * @param message ErrorLocation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IErrorLocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ErrorLocation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ErrorLocation - * @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.v2alpha.ErrorLocation; - - /** - * Decodes an ErrorLocation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ErrorLocation - * @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.v2alpha.ErrorLocation; - - /** - * Verifies an ErrorLocation 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 ErrorLocation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ErrorLocation - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.ErrorLocation; - - /** - * Creates a plain object from an ErrorLocation message. Also converts values to other types if specified. - * @param message ErrorLocation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.ErrorLocation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ErrorLocation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ErrorLocation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TimeSeries. */ - interface ITimeSeries { - - /** TimeSeries metric */ - metric?: (string|null); - - /** TimeSeries valueType */ - valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); - - /** TimeSeries metricKind */ - metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); - - /** TimeSeries points */ - points?: (google.cloud.bigquery.migration.v2alpha.IPoint[]|null); - } - - /** Represents a TimeSeries. */ - class TimeSeries implements ITimeSeries { - - /** - * Constructs a new TimeSeries. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITimeSeries); - - /** TimeSeries metric. */ - public metric: string; - - /** TimeSeries valueType. */ - public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); - - /** TimeSeries metricKind. */ - public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); - - /** TimeSeries points. */ - public points: google.cloud.bigquery.migration.v2alpha.IPoint[]; - - /** - * Creates a new TimeSeries instance using the specified properties. - * @param [properties] Properties to set - * @returns TimeSeries instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITimeSeries): google.cloud.bigquery.migration.v2alpha.TimeSeries; - - /** - * Encodes the specified TimeSeries message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeSeries.verify|verify} messages. - * @param message TimeSeries message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeSeries.verify|verify} messages. - * @param message TimeSeries message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITimeSeries, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimeSeries message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimeSeries - * @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.v2alpha.TimeSeries; - - /** - * Decodes a TimeSeries message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimeSeries - * @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.v2alpha.TimeSeries; - - /** - * Verifies a TimeSeries 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 TimeSeries message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimeSeries - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TimeSeries; - - /** - * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. - * @param message TimeSeries - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.TimeSeries, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimeSeries to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TimeSeries - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Point. */ - interface IPoint { - - /** Point interval */ - interval?: (google.cloud.bigquery.migration.v2alpha.ITimeInterval|null); - - /** Point value */ - value?: (google.cloud.bigquery.migration.v2alpha.ITypedValue|null); - } - - /** Represents a Point. */ - class Point implements IPoint { - - /** - * Constructs a new Point. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IPoint); - - /** Point interval. */ - public interval?: (google.cloud.bigquery.migration.v2alpha.ITimeInterval|null); - - /** Point value. */ - public value?: (google.cloud.bigquery.migration.v2alpha.ITypedValue|null); - - /** - * Creates a new Point instance using the specified properties. - * @param [properties] Properties to set - * @returns Point instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IPoint): google.cloud.bigquery.migration.v2alpha.Point; - - /** - * Encodes the specified Point message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Point.verify|verify} messages. - * @param message Point message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Point message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Point.verify|verify} messages. - * @param message Point message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IPoint, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Point message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Point - * @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.v2alpha.Point; - - /** - * Decodes a Point message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Point - * @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.v2alpha.Point; - - /** - * Verifies a Point 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 Point message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Point - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.Point; - - /** - * Creates a plain object from a Point message. Also converts values to other types if specified. - * @param message Point - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.Point, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Point to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Point - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TimeInterval. */ - interface ITimeInterval { - - /** TimeInterval startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** TimeInterval endTime */ - endTime?: (google.protobuf.ITimestamp|null); - } - - /** Represents a TimeInterval. */ - class TimeInterval implements ITimeInterval { - - /** - * Constructs a new TimeInterval. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITimeInterval); - - /** TimeInterval startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** TimeInterval endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new TimeInterval instance using the specified properties. - * @param [properties] Properties to set - * @returns TimeInterval instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITimeInterval): google.cloud.bigquery.migration.v2alpha.TimeInterval; - - /** - * Encodes the specified TimeInterval message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeInterval.verify|verify} messages. - * @param message TimeInterval message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.ITimeInterval, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TimeInterval message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeInterval.verify|verify} messages. - * @param message TimeInterval message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITimeInterval, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TimeInterval message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TimeInterval - * @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.v2alpha.TimeInterval; - - /** - * Decodes a TimeInterval message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TimeInterval - * @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.v2alpha.TimeInterval; - - /** - * Verifies a TimeInterval 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 TimeInterval message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TimeInterval - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TimeInterval; - - /** - * Creates a plain object from a TimeInterval message. Also converts values to other types if specified. - * @param message TimeInterval - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.TimeInterval, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TimeInterval to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TimeInterval - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TypedValue. */ - interface ITypedValue { - - /** TypedValue boolValue */ - boolValue?: (boolean|null); - - /** TypedValue int64Value */ - int64Value?: (number|Long|string|null); - - /** TypedValue doubleValue */ - doubleValue?: (number|null); - - /** TypedValue stringValue */ - stringValue?: (string|null); - - /** TypedValue distributionValue */ - distributionValue?: (google.api.IDistribution|null); - } - - /** Represents a TypedValue. */ - class TypedValue implements ITypedValue { - - /** - * Constructs a new TypedValue. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITypedValue); - - /** TypedValue boolValue. */ - public boolValue?: (boolean|null); - - /** TypedValue int64Value. */ - public int64Value?: (number|Long|string|null); - - /** TypedValue doubleValue. */ - public doubleValue?: (number|null); - - /** TypedValue stringValue. */ - public stringValue?: (string|null); - - /** TypedValue distributionValue. */ - public distributionValue?: (google.api.IDistribution|null); - - /** TypedValue value. */ - public value?: ("boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"); - - /** - * Creates a new TypedValue instance using the specified properties. - * @param [properties] Properties to set - * @returns TypedValue instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITypedValue): google.cloud.bigquery.migration.v2alpha.TypedValue; - - /** - * Encodes the specified TypedValue message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TypedValue.verify|verify} messages. - * @param message TypedValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.ITypedValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TypedValue message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TypedValue.verify|verify} messages. - * @param message TypedValue message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITypedValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TypedValue message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TypedValue - * @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.v2alpha.TypedValue; - - /** - * Decodes a TypedValue message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TypedValue - * @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.v2alpha.TypedValue; - - /** - * Verifies a TypedValue 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 TypedValue message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TypedValue - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TypedValue; - - /** - * Creates a plain object from a TypedValue message. Also converts values to other types if specified. - * @param message TypedValue - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.TypedValue, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TypedValue to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TypedValue - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TranslationFileMapping. */ - interface ITranslationFileMapping { - - /** TranslationFileMapping inputPath */ - inputPath?: (string|null); - - /** TranslationFileMapping outputPath */ - outputPath?: (string|null); - } - - /** Represents a TranslationFileMapping. */ - class TranslationFileMapping implements ITranslationFileMapping { - - /** - * Constructs a new TranslationFileMapping. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping); - - /** TranslationFileMapping inputPath. */ - public inputPath: string; - - /** TranslationFileMapping outputPath. */ - public outputPath: string; - - /** - * Creates a new TranslationFileMapping instance using the specified properties. - * @param [properties] Properties to set - * @returns TranslationFileMapping instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping): google.cloud.bigquery.migration.v2alpha.TranslationFileMapping; - - /** - * Encodes the specified TranslationFileMapping message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.verify|verify} messages. - * @param message TranslationFileMapping message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TranslationFileMapping message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.verify|verify} messages. - * @param message TranslationFileMapping message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TranslationFileMapping message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TranslationFileMapping - * @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.v2alpha.TranslationFileMapping; - - /** - * Decodes a TranslationFileMapping message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TranslationFileMapping - * @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.v2alpha.TranslationFileMapping; - - /** - * Verifies a TranslationFileMapping 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 TranslationFileMapping message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TranslationFileMapping - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TranslationFileMapping; - - /** - * Creates a plain object from a TranslationFileMapping message. Also converts values to other types if specified. - * @param message TranslationFileMapping - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.TranslationFileMapping, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TranslationFileMapping to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TranslationFileMapping - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TranslationTaskDetails. */ - interface ITranslationTaskDetails { - - /** TranslationTaskDetails teradataOptions */ - teradataOptions?: (google.cloud.bigquery.migration.v2alpha.ITeradataOptions|null); - - /** TranslationTaskDetails bteqOptions */ - bteqOptions?: (google.cloud.bigquery.migration.v2alpha.IBteqOptions|null); - - /** TranslationTaskDetails inputPath */ - inputPath?: (string|null); - - /** TranslationTaskDetails outputPath */ - outputPath?: (string|null); - - /** TranslationTaskDetails filePaths */ - filePaths?: (google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping[]|null); - - /** TranslationTaskDetails schemaPath */ - schemaPath?: (string|null); - - /** TranslationTaskDetails fileEncoding */ - fileEncoding?: (google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding|keyof typeof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding|null); - - /** TranslationTaskDetails identifierSettings */ - identifierSettings?: (google.cloud.bigquery.migration.v2alpha.IIdentifierSettings|null); - - /** TranslationTaskDetails specialTokenMap */ - specialTokenMap?: ({ [k: string]: google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.TokenType }|null); - - /** TranslationTaskDetails filter */ - filter?: (google.cloud.bigquery.migration.v2alpha.IFilter|null); - - /** TranslationTaskDetails translationExceptionTable */ - translationExceptionTable?: (string|null); - } - - /** Represents a TranslationTaskDetails. */ - class TranslationTaskDetails implements ITranslationTaskDetails { - - /** - * Constructs a new TranslationTaskDetails. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails); - - /** TranslationTaskDetails teradataOptions. */ - public teradataOptions?: (google.cloud.bigquery.migration.v2alpha.ITeradataOptions|null); - - /** TranslationTaskDetails bteqOptions. */ - public bteqOptions?: (google.cloud.bigquery.migration.v2alpha.IBteqOptions|null); - - /** TranslationTaskDetails inputPath. */ - public inputPath: string; - - /** TranslationTaskDetails outputPath. */ - public outputPath: string; - - /** TranslationTaskDetails filePaths. */ - public filePaths: google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping[]; - - /** TranslationTaskDetails schemaPath. */ - public schemaPath: string; - - /** TranslationTaskDetails fileEncoding. */ - public fileEncoding: (google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding|keyof typeof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding); - - /** TranslationTaskDetails identifierSettings. */ - public identifierSettings?: (google.cloud.bigquery.migration.v2alpha.IIdentifierSettings|null); - - /** TranslationTaskDetails specialTokenMap. */ - public specialTokenMap: { [k: string]: google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.TokenType }; - - /** TranslationTaskDetails filter. */ - public filter?: (google.cloud.bigquery.migration.v2alpha.IFilter|null); - - /** TranslationTaskDetails translationExceptionTable. */ - public translationExceptionTable: string; - - /** TranslationTaskDetails languageOptions. */ - public languageOptions?: ("teradataOptions"|"bteqOptions"); - - /** - * Creates a new TranslationTaskDetails instance using the specified properties. - * @param [properties] Properties to set - * @returns TranslationTaskDetails instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails): google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails; - - /** - * Encodes the specified TranslationTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.verify|verify} messages. - * @param message TranslationTaskDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TranslationTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.verify|verify} messages. - * @param message TranslationTaskDetails message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TranslationTaskDetails message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TranslationTaskDetails - * @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.v2alpha.TranslationTaskDetails; - - /** - * Decodes a TranslationTaskDetails message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TranslationTaskDetails - * @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.v2alpha.TranslationTaskDetails; - - /** - * Verifies a TranslationTaskDetails 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 TranslationTaskDetails message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TranslationTaskDetails - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails; - - /** - * Creates a plain object from a TranslationTaskDetails message. Also converts values to other types if specified. - * @param message TranslationTaskDetails - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TranslationTaskDetails to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TranslationTaskDetails - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace TranslationTaskDetails { - - /** FileEncoding enum. */ - enum FileEncoding { - FILE_ENCODING_UNSPECIFIED = 0, - UTF_8 = 1, - ISO_8859_1 = 2, - US_ASCII = 3, - UTF_16 = 4, - UTF_16LE = 5, - UTF_16BE = 6 - } - - /** TokenType enum. */ - enum TokenType { - TOKEN_TYPE_UNSPECIFIED = 0, - STRING = 1, - INT64 = 2, - NUMERIC = 3, - BOOL = 4, - FLOAT64 = 5, - DATE = 6, - TIMESTAMP = 7 - } - } - - /** Properties of a Filter. */ - interface IFilter { - - /** Filter inputFileExclusionPrefixes */ - inputFileExclusionPrefixes?: (string[]|null); - } - - /** Represents a Filter. */ - class Filter implements IFilter { - - /** - * Constructs a new Filter. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IFilter); - - /** Filter inputFileExclusionPrefixes. */ - public inputFileExclusionPrefixes: string[]; - - /** - * Creates a new Filter instance using the specified properties. - * @param [properties] Properties to set - * @returns Filter instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IFilter): google.cloud.bigquery.migration.v2alpha.Filter; - - /** - * Encodes the specified Filter message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Filter.verify|verify} messages. - * @param message Filter message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IFilter, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Filter message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Filter - * @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.v2alpha.Filter; - - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Filter - * @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.v2alpha.Filter; - - /** - * Verifies a Filter 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 Filter message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Filter - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.Filter; - - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @param message Filter - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.Filter, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Filter to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Filter - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an IdentifierSettings. */ - interface IIdentifierSettings { - - /** IdentifierSettings outputIdentifierCase */ - outputIdentifierCase?: (google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase|keyof typeof google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase|null); - - /** IdentifierSettings identifierRewriteMode */ - identifierRewriteMode?: (google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode|keyof typeof google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode|null); - } - - /** Represents an IdentifierSettings. */ - class IdentifierSettings implements IIdentifierSettings { - - /** - * Constructs a new IdentifierSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IIdentifierSettings); - - /** IdentifierSettings outputIdentifierCase. */ - public outputIdentifierCase: (google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase|keyof typeof google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase); - - /** IdentifierSettings identifierRewriteMode. */ - public identifierRewriteMode: (google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode|keyof typeof google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode); - - /** - * Creates a new IdentifierSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns IdentifierSettings instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IIdentifierSettings): google.cloud.bigquery.migration.v2alpha.IdentifierSettings; - - /** - * Encodes the specified IdentifierSettings message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.IdentifierSettings.verify|verify} messages. - * @param message IdentifierSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IIdentifierSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified IdentifierSettings message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.IdentifierSettings.verify|verify} messages. - * @param message IdentifierSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IIdentifierSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an IdentifierSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns IdentifierSettings - * @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.v2alpha.IdentifierSettings; - - /** - * Decodes an IdentifierSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns IdentifierSettings - * @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.v2alpha.IdentifierSettings; - - /** - * Verifies an IdentifierSettings 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 IdentifierSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns IdentifierSettings - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.IdentifierSettings; - - /** - * Creates a plain object from an IdentifierSettings message. Also converts values to other types if specified. - * @param message IdentifierSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.IdentifierSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this IdentifierSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for IdentifierSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace IdentifierSettings { - - /** IdentifierCase enum. */ - enum IdentifierCase { - IDENTIFIER_CASE_UNSPECIFIED = 0, - ORIGINAL = 1, - UPPER = 2, - LOWER = 3 - } - - /** IdentifierRewriteMode enum. */ - enum IdentifierRewriteMode { - IDENTIFIER_REWRITE_MODE_UNSPECIFIED = 0, - NONE = 1, - REWRITE_ALL = 2 - } - } - - /** Properties of a TeradataOptions. */ - interface ITeradataOptions { - } - - /** Represents a TeradataOptions. */ - class TeradataOptions implements ITeradataOptions { - - /** - * Constructs a new TeradataOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITeradataOptions); - - /** - * Creates a new TeradataOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns TeradataOptions instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITeradataOptions): google.cloud.bigquery.migration.v2alpha.TeradataOptions; - - /** - * Encodes the specified TeradataOptions message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TeradataOptions.verify|verify} messages. - * @param message TeradataOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.ITeradataOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TeradataOptions message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TeradataOptions.verify|verify} messages. - * @param message TeradataOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITeradataOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TeradataOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TeradataOptions - * @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.v2alpha.TeradataOptions; - - /** - * Decodes a TeradataOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TeradataOptions - * @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.v2alpha.TeradataOptions; - - /** - * Verifies a TeradataOptions 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 TeradataOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TeradataOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TeradataOptions; - - /** - * Creates a plain object from a TeradataOptions message. Also converts values to other types if specified. - * @param message TeradataOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.TeradataOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TeradataOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TeradataOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BteqOptions. */ - interface IBteqOptions { - - /** BteqOptions projectDataset */ - projectDataset?: (google.cloud.bigquery.migration.v2alpha.IDatasetReference|null); - - /** BteqOptions defaultPathUri */ - defaultPathUri?: (string|null); - - /** BteqOptions fileReplacementMap */ - fileReplacementMap?: ({ [k: string]: string }|null); - } - - /** Represents a BteqOptions. */ - class BteqOptions implements IBteqOptions { - - /** - * Constructs a new BteqOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IBteqOptions); - - /** BteqOptions projectDataset. */ - public projectDataset?: (google.cloud.bigquery.migration.v2alpha.IDatasetReference|null); - - /** BteqOptions defaultPathUri. */ - public defaultPathUri: string; - - /** BteqOptions fileReplacementMap. */ - public fileReplacementMap: { [k: string]: string }; - - /** - * Creates a new BteqOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns BteqOptions instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IBteqOptions): google.cloud.bigquery.migration.v2alpha.BteqOptions; - - /** - * Encodes the specified BteqOptions message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.BteqOptions.verify|verify} messages. - * @param message BteqOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IBteqOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BteqOptions message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.BteqOptions.verify|verify} messages. - * @param message BteqOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IBteqOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BteqOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BteqOptions - * @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.v2alpha.BteqOptions; - - /** - * Decodes a BteqOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BteqOptions - * @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.v2alpha.BteqOptions; - - /** - * Verifies a BteqOptions 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 BteqOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BteqOptions - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.BteqOptions; - - /** - * Creates a plain object from a BteqOptions message. Also converts values to other types if specified. - * @param message BteqOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.BteqOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BteqOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BteqOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DatasetReference. */ - interface IDatasetReference { - - /** DatasetReference datasetId */ - datasetId?: (string|null); - - /** DatasetReference projectId */ - projectId?: (string|null); - } - - /** Represents a DatasetReference. */ - class DatasetReference implements IDatasetReference { - - /** - * Constructs a new DatasetReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IDatasetReference); - - /** DatasetReference datasetId. */ - public datasetId: string; - - /** DatasetReference projectId. */ - public projectId: string; - - /** - * Creates a new DatasetReference instance using the specified properties. - * @param [properties] Properties to set - * @returns DatasetReference instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IDatasetReference): google.cloud.bigquery.migration.v2alpha.DatasetReference; - - /** - * Encodes the specified DatasetReference message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DatasetReference.verify|verify} messages. - * @param message DatasetReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IDatasetReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DatasetReference message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DatasetReference.verify|verify} messages. - * @param message DatasetReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IDatasetReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DatasetReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DatasetReference - * @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.v2alpha.DatasetReference; - - /** - * Decodes a DatasetReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DatasetReference - * @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.v2alpha.DatasetReference; - - /** - * Verifies a DatasetReference 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 DatasetReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DatasetReference - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.DatasetReference; - - /** - * Creates a plain object from a DatasetReference message. Also converts values to other types if specified. - * @param message DatasetReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.DatasetReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DatasetReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DatasetReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a MigrationService */ - class MigrationService extends $protobuf.rpc.Service { - - /** - * Constructs a new MigrationService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new MigrationService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): MigrationService; - - /** - * Calls CreateMigrationWorkflow. - * @param request CreateMigrationWorkflowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MigrationWorkflow - */ - public createMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2alpha.MigrationService.CreateMigrationWorkflowCallback): void; - - /** - * Calls CreateMigrationWorkflow. - * @param request CreateMigrationWorkflowRequest message or plain object - * @returns Promise - */ - public createMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest): Promise; - - /** - * Calls GetMigrationWorkflow. - * @param request GetMigrationWorkflowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MigrationWorkflow - */ - public getMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationWorkflowCallback): void; - - /** - * Calls GetMigrationWorkflow. - * @param request GetMigrationWorkflowRequest message or plain object - * @returns Promise - */ - public getMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest): Promise; - - /** - * Calls ListMigrationWorkflows. - * @param request ListMigrationWorkflowsRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMigrationWorkflowsResponse - */ - public listMigrationWorkflows(request: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, callback: google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationWorkflowsCallback): void; - - /** - * Calls ListMigrationWorkflows. - * @param request ListMigrationWorkflowsRequest message or plain object - * @returns Promise - */ - public listMigrationWorkflows(request: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest): Promise; - - /** - * Calls DeleteMigrationWorkflow. - * @param request DeleteMigrationWorkflowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public deleteMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2alpha.MigrationService.DeleteMigrationWorkflowCallback): void; - - /** - * Calls DeleteMigrationWorkflow. - * @param request DeleteMigrationWorkflowRequest message or plain object - * @returns Promise - */ - public deleteMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest): Promise; - - /** - * Calls StartMigrationWorkflow. - * @param request StartMigrationWorkflowRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Empty - */ - public startMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest, callback: google.cloud.bigquery.migration.v2alpha.MigrationService.StartMigrationWorkflowCallback): void; - - /** - * Calls StartMigrationWorkflow. - * @param request StartMigrationWorkflowRequest message or plain object - * @returns Promise - */ - public startMigrationWorkflow(request: google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest): Promise; - - /** - * Calls GetMigrationSubtask. - * @param request GetMigrationSubtaskRequest message or plain object - * @param callback Node-style callback called with the error, if any, and MigrationSubtask - */ - public getMigrationSubtask(request: google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest, callback: google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationSubtaskCallback): void; - - /** - * Calls GetMigrationSubtask. - * @param request GetMigrationSubtaskRequest message or plain object - * @returns Promise - */ - public getMigrationSubtask(request: google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest): Promise; - - /** - * Calls ListMigrationSubtasks. - * @param request ListMigrationSubtasksRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListMigrationSubtasksResponse - */ - public listMigrationSubtasks(request: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, callback: google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationSubtasksCallback): void; - - /** - * Calls ListMigrationSubtasks. - * @param request ListMigrationSubtasksRequest message or plain object - * @returns Promise - */ - public listMigrationSubtasks(request: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest): Promise; - } - - namespace MigrationService { - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|createMigrationWorkflow}. - * @param error Error, if any - * @param [response] MigrationWorkflow - */ - type CreateMigrationWorkflowCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2alpha.MigrationWorkflow) => void; - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|getMigrationWorkflow}. - * @param error Error, if any - * @param [response] MigrationWorkflow - */ - type GetMigrationWorkflowCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2alpha.MigrationWorkflow) => void; - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|listMigrationWorkflows}. - * @param error Error, if any - * @param [response] ListMigrationWorkflowsResponse - */ - type ListMigrationWorkflowsCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse) => void; - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|deleteMigrationWorkflow}. - * @param error Error, if any - * @param [response] Empty - */ - type DeleteMigrationWorkflowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|startMigrationWorkflow}. - * @param error Error, if any - * @param [response] Empty - */ - type StartMigrationWorkflowCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|getMigrationSubtask}. - * @param error Error, if any - * @param [response] MigrationSubtask - */ - type GetMigrationSubtaskCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2alpha.MigrationSubtask) => void; - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|listMigrationSubtasks}. - * @param error Error, if any - * @param [response] ListMigrationSubtasksResponse - */ - type ListMigrationSubtasksCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse) => void; - } - - /** Properties of a CreateMigrationWorkflowRequest. */ - interface ICreateMigrationWorkflowRequest { - - /** CreateMigrationWorkflowRequest parent */ - parent?: (string|null); - - /** CreateMigrationWorkflowRequest migrationWorkflow */ - migrationWorkflow?: (google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow|null); - } - - /** Represents a CreateMigrationWorkflowRequest. */ - class CreateMigrationWorkflowRequest implements ICreateMigrationWorkflowRequest { - - /** - * Constructs a new CreateMigrationWorkflowRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest); - - /** CreateMigrationWorkflowRequest parent. */ - public parent: string; - - /** CreateMigrationWorkflowRequest migrationWorkflow. */ - public migrationWorkflow?: (google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow|null); - - /** - * Creates a new CreateMigrationWorkflowRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns CreateMigrationWorkflowRequest instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest): google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest; - - /** - * Encodes the specified CreateMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest.verify|verify} messages. - * @param message CreateMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CreateMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest.verify|verify} messages. - * @param message CreateMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CreateMigrationWorkflowRequest - * @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.v2alpha.CreateMigrationWorkflowRequest; - - /** - * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CreateMigrationWorkflowRequest - * @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.v2alpha.CreateMigrationWorkflowRequest; - - /** - * Verifies a CreateMigrationWorkflowRequest 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 CreateMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CreateMigrationWorkflowRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest; - - /** - * Creates a plain object from a CreateMigrationWorkflowRequest message. Also converts values to other types if specified. - * @param message CreateMigrationWorkflowRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CreateMigrationWorkflowRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CreateMigrationWorkflowRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetMigrationWorkflowRequest. */ - interface IGetMigrationWorkflowRequest { - - /** GetMigrationWorkflowRequest name */ - name?: (string|null); - - /** GetMigrationWorkflowRequest readMask */ - readMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents a GetMigrationWorkflowRequest. */ - class GetMigrationWorkflowRequest implements IGetMigrationWorkflowRequest { - - /** - * Constructs a new GetMigrationWorkflowRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest); - - /** GetMigrationWorkflowRequest name. */ - public name: string; - - /** GetMigrationWorkflowRequest readMask. */ - public readMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new GetMigrationWorkflowRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetMigrationWorkflowRequest instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest): google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest; - - /** - * Encodes the specified GetMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest.verify|verify} messages. - * @param message GetMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest.verify|verify} messages. - * @param message GetMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetMigrationWorkflowRequest - * @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.v2alpha.GetMigrationWorkflowRequest; - - /** - * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetMigrationWorkflowRequest - * @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.v2alpha.GetMigrationWorkflowRequest; - - /** - * Verifies a GetMigrationWorkflowRequest 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 GetMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetMigrationWorkflowRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest; - - /** - * Creates a plain object from a GetMigrationWorkflowRequest message. Also converts values to other types if specified. - * @param message GetMigrationWorkflowRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetMigrationWorkflowRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetMigrationWorkflowRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListMigrationWorkflowsRequest. */ - interface IListMigrationWorkflowsRequest { - - /** ListMigrationWorkflowsRequest parent */ - parent?: (string|null); - - /** ListMigrationWorkflowsRequest readMask */ - readMask?: (google.protobuf.IFieldMask|null); - - /** ListMigrationWorkflowsRequest pageSize */ - pageSize?: (number|null); - - /** ListMigrationWorkflowsRequest pageToken */ - pageToken?: (string|null); - } - - /** Represents a ListMigrationWorkflowsRequest. */ - class ListMigrationWorkflowsRequest implements IListMigrationWorkflowsRequest { - - /** - * Constructs a new ListMigrationWorkflowsRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest); - - /** ListMigrationWorkflowsRequest parent. */ - public parent: string; - - /** ListMigrationWorkflowsRequest readMask. */ - public readMask?: (google.protobuf.IFieldMask|null); - - /** ListMigrationWorkflowsRequest pageSize. */ - public pageSize: number; - - /** ListMigrationWorkflowsRequest pageToken. */ - public pageToken: string; - - /** - * Creates a new ListMigrationWorkflowsRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMigrationWorkflowsRequest instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest): google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest; - - /** - * Encodes the specified ListMigrationWorkflowsRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest.verify|verify} messages. - * @param message ListMigrationWorkflowsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListMigrationWorkflowsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest.verify|verify} messages. - * @param message ListMigrationWorkflowsRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMigrationWorkflowsRequest - * @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.v2alpha.ListMigrationWorkflowsRequest; - - /** - * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMigrationWorkflowsRequest - * @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.v2alpha.ListMigrationWorkflowsRequest; - - /** - * Verifies a ListMigrationWorkflowsRequest 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 ListMigrationWorkflowsRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMigrationWorkflowsRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest; - - /** - * Creates a plain object from a ListMigrationWorkflowsRequest message. Also converts values to other types if specified. - * @param message ListMigrationWorkflowsRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListMigrationWorkflowsRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListMigrationWorkflowsRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListMigrationWorkflowsResponse. */ - interface IListMigrationWorkflowsResponse { - - /** ListMigrationWorkflowsResponse migrationWorkflows */ - migrationWorkflows?: (google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[]|null); - - /** ListMigrationWorkflowsResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListMigrationWorkflowsResponse. */ - class ListMigrationWorkflowsResponse implements IListMigrationWorkflowsResponse { - - /** - * Constructs a new ListMigrationWorkflowsResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse); - - /** ListMigrationWorkflowsResponse migrationWorkflows. */ - public migrationWorkflows: google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[]; - - /** ListMigrationWorkflowsResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListMigrationWorkflowsResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMigrationWorkflowsResponse instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse): google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse; - - /** - * Encodes the specified ListMigrationWorkflowsResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse.verify|verify} messages. - * @param message ListMigrationWorkflowsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListMigrationWorkflowsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse.verify|verify} messages. - * @param message ListMigrationWorkflowsResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMigrationWorkflowsResponse - * @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.v2alpha.ListMigrationWorkflowsResponse; - - /** - * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMigrationWorkflowsResponse - * @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.v2alpha.ListMigrationWorkflowsResponse; - - /** - * Verifies a ListMigrationWorkflowsResponse 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 ListMigrationWorkflowsResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMigrationWorkflowsResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse; - - /** - * Creates a plain object from a ListMigrationWorkflowsResponse message. Also converts values to other types if specified. - * @param message ListMigrationWorkflowsResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListMigrationWorkflowsResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListMigrationWorkflowsResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DeleteMigrationWorkflowRequest. */ - interface IDeleteMigrationWorkflowRequest { - - /** DeleteMigrationWorkflowRequest name */ - name?: (string|null); - } - - /** Represents a DeleteMigrationWorkflowRequest. */ - class DeleteMigrationWorkflowRequest implements IDeleteMigrationWorkflowRequest { - - /** - * Constructs a new DeleteMigrationWorkflowRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest); - - /** DeleteMigrationWorkflowRequest name. */ - public name: string; - - /** - * Creates a new DeleteMigrationWorkflowRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns DeleteMigrationWorkflowRequest instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest): google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest; - - /** - * Encodes the specified DeleteMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest.verify|verify} messages. - * @param message DeleteMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DeleteMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest.verify|verify} messages. - * @param message DeleteMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DeleteMigrationWorkflowRequest - * @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.v2alpha.DeleteMigrationWorkflowRequest; - - /** - * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DeleteMigrationWorkflowRequest - * @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.v2alpha.DeleteMigrationWorkflowRequest; - - /** - * Verifies a DeleteMigrationWorkflowRequest 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 DeleteMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DeleteMigrationWorkflowRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest; - - /** - * Creates a plain object from a DeleteMigrationWorkflowRequest message. Also converts values to other types if specified. - * @param message DeleteMigrationWorkflowRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DeleteMigrationWorkflowRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DeleteMigrationWorkflowRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a StartMigrationWorkflowRequest. */ - interface IStartMigrationWorkflowRequest { - - /** StartMigrationWorkflowRequest name */ - name?: (string|null); - } - - /** Represents a StartMigrationWorkflowRequest. */ - class StartMigrationWorkflowRequest implements IStartMigrationWorkflowRequest { - - /** - * Constructs a new StartMigrationWorkflowRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest); - - /** StartMigrationWorkflowRequest name. */ - public name: string; - - /** - * Creates a new StartMigrationWorkflowRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns StartMigrationWorkflowRequest instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest): google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest; - - /** - * Encodes the specified StartMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest.verify|verify} messages. - * @param message StartMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified StartMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest.verify|verify} messages. - * @param message StartMigrationWorkflowRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns StartMigrationWorkflowRequest - * @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.v2alpha.StartMigrationWorkflowRequest; - - /** - * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns StartMigrationWorkflowRequest - * @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.v2alpha.StartMigrationWorkflowRequest; - - /** - * Verifies a StartMigrationWorkflowRequest 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 StartMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns StartMigrationWorkflowRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest; - - /** - * Creates a plain object from a StartMigrationWorkflowRequest message. Also converts values to other types if specified. - * @param message StartMigrationWorkflowRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this StartMigrationWorkflowRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for StartMigrationWorkflowRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GetMigrationSubtaskRequest. */ - interface IGetMigrationSubtaskRequest { - - /** GetMigrationSubtaskRequest name */ - name?: (string|null); - - /** GetMigrationSubtaskRequest readMask */ - readMask?: (google.protobuf.IFieldMask|null); - } - - /** Represents a GetMigrationSubtaskRequest. */ - class GetMigrationSubtaskRequest implements IGetMigrationSubtaskRequest { - - /** - * Constructs a new GetMigrationSubtaskRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest); - - /** GetMigrationSubtaskRequest name. */ - public name: string; - - /** GetMigrationSubtaskRequest readMask. */ - public readMask?: (google.protobuf.IFieldMask|null); - - /** - * Creates a new GetMigrationSubtaskRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns GetMigrationSubtaskRequest instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest): google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest; - - /** - * Encodes the specified GetMigrationSubtaskRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest.verify|verify} messages. - * @param message GetMigrationSubtaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GetMigrationSubtaskRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest.verify|verify} messages. - * @param message GetMigrationSubtaskRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GetMigrationSubtaskRequest - * @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.v2alpha.GetMigrationSubtaskRequest; - - /** - * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GetMigrationSubtaskRequest - * @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.v2alpha.GetMigrationSubtaskRequest; - - /** - * Verifies a GetMigrationSubtaskRequest 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 GetMigrationSubtaskRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GetMigrationSubtaskRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest; - - /** - * Creates a plain object from a GetMigrationSubtaskRequest message. Also converts values to other types if specified. - * @param message GetMigrationSubtaskRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GetMigrationSubtaskRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GetMigrationSubtaskRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListMigrationSubtasksRequest. */ - interface IListMigrationSubtasksRequest { - - /** ListMigrationSubtasksRequest parent */ - parent?: (string|null); - - /** ListMigrationSubtasksRequest readMask */ - readMask?: (google.protobuf.IFieldMask|null); - - /** ListMigrationSubtasksRequest pageSize */ - pageSize?: (number|null); - - /** ListMigrationSubtasksRequest pageToken */ - pageToken?: (string|null); - - /** ListMigrationSubtasksRequest filter */ - filter?: (string|null); - } - - /** Represents a ListMigrationSubtasksRequest. */ - class ListMigrationSubtasksRequest implements IListMigrationSubtasksRequest { - - /** - * Constructs a new ListMigrationSubtasksRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest); - - /** ListMigrationSubtasksRequest parent. */ - public parent: string; - - /** ListMigrationSubtasksRequest readMask. */ - public readMask?: (google.protobuf.IFieldMask|null); - - /** ListMigrationSubtasksRequest pageSize. */ - public pageSize: number; - - /** ListMigrationSubtasksRequest pageToken. */ - public pageToken: string; - - /** ListMigrationSubtasksRequest filter. */ - public filter: string; - - /** - * Creates a new ListMigrationSubtasksRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMigrationSubtasksRequest instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest): google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest; - - /** - * Encodes the specified ListMigrationSubtasksRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest.verify|verify} messages. - * @param message ListMigrationSubtasksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListMigrationSubtasksRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest.verify|verify} messages. - * @param message ListMigrationSubtasksRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMigrationSubtasksRequest - * @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.v2alpha.ListMigrationSubtasksRequest; - - /** - * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMigrationSubtasksRequest - * @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.v2alpha.ListMigrationSubtasksRequest; - - /** - * Verifies a ListMigrationSubtasksRequest 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 ListMigrationSubtasksRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMigrationSubtasksRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest; - - /** - * Creates a plain object from a ListMigrationSubtasksRequest message. Also converts values to other types if specified. - * @param message ListMigrationSubtasksRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListMigrationSubtasksRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListMigrationSubtasksRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ListMigrationSubtasksResponse. */ - interface IListMigrationSubtasksResponse { - - /** ListMigrationSubtasksResponse migrationSubtasks */ - migrationSubtasks?: (google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[]|null); - - /** ListMigrationSubtasksResponse nextPageToken */ - nextPageToken?: (string|null); - } - - /** Represents a ListMigrationSubtasksResponse. */ - class ListMigrationSubtasksResponse implements IListMigrationSubtasksResponse { - - /** - * Constructs a new ListMigrationSubtasksResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse); - - /** ListMigrationSubtasksResponse migrationSubtasks. */ - public migrationSubtasks: google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[]; - - /** ListMigrationSubtasksResponse nextPageToken. */ - public nextPageToken: string; - - /** - * Creates a new ListMigrationSubtasksResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns ListMigrationSubtasksResponse instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse): google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse; - - /** - * Encodes the specified ListMigrationSubtasksResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse.verify|verify} messages. - * @param message ListMigrationSubtasksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ListMigrationSubtasksResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse.verify|verify} messages. - * @param message ListMigrationSubtasksResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ListMigrationSubtasksResponse - * @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.v2alpha.ListMigrationSubtasksResponse; - - /** - * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ListMigrationSubtasksResponse - * @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.v2alpha.ListMigrationSubtasksResponse; - - /** - * Verifies a ListMigrationSubtasksResponse 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 ListMigrationSubtasksResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ListMigrationSubtasksResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse; - - /** - * Creates a plain object from a ListMigrationSubtasksResponse message. Also converts values to other types if specified. - * @param message ListMigrationSubtasksResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ListMigrationSubtasksResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ListMigrationSubtasksResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Represents a SqlTranslationService */ - class SqlTranslationService extends $protobuf.rpc.Service { - - /** - * Constructs a new SqlTranslationService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - - /** - * Creates new SqlTranslationService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. - */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): SqlTranslationService; - - /** - * Calls TranslateQuery. - * @param request TranslateQueryRequest message or plain object - * @param callback Node-style callback called with the error, if any, and TranslateQueryResponse - */ - public translateQuery(request: google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest, callback: google.cloud.bigquery.migration.v2alpha.SqlTranslationService.TranslateQueryCallback): void; - - /** - * Calls TranslateQuery. - * @param request TranslateQueryRequest message or plain object - * @returns Promise - */ - public translateQuery(request: google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest): Promise; - } - - namespace SqlTranslationService { - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationService|translateQuery}. - * @param error Error, if any - * @param [response] TranslateQueryResponse - */ - type TranslateQueryCallback = (error: (Error|null), response?: google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse) => void; - } - - /** Properties of a TranslateQueryRequest. */ - interface ITranslateQueryRequest { - - /** TranslateQueryRequest parent */ - parent?: (string|null); - - /** TranslateQueryRequest sourceDialect */ - sourceDialect?: (google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect|keyof typeof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect|null); - - /** TranslateQueryRequest query */ - query?: (string|null); - } - - /** Represents a TranslateQueryRequest. */ - class TranslateQueryRequest implements ITranslateQueryRequest { - - /** - * Constructs a new TranslateQueryRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest); - - /** TranslateQueryRequest parent. */ - public parent: string; - - /** TranslateQueryRequest sourceDialect. */ - public sourceDialect: (google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect|keyof typeof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect); - - /** TranslateQueryRequest query. */ - public query: string; - - /** - * Creates a new TranslateQueryRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns TranslateQueryRequest instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest): google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest; - - /** - * Encodes the specified TranslateQueryRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.verify|verify} messages. - * @param message TranslateQueryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TranslateQueryRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.verify|verify} messages. - * @param message TranslateQueryRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TranslateQueryRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TranslateQueryRequest - * @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.v2alpha.TranslateQueryRequest; - - /** - * Decodes a TranslateQueryRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TranslateQueryRequest - * @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.v2alpha.TranslateQueryRequest; - - /** - * Verifies a TranslateQueryRequest 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 TranslateQueryRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TranslateQueryRequest - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest; - - /** - * Creates a plain object from a TranslateQueryRequest message. Also converts values to other types if specified. - * @param message TranslateQueryRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TranslateQueryRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TranslateQueryRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace TranslateQueryRequest { - - /** SqlTranslationSourceDialect enum. */ - enum SqlTranslationSourceDialect { - SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED = 0, - TERADATA = 1 - } - } - - /** Properties of a TranslateQueryResponse. */ - interface ITranslateQueryResponse { - - /** TranslateQueryResponse translationJob */ - translationJob?: (string|null); - - /** TranslateQueryResponse translatedQuery */ - translatedQuery?: (string|null); - - /** TranslateQueryResponse errors */ - errors?: (google.cloud.bigquery.migration.v2alpha.ISqlTranslationError[]|null); - - /** TranslateQueryResponse warnings */ - warnings?: (google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning[]|null); - } - - /** Represents a TranslateQueryResponse. */ - class TranslateQueryResponse implements ITranslateQueryResponse { - - /** - * Constructs a new TranslateQueryResponse. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse); - - /** TranslateQueryResponse translationJob. */ - public translationJob: string; - - /** TranslateQueryResponse translatedQuery. */ - public translatedQuery: string; - - /** TranslateQueryResponse errors. */ - public errors: google.cloud.bigquery.migration.v2alpha.ISqlTranslationError[]; - - /** TranslateQueryResponse warnings. */ - public warnings: google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning[]; - - /** - * Creates a new TranslateQueryResponse instance using the specified properties. - * @param [properties] Properties to set - * @returns TranslateQueryResponse instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse): google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse; - - /** - * Encodes the specified TranslateQueryResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.verify|verify} messages. - * @param message TranslateQueryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified TranslateQueryResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.verify|verify} messages. - * @param message TranslateQueryResponse message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a TranslateQueryResponse message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns TranslateQueryResponse - * @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.v2alpha.TranslateQueryResponse; - - /** - * Decodes a TranslateQueryResponse message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns TranslateQueryResponse - * @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.v2alpha.TranslateQueryResponse; - - /** - * Verifies a TranslateQueryResponse 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 TranslateQueryResponse message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns TranslateQueryResponse - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse; - - /** - * Creates a plain object from a TranslateQueryResponse message. Also converts values to other types if specified. - * @param message TranslateQueryResponse - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this TranslateQueryResponse to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for TranslateQueryResponse - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SqlTranslationErrorDetail. */ - interface ISqlTranslationErrorDetail { - - /** SqlTranslationErrorDetail row */ - row?: (number|Long|string|null); - - /** SqlTranslationErrorDetail column */ - column?: (number|Long|string|null); - - /** SqlTranslationErrorDetail message */ - message?: (string|null); - } - - /** Represents a SqlTranslationErrorDetail. */ - class SqlTranslationErrorDetail implements ISqlTranslationErrorDetail { - - /** - * Constructs a new SqlTranslationErrorDetail. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail); - - /** SqlTranslationErrorDetail row. */ - public row: (number|Long|string); - - /** SqlTranslationErrorDetail column. */ - public column: (number|Long|string); - - /** SqlTranslationErrorDetail message. */ - public message: string; - - /** - * Creates a new SqlTranslationErrorDetail instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlTranslationErrorDetail instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail): google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail; - - /** - * Encodes the specified SqlTranslationErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.verify|verify} messages. - * @param message SqlTranslationErrorDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlTranslationErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.verify|verify} messages. - * @param message SqlTranslationErrorDetail message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlTranslationErrorDetail message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlTranslationErrorDetail - * @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.v2alpha.SqlTranslationErrorDetail; - - /** - * Decodes a SqlTranslationErrorDetail message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlTranslationErrorDetail - * @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.v2alpha.SqlTranslationErrorDetail; - - /** - * Verifies a SqlTranslationErrorDetail 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 SqlTranslationErrorDetail message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlTranslationErrorDetail - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail; - - /** - * Creates a plain object from a SqlTranslationErrorDetail message. Also converts values to other types if specified. - * @param message SqlTranslationErrorDetail - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlTranslationErrorDetail to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlTranslationErrorDetail - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a SqlTranslationError. */ - interface ISqlTranslationError { - - /** SqlTranslationError errorType */ - errorType?: (google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType|keyof typeof google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType|null); - - /** SqlTranslationError errorDetail */ - errorDetail?: (google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null); - } - - /** Represents a SqlTranslationError. */ - class SqlTranslationError implements ISqlTranslationError { - - /** - * Constructs a new SqlTranslationError. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.ISqlTranslationError); - - /** SqlTranslationError errorType. */ - public errorType: (google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType|keyof typeof google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType); - - /** SqlTranslationError errorDetail. */ - public errorDetail?: (google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null); - - /** - * Creates a new SqlTranslationError instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlTranslationError instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.ISqlTranslationError): google.cloud.bigquery.migration.v2alpha.SqlTranslationError; - - /** - * Encodes the specified SqlTranslationError message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationError.verify|verify} messages. - * @param message SqlTranslationError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.ISqlTranslationError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlTranslationError message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationError.verify|verify} messages. - * @param message SqlTranslationError message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ISqlTranslationError, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlTranslationError message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlTranslationError - * @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.v2alpha.SqlTranslationError; - - /** - * Decodes a SqlTranslationError message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlTranslationError - * @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.v2alpha.SqlTranslationError; - - /** - * Verifies a SqlTranslationError 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 SqlTranslationError message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlTranslationError - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.SqlTranslationError; - - /** - * Creates a plain object from a SqlTranslationError message. Also converts values to other types if specified. - * @param message SqlTranslationError - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.SqlTranslationError, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlTranslationError to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlTranslationError - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SqlTranslationError { - - /** SqlTranslationErrorType enum. */ - enum SqlTranslationErrorType { - SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED = 0, - SQL_PARSE_ERROR = 1, - UNSUPPORTED_SQL_FUNCTION = 2 - } - } - - /** Properties of a SqlTranslationWarning. */ - interface ISqlTranslationWarning { - - /** SqlTranslationWarning warningDetail */ - warningDetail?: (google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null); - } - - /** Represents a SqlTranslationWarning. */ - class SqlTranslationWarning implements ISqlTranslationWarning { - - /** - * Constructs a new SqlTranslationWarning. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning); - - /** SqlTranslationWarning warningDetail. */ - public warningDetail?: (google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null); - - /** - * Creates a new SqlTranslationWarning instance using the specified properties. - * @param [properties] Properties to set - * @returns SqlTranslationWarning instance - */ - public static create(properties?: google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning): google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning; - - /** - * Encodes the specified SqlTranslationWarning message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.verify|verify} messages. - * @param message SqlTranslationWarning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SqlTranslationWarning message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.verify|verify} messages. - * @param message SqlTranslationWarning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SqlTranslationWarning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SqlTranslationWarning - * @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.v2alpha.SqlTranslationWarning; - - /** - * Decodes a SqlTranslationWarning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SqlTranslationWarning - * @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.v2alpha.SqlTranslationWarning; - - /** - * Verifies a SqlTranslationWarning 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 SqlTranslationWarning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SqlTranslationWarning - */ - public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning; - - /** - * Creates a plain object from a SqlTranslationWarning message. Also converts values to other types if specified. - * @param message SqlTranslationWarning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SqlTranslationWarning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SqlTranslationWarning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - } - } - } - - /** Namespace api. */ - namespace api { - - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } - - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { - - /** ResourceDescriptor type */ - type?: (string|null); - - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); - - /** ResourceDescriptor nameField */ - nameField?: (string|null); - - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); - - /** ResourceDescriptor plural */ - plural?: (string|null); - - /** ResourceDescriptor singular */ - singular?: (string|null); - - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } - - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { - - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); - - /** ResourceDescriptor type. */ - public type: string; - - /** ResourceDescriptor pattern. */ - public pattern: string[]; - - /** ResourceDescriptor nameField. */ - public nameField: string; - - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); - - /** ResourceDescriptor plural. */ - public plural: string; - - /** ResourceDescriptor singular. */ - public singular: string; - - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @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.api.ResourceDescriptor; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceDescriptor - * @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.api.ResourceDescriptor; - - /** - * Verifies a ResourceDescriptor 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 ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @param message ResourceDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ResourceDescriptor { - - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } - - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } - - /** Properties of a ResourceReference. */ - interface IResourceReference { - - /** ResourceReference type */ - type?: (string|null); - - /** ResourceReference childType */ - childType?: (string|null); - } - - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { - - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); - - /** ResourceReference type. */ - public type: string; - - /** ResourceReference childType. */ - public childType: string; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceReference instance - */ - public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceReference - * @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.api.ResourceReference; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceReference - * @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.api.ResourceReference; - - /** - * Verifies a ResourceReference 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 ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @param message ResourceReference - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceReference - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Distribution. */ - interface IDistribution { - - /** Distribution count */ - count?: (number|Long|string|null); - - /** Distribution mean */ - mean?: (number|null); - - /** Distribution sumOfSquaredDeviation */ - sumOfSquaredDeviation?: (number|null); - - /** Distribution range */ - range?: (google.api.Distribution.IRange|null); - - /** Distribution bucketOptions */ - bucketOptions?: (google.api.Distribution.IBucketOptions|null); - - /** Distribution bucketCounts */ - bucketCounts?: ((number|Long|string)[]|null); - - /** Distribution exemplars */ - exemplars?: (google.api.Distribution.IExemplar[]|null); - } - - /** Represents a Distribution. */ - class Distribution implements IDistribution { - - /** - * Constructs a new Distribution. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDistribution); - - /** Distribution count. */ - public count: (number|Long|string); - - /** Distribution mean. */ - public mean: number; - - /** Distribution sumOfSquaredDeviation. */ - public sumOfSquaredDeviation: number; - - /** Distribution range. */ - public range?: (google.api.Distribution.IRange|null); - - /** Distribution bucketOptions. */ - public bucketOptions?: (google.api.Distribution.IBucketOptions|null); - - /** Distribution bucketCounts. */ - public bucketCounts: (number|Long|string)[]; - - /** Distribution exemplars. */ - public exemplars: google.api.Distribution.IExemplar[]; - - /** - * Creates a new Distribution instance using the specified properties. - * @param [properties] Properties to set - * @returns Distribution instance - */ - public static create(properties?: google.api.IDistribution): google.api.Distribution; - - /** - * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @param message Distribution message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDistribution, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Distribution message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Distribution - * @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.api.Distribution; - - /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Distribution - * @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.api.Distribution; - - /** - * Verifies a Distribution 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 Distribution message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Distribution - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution; - - /** - * Creates a plain object from a Distribution message. Also converts values to other types if specified. - * @param message Distribution - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Distribution to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Distribution - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Distribution { - - /** Properties of a Range. */ - interface IRange { - - /** Range min */ - min?: (number|null); - - /** Range max */ - max?: (number|null); - } - - /** Represents a Range. */ - class Range implements IRange { - - /** - * Constructs a new Range. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.IRange); - - /** Range min. */ - public min: number; - - /** Range max. */ - public max: number; - - /** - * Creates a new Range instance using the specified properties. - * @param [properties] Properties to set - * @returns Range instance - */ - public static create(properties?: google.api.Distribution.IRange): google.api.Distribution.Range; - - /** - * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @param message Range message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @param message Range message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.IRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Range message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Range - * @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.api.Distribution.Range; - - /** - * Decodes a Range message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Range - * @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.api.Distribution.Range; - - /** - * Verifies a Range 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 Range message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Range - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.Range; - - /** - * Creates a plain object from a Range message. Also converts values to other types if specified. - * @param message Range - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.Range, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Range to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Range - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a BucketOptions. */ - interface IBucketOptions { - - /** BucketOptions linearBuckets */ - linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); - - /** BucketOptions exponentialBuckets */ - exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); - - /** BucketOptions explicitBuckets */ - explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); - } - - /** Represents a BucketOptions. */ - class BucketOptions implements IBucketOptions { - - /** - * Constructs a new BucketOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.IBucketOptions); - - /** BucketOptions linearBuckets. */ - public linearBuckets?: (google.api.Distribution.BucketOptions.ILinear|null); - - /** BucketOptions exponentialBuckets. */ - public exponentialBuckets?: (google.api.Distribution.BucketOptions.IExponential|null); - - /** BucketOptions explicitBuckets. */ - public explicitBuckets?: (google.api.Distribution.BucketOptions.IExplicit|null); - - /** BucketOptions options. */ - public options?: ("linearBuckets"|"exponentialBuckets"|"explicitBuckets"); - - /** - * Creates a new BucketOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns BucketOptions instance - */ - public static create(properties?: google.api.Distribution.IBucketOptions): google.api.Distribution.BucketOptions; - - /** - * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @param message BucketOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @param message BucketOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.IBucketOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BucketOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BucketOptions - * @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.api.Distribution.BucketOptions; - - /** - * Decodes a BucketOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BucketOptions - * @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.api.Distribution.BucketOptions; - - /** - * Verifies a BucketOptions 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 BucketOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BucketOptions - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions; - - /** - * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. - * @param message BucketOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BucketOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BucketOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BucketOptions { - - /** Properties of a Linear. */ - interface ILinear { - - /** Linear numFiniteBuckets */ - numFiniteBuckets?: (number|null); - - /** Linear width */ - width?: (number|null); - - /** Linear offset */ - offset?: (number|null); - } - - /** Represents a Linear. */ - class Linear implements ILinear { - - /** - * Constructs a new Linear. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.ILinear); - - /** Linear numFiniteBuckets. */ - public numFiniteBuckets: number; - - /** Linear width. */ - public width: number; - - /** Linear offset. */ - public offset: number; - - /** - * Creates a new Linear instance using the specified properties. - * @param [properties] Properties to set - * @returns Linear instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.ILinear): google.api.Distribution.BucketOptions.Linear; - - /** - * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @param message Linear message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @param message Linear message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.ILinear, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Linear message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Linear - * @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.api.Distribution.BucketOptions.Linear; - - /** - * Decodes a Linear message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Linear - * @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.api.Distribution.BucketOptions.Linear; - - /** - * Verifies a Linear 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 Linear message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Linear - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Linear; - - /** - * Creates a plain object from a Linear message. Also converts values to other types if specified. - * @param message Linear - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Linear, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Linear to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Linear - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Exponential. */ - interface IExponential { - - /** Exponential numFiniteBuckets */ - numFiniteBuckets?: (number|null); - - /** Exponential growthFactor */ - growthFactor?: (number|null); - - /** Exponential scale */ - scale?: (number|null); - } - - /** Represents an Exponential. */ - class Exponential implements IExponential { - - /** - * Constructs a new Exponential. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.IExponential); - - /** Exponential numFiniteBuckets. */ - public numFiniteBuckets: number; - - /** Exponential growthFactor. */ - public growthFactor: number; - - /** Exponential scale. */ - public scale: number; - - /** - * Creates a new Exponential instance using the specified properties. - * @param [properties] Properties to set - * @returns Exponential instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.IExponential): google.api.Distribution.BucketOptions.Exponential; - - /** - * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @param message Exponential message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @param message Exponential message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExponential, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Exponential message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Exponential - * @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.api.Distribution.BucketOptions.Exponential; - - /** - * Decodes an Exponential message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Exponential - * @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.api.Distribution.BucketOptions.Exponential; - - /** - * Verifies an Exponential 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 Exponential message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Exponential - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Exponential; - - /** - * Creates a plain object from an Exponential message. Also converts values to other types if specified. - * @param message Exponential - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Exponential, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Exponential to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Exponential - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Explicit. */ - interface IExplicit { - - /** Explicit bounds */ - bounds?: (number[]|null); - } - - /** Represents an Explicit. */ - class Explicit implements IExplicit { - - /** - * Constructs a new Explicit. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.BucketOptions.IExplicit); - - /** Explicit bounds. */ - public bounds: number[]; - - /** - * Creates a new Explicit instance using the specified properties. - * @param [properties] Properties to set - * @returns Explicit instance - */ - public static create(properties?: google.api.Distribution.BucketOptions.IExplicit): google.api.Distribution.BucketOptions.Explicit; - - /** - * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @param message Explicit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @param message Explicit message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.BucketOptions.IExplicit, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Explicit message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Explicit - * @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.api.Distribution.BucketOptions.Explicit; - - /** - * Decodes an Explicit message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Explicit - * @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.api.Distribution.BucketOptions.Explicit; - - /** - * Verifies an Explicit 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 Explicit message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Explicit - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.BucketOptions.Explicit; - - /** - * Creates a plain object from an Explicit message. Also converts values to other types if specified. - * @param message Explicit - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.BucketOptions.Explicit, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Explicit to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Explicit - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an Exemplar. */ - interface IExemplar { - - /** Exemplar value */ - value?: (number|null); - - /** Exemplar timestamp */ - timestamp?: (google.protobuf.ITimestamp|null); - - /** Exemplar attachments */ - attachments?: (google.protobuf.IAny[]|null); - } - - /** Represents an Exemplar. */ - class Exemplar implements IExemplar { - - /** - * Constructs a new Exemplar. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.Distribution.IExemplar); - - /** Exemplar value. */ - public value: number; - - /** Exemplar timestamp. */ - public timestamp?: (google.protobuf.ITimestamp|null); - - /** Exemplar attachments. */ - public attachments: google.protobuf.IAny[]; - - /** - * Creates a new Exemplar instance using the specified properties. - * @param [properties] Properties to set - * @returns Exemplar instance - */ - public static create(properties?: google.api.Distribution.IExemplar): google.api.Distribution.Exemplar; - - /** - * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @param message Exemplar message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @param message Exemplar message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.Distribution.IExemplar, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Exemplar message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Exemplar - * @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.api.Distribution.Exemplar; - - /** - * Decodes an Exemplar message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Exemplar - * @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.api.Distribution.Exemplar; - - /** - * Verifies an Exemplar 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 Exemplar message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Exemplar - */ - public static fromObject(object: { [k: string]: any }): google.api.Distribution.Exemplar; - - /** - * Creates a plain object from an Exemplar message. Also converts values to other types if specified. - * @param message Exemplar - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Distribution.Exemplar, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Exemplar to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Exemplar - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a MetricDescriptor. */ - interface IMetricDescriptor { - - /** MetricDescriptor name */ - name?: (string|null); - - /** MetricDescriptor type */ - type?: (string|null); - - /** MetricDescriptor labels */ - labels?: (google.api.ILabelDescriptor[]|null); - - /** MetricDescriptor metricKind */ - metricKind?: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind|null); - - /** MetricDescriptor valueType */ - valueType?: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType|null); - - /** MetricDescriptor unit */ - unit?: (string|null); - - /** MetricDescriptor description */ - description?: (string|null); - - /** MetricDescriptor displayName */ - displayName?: (string|null); - - /** MetricDescriptor metadata */ - metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); - - /** MetricDescriptor launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** MetricDescriptor monitoredResourceTypes */ - monitoredResourceTypes?: (string[]|null); - } - - /** Represents a MetricDescriptor. */ - class MetricDescriptor implements IMetricDescriptor { - - /** - * Constructs a new MetricDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMetricDescriptor); - - /** MetricDescriptor name. */ - public name: string; - - /** MetricDescriptor type. */ - public type: string; - - /** MetricDescriptor labels. */ - public labels: google.api.ILabelDescriptor[]; - - /** MetricDescriptor metricKind. */ - public metricKind: (google.api.MetricDescriptor.MetricKind|keyof typeof google.api.MetricDescriptor.MetricKind); - - /** MetricDescriptor valueType. */ - public valueType: (google.api.MetricDescriptor.ValueType|keyof typeof google.api.MetricDescriptor.ValueType); - - /** MetricDescriptor unit. */ - public unit: string; - - /** MetricDescriptor description. */ - public description: string; - - /** MetricDescriptor displayName. */ - public displayName: string; - - /** MetricDescriptor metadata. */ - public metadata?: (google.api.MetricDescriptor.IMetricDescriptorMetadata|null); - - /** MetricDescriptor launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** MetricDescriptor monitoredResourceTypes. */ - public monitoredResourceTypes: string[]; - - /** - * Creates a new MetricDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricDescriptor instance - */ - public static create(properties?: google.api.IMetricDescriptor): google.api.MetricDescriptor; - - /** - * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @param message MetricDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @param message MetricDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMetricDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricDescriptor - * @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.api.MetricDescriptor; - - /** - * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricDescriptor - * @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.api.MetricDescriptor; - - /** - * Verifies a MetricDescriptor 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 MetricDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor; - - /** - * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. - * @param message MetricDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MetricDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetricDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MetricDescriptor { - - /** MetricKind enum. */ - enum MetricKind { - METRIC_KIND_UNSPECIFIED = 0, - GAUGE = 1, - DELTA = 2, - CUMULATIVE = 3 - } - - /** ValueType enum. */ - enum ValueType { - VALUE_TYPE_UNSPECIFIED = 0, - BOOL = 1, - INT64 = 2, - DOUBLE = 3, - STRING = 4, - DISTRIBUTION = 5, - MONEY = 6 - } - - /** Properties of a MetricDescriptorMetadata. */ - interface IMetricDescriptorMetadata { - - /** MetricDescriptorMetadata launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** MetricDescriptorMetadata samplePeriod */ - samplePeriod?: (google.protobuf.IDuration|null); - - /** MetricDescriptorMetadata ingestDelay */ - ingestDelay?: (google.protobuf.IDuration|null); - - /** MetricDescriptorMetadata timeSeriesResourceHierarchyLevel */ - timeSeriesResourceHierarchyLevel?: (google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel[]|null); - } - - /** Represents a MetricDescriptorMetadata. */ - class MetricDescriptorMetadata implements IMetricDescriptorMetadata { - - /** - * Constructs a new MetricDescriptorMetadata. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata); - - /** MetricDescriptorMetadata launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** MetricDescriptorMetadata samplePeriod. */ - public samplePeriod?: (google.protobuf.IDuration|null); - - /** MetricDescriptorMetadata ingestDelay. */ - public ingestDelay?: (google.protobuf.IDuration|null); - - /** MetricDescriptorMetadata timeSeriesResourceHierarchyLevel. */ - public timeSeriesResourceHierarchyLevel: google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel[]; - - /** - * Creates a new MetricDescriptorMetadata instance using the specified properties. - * @param [properties] Properties to set - * @returns MetricDescriptorMetadata instance - */ - public static create(properties?: google.api.MetricDescriptor.IMetricDescriptorMetadata): google.api.MetricDescriptor.MetricDescriptorMetadata; - - /** - * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @param message MetricDescriptorMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @param message MetricDescriptorMetadata message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MetricDescriptor.IMetricDescriptorMetadata, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MetricDescriptorMetadata - * @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.api.MetricDescriptor.MetricDescriptorMetadata; - - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MetricDescriptorMetadata - * @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.api.MetricDescriptor.MetricDescriptorMetadata; - - /** - * Verifies a MetricDescriptorMetadata 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 MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MetricDescriptorMetadata - */ - public static fromObject(object: { [k: string]: any }): google.api.MetricDescriptor.MetricDescriptorMetadata; - - /** - * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. - * @param message MetricDescriptorMetadata - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MetricDescriptor.MetricDescriptorMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MetricDescriptorMetadata to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MetricDescriptorMetadata - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MetricDescriptorMetadata { - - /** TimeSeriesResourceHierarchyLevel enum. */ - enum TimeSeriesResourceHierarchyLevel { - TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED = 0, - PROJECT = 1, - ORGANIZATION = 2, - FOLDER = 3 - } - } - } - - /** Properties of a Metric. */ - interface IMetric { - - /** Metric type */ - type?: (string|null); - - /** Metric labels */ - labels?: ({ [k: string]: string }|null); - } - - /** Represents a Metric. */ - class Metric implements IMetric { - - /** - * Constructs a new Metric. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMetric); - - /** Metric type. */ - public type: string; - - /** Metric labels. */ - public labels: { [k: string]: string }; - - /** - * Creates a new Metric instance using the specified properties. - * @param [properties] Properties to set - * @returns Metric instance - */ - public static create(properties?: google.api.IMetric): google.api.Metric; - - /** - * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @param message Metric message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMetric, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Metric message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Metric - * @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.api.Metric; - - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Metric - * @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.api.Metric; - - /** - * Verifies a Metric 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 Metric message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Metric - */ - public static fromObject(object: { [k: string]: any }): google.api.Metric; - - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @param message Metric - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Metric, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Metric to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Metric - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a LabelDescriptor. */ - interface ILabelDescriptor { - - /** LabelDescriptor key */ - key?: (string|null); - - /** LabelDescriptor valueType */ - valueType?: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType|null); - - /** LabelDescriptor description */ - description?: (string|null); - } - - /** Represents a LabelDescriptor. */ - class LabelDescriptor implements ILabelDescriptor { - - /** - * Constructs a new LabelDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ILabelDescriptor); - - /** LabelDescriptor key. */ - public key: string; - - /** LabelDescriptor valueType. */ - public valueType: (google.api.LabelDescriptor.ValueType|keyof typeof google.api.LabelDescriptor.ValueType); - - /** LabelDescriptor description. */ - public description: string; - - /** - * Creates a new LabelDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns LabelDescriptor instance - */ - public static create(properties?: google.api.ILabelDescriptor): google.api.LabelDescriptor; - - /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @param message LabelDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ILabelDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LabelDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LabelDescriptor - * @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.api.LabelDescriptor; - - /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LabelDescriptor - * @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.api.LabelDescriptor; - - /** - * Verifies a LabelDescriptor 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 LabelDescriptor message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LabelDescriptor - */ - public static fromObject(object: { [k: string]: any }): google.api.LabelDescriptor; - - /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. - * @param message LabelDescriptor - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.LabelDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LabelDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LabelDescriptor - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace LabelDescriptor { - - /** ValueType enum. */ - enum ValueType { - STRING = 0, - BOOL = 1, - INT64 = 2 - } - } - - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 - } - - /** Properties of a Http. */ - interface IHttp { - - /** Http rules */ - rules?: (google.api.IHttpRule[]|null); - - /** Http fullyDecodeReservedExpansion */ - fullyDecodeReservedExpansion?: (boolean|null); - } - - /** Represents a Http. */ - class Http implements IHttp { - - /** - * Constructs a new Http. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttp); - - /** Http rules. */ - public rules: google.api.IHttpRule[]; - - /** Http fullyDecodeReservedExpansion. */ - public fullyDecodeReservedExpansion: boolean; - - /** - * Creates a new Http instance using the specified properties. - * @param [properties] Properties to set - * @returns Http instance - */ - public static create(properties?: google.api.IHttp): google.api.Http; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @param message Http message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Http message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Http - * @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.api.Http; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Http - * @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.api.Http; - - /** - * Verifies a Http 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 Http message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Http - */ - public static fromObject(object: { [k: string]: any }): google.api.Http; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @param message Http - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Http, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Http to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Http - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a HttpRule. */ - interface IHttpRule { - - /** HttpRule selector */ - selector?: (string|null); - - /** HttpRule get */ - get?: (string|null); - - /** HttpRule put */ - put?: (string|null); - - /** HttpRule post */ - post?: (string|null); - - /** HttpRule delete */ - "delete"?: (string|null); - - /** HttpRule patch */ - patch?: (string|null); - - /** HttpRule custom */ - custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body */ - body?: (string|null); - - /** HttpRule responseBody */ - responseBody?: (string|null); - - /** HttpRule additionalBindings */ - additionalBindings?: (google.api.IHttpRule[]|null); - } - - /** Represents a HttpRule. */ - class HttpRule implements IHttpRule { - - /** - * Constructs a new HttpRule. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IHttpRule); - - /** HttpRule selector. */ - public selector: string; - - /** HttpRule get. */ - public get?: (string|null); - - /** HttpRule put. */ - public put?: (string|null); - - /** HttpRule post. */ - public post?: (string|null); - - /** HttpRule delete. */ - public delete?: (string|null); - - /** HttpRule patch. */ - public patch?: (string|null); - - /** HttpRule custom. */ - public custom?: (google.api.ICustomHttpPattern|null); - - /** HttpRule body. */ - public body: string; - - /** HttpRule responseBody. */ - public responseBody: string; - - /** HttpRule additionalBindings. */ - public additionalBindings: google.api.IHttpRule[]; - - /** HttpRule pattern. */ - public pattern?: ("get"|"put"|"post"|"delete"|"patch"|"custom"); - - /** - * Creates a new HttpRule instance using the specified properties. - * @param [properties] Properties to set - * @returns HttpRule instance - */ - public static create(properties?: google.api.IHttpRule): google.api.HttpRule; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @param message HttpRule message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IHttpRule, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns HttpRule - * @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.api.HttpRule; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns HttpRule - * @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.api.HttpRule; - - /** - * Verifies a HttpRule 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 HttpRule message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns HttpRule - */ - public static fromObject(object: { [k: string]: any }): google.api.HttpRule; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @param message HttpRule - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.HttpRule, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this HttpRule to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for HttpRule - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CustomHttpPattern. */ - interface ICustomHttpPattern { - - /** CustomHttpPattern kind */ - kind?: (string|null); - - /** CustomHttpPattern path */ - path?: (string|null); - } - - /** Represents a CustomHttpPattern. */ - class CustomHttpPattern implements ICustomHttpPattern { - - /** - * Constructs a new CustomHttpPattern. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICustomHttpPattern); - - /** CustomHttpPattern kind. */ - public kind: string; - - /** CustomHttpPattern path. */ - public path: string; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @param [properties] Properties to set - * @returns CustomHttpPattern instance - */ - public static create(properties?: google.api.ICustomHttpPattern): google.api.CustomHttpPattern; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @param message CustomHttpPattern message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICustomHttpPattern, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CustomHttpPattern - * @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.api.CustomHttpPattern; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CustomHttpPattern - * @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.api.CustomHttpPattern; - - /** - * Verifies a CustomHttpPattern 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CustomHttpPattern - */ - public static fromObject(object: { [k: string]: any }): google.api.CustomHttpPattern; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @param message CustomHttpPattern - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CustomHttpPattern, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CustomHttpPattern to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CustomHttpPattern - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CommonLanguageSettings. */ - interface ICommonLanguageSettings { - - /** CommonLanguageSettings referenceDocsUri */ - referenceDocsUri?: (string|null); - - /** CommonLanguageSettings destinations */ - destinations?: (google.api.ClientLibraryDestination[]|null); - - /** CommonLanguageSettings selectiveGapicGeneration */ - selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); - } - - /** Represents a CommonLanguageSettings. */ - class CommonLanguageSettings implements ICommonLanguageSettings { - - /** - * Constructs a new CommonLanguageSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICommonLanguageSettings); - - /** CommonLanguageSettings referenceDocsUri. */ - public referenceDocsUri: string; - - /** CommonLanguageSettings destinations. */ - public destinations: google.api.ClientLibraryDestination[]; - - /** CommonLanguageSettings selectiveGapicGeneration. */ - public selectiveGapicGeneration?: (google.api.ISelectiveGapicGeneration|null); - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CommonLanguageSettings instance - */ - public static create(properties?: google.api.ICommonLanguageSettings): google.api.CommonLanguageSettings; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @param message CommonLanguageSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICommonLanguageSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CommonLanguageSettings - * @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.api.CommonLanguageSettings; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CommonLanguageSettings - * @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.api.CommonLanguageSettings; - - /** - * Verifies a CommonLanguageSettings 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 CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CommonLanguageSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CommonLanguageSettings; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @param message CommonLanguageSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CommonLanguageSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CommonLanguageSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ClientLibrarySettings. */ - interface IClientLibrarySettings { - - /** ClientLibrarySettings version */ - version?: (string|null); - - /** ClientLibrarySettings launchStage */ - launchStage?: (google.api.LaunchStage|keyof typeof google.api.LaunchStage|null); - - /** ClientLibrarySettings restNumericEnums */ - restNumericEnums?: (boolean|null); - - /** ClientLibrarySettings javaSettings */ - javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings */ - cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings */ - phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings */ - pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings */ - nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings */ - dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings */ - rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings */ - goSettings?: (google.api.IGoSettings|null); - } - - /** Represents a ClientLibrarySettings. */ - class ClientLibrarySettings implements IClientLibrarySettings { - - /** - * Constructs a new ClientLibrarySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IClientLibrarySettings); - - /** ClientLibrarySettings version. */ - public version: string; - - /** ClientLibrarySettings launchStage. */ - public launchStage: (google.api.LaunchStage|keyof typeof google.api.LaunchStage); - - /** ClientLibrarySettings restNumericEnums. */ - public restNumericEnums: boolean; - - /** ClientLibrarySettings javaSettings. */ - public javaSettings?: (google.api.IJavaSettings|null); - - /** ClientLibrarySettings cppSettings. */ - public cppSettings?: (google.api.ICppSettings|null); - - /** ClientLibrarySettings phpSettings. */ - public phpSettings?: (google.api.IPhpSettings|null); - - /** ClientLibrarySettings pythonSettings. */ - public pythonSettings?: (google.api.IPythonSettings|null); - - /** ClientLibrarySettings nodeSettings. */ - public nodeSettings?: (google.api.INodeSettings|null); - - /** ClientLibrarySettings dotnetSettings. */ - public dotnetSettings?: (google.api.IDotnetSettings|null); - - /** ClientLibrarySettings rubySettings. */ - public rubySettings?: (google.api.IRubySettings|null); - - /** ClientLibrarySettings goSettings. */ - public goSettings?: (google.api.IGoSettings|null); - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns ClientLibrarySettings instance - */ - public static create(properties?: google.api.IClientLibrarySettings): google.api.ClientLibrarySettings; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @param message ClientLibrarySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IClientLibrarySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ClientLibrarySettings - * @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.api.ClientLibrarySettings; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ClientLibrarySettings - * @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.api.ClientLibrarySettings; - - /** - * Verifies a ClientLibrarySettings 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 ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ClientLibrarySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.ClientLibrarySettings; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @param message ClientLibrarySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.ClientLibrarySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ClientLibrarySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Publishing. */ - interface IPublishing { - - /** Publishing methodSettings */ - methodSettings?: (google.api.IMethodSettings[]|null); - - /** Publishing newIssueUri */ - newIssueUri?: (string|null); - - /** Publishing documentationUri */ - documentationUri?: (string|null); - - /** Publishing apiShortName */ - apiShortName?: (string|null); - - /** Publishing githubLabel */ - githubLabel?: (string|null); - - /** Publishing codeownerGithubTeams */ - codeownerGithubTeams?: (string[]|null); - - /** Publishing docTagPrefix */ - docTagPrefix?: (string|null); - - /** Publishing organization */ - organization?: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization|null); - - /** Publishing librarySettings */ - librarySettings?: (google.api.IClientLibrarySettings[]|null); - - /** Publishing protoReferenceDocumentationUri */ - protoReferenceDocumentationUri?: (string|null); - - /** Publishing restReferenceDocumentationUri */ - restReferenceDocumentationUri?: (string|null); - } - - /** Represents a Publishing. */ - class Publishing implements IPublishing { - - /** - * Constructs a new Publishing. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPublishing); - - /** Publishing methodSettings. */ - public methodSettings: google.api.IMethodSettings[]; - - /** Publishing newIssueUri. */ - public newIssueUri: string; - - /** Publishing documentationUri. */ - public documentationUri: string; - - /** Publishing apiShortName. */ - public apiShortName: string; - - /** Publishing githubLabel. */ - public githubLabel: string; - - /** Publishing codeownerGithubTeams. */ - public codeownerGithubTeams: string[]; - - /** Publishing docTagPrefix. */ - public docTagPrefix: string; - - /** Publishing organization. */ - public organization: (google.api.ClientLibraryOrganization|keyof typeof google.api.ClientLibraryOrganization); - - /** Publishing librarySettings. */ - public librarySettings: google.api.IClientLibrarySettings[]; - - /** Publishing protoReferenceDocumentationUri. */ - public protoReferenceDocumentationUri: string; - - /** Publishing restReferenceDocumentationUri. */ - public restReferenceDocumentationUri: string; - - /** - * Creates a new Publishing instance using the specified properties. - * @param [properties] Properties to set - * @returns Publishing instance - */ - public static create(properties?: google.api.IPublishing): google.api.Publishing; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @param message Publishing message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Publishing - * @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.api.Publishing; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Publishing - * @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.api.Publishing; - - /** - * Verifies a Publishing 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 Publishing message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Publishing - */ - public static fromObject(object: { [k: string]: any }): google.api.Publishing; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @param message Publishing - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Publishing to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Publishing - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a JavaSettings. */ - interface IJavaSettings { - - /** JavaSettings libraryPackage */ - libraryPackage?: (string|null); - - /** JavaSettings serviceClassNames */ - serviceClassNames?: ({ [k: string]: string }|null); - - /** JavaSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a JavaSettings. */ - class JavaSettings implements IJavaSettings { - - /** - * Constructs a new JavaSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IJavaSettings); - - /** JavaSettings libraryPackage. */ - public libraryPackage: string; - - /** JavaSettings serviceClassNames. */ - public serviceClassNames: { [k: string]: string }; - - /** JavaSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new JavaSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns JavaSettings instance - */ - public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @param message JavaSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns JavaSettings - * @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.api.JavaSettings; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns JavaSettings - * @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.api.JavaSettings; - - /** - * Verifies a JavaSettings 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 JavaSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns JavaSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @param message JavaSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this JavaSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for JavaSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a CppSettings. */ - interface ICppSettings { - - /** CppSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a CppSettings. */ - class CppSettings implements ICppSettings { - - /** - * Constructs a new CppSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ICppSettings); - - /** CppSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new CppSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns CppSettings instance - */ - public static create(properties?: google.api.ICppSettings): google.api.CppSettings; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @param message CppSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns CppSettings - * @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.api.CppSettings; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns CppSettings - * @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.api.CppSettings; - - /** - * Verifies a CppSettings 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 CppSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns CppSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.CppSettings; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @param message CppSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this CppSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for CppSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PhpSettings. */ - interface IPhpSettings { - - /** PhpSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a PhpSettings. */ - class PhpSettings implements IPhpSettings { - - /** - * Constructs a new PhpSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPhpSettings); - - /** PhpSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new PhpSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PhpSettings instance - */ - public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @param message PhpSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PhpSettings - * @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.api.PhpSettings; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PhpSettings - * @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.api.PhpSettings; - - /** - * Verifies a PhpSettings 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 PhpSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PhpSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @param message PhpSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PhpSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PhpSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a PythonSettings. */ - interface IPythonSettings { - - /** PythonSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** PythonSettings experimentalFeatures */ - experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); - } - - /** Represents a PythonSettings. */ - class PythonSettings implements IPythonSettings { - - /** - * Constructs a new PythonSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IPythonSettings); - - /** PythonSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** PythonSettings experimentalFeatures. */ - public experimentalFeatures?: (google.api.PythonSettings.IExperimentalFeatures|null); - - /** - * Creates a new PythonSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns PythonSettings instance - */ - public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @param message PythonSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PythonSettings - * @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.api.PythonSettings; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PythonSettings - * @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.api.PythonSettings; - - /** - * Verifies a PythonSettings 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 PythonSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PythonSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @param message PythonSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PythonSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PythonSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PythonSettings { - - /** Properties of an ExperimentalFeatures. */ - interface IExperimentalFeatures { - - /** ExperimentalFeatures restAsyncIoEnabled */ - restAsyncIoEnabled?: (boolean|null); - - /** ExperimentalFeatures protobufPythonicTypesEnabled */ - protobufPythonicTypesEnabled?: (boolean|null); - - /** ExperimentalFeatures unversionedPackageDisabled */ - unversionedPackageDisabled?: (boolean|null); - } - - /** Represents an ExperimentalFeatures. */ - class ExperimentalFeatures implements IExperimentalFeatures { - - /** - * Constructs a new ExperimentalFeatures. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.PythonSettings.IExperimentalFeatures); - - /** ExperimentalFeatures restAsyncIoEnabled. */ - public restAsyncIoEnabled: boolean; - - /** ExperimentalFeatures protobufPythonicTypesEnabled. */ - public protobufPythonicTypesEnabled: boolean; - - /** ExperimentalFeatures unversionedPackageDisabled. */ - public unversionedPackageDisabled: boolean; - - /** - * Creates a new ExperimentalFeatures instance using the specified properties. - * @param [properties] Properties to set - * @returns ExperimentalFeatures instance - */ - public static create(properties?: google.api.PythonSettings.IExperimentalFeatures): google.api.PythonSettings.ExperimentalFeatures; - - /** - * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. - * @param message ExperimentalFeatures message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. - * @param message ExperimentalFeatures message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.PythonSettings.IExperimentalFeatures, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExperimentalFeatures message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExperimentalFeatures - * @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.api.PythonSettings.ExperimentalFeatures; - - /** - * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExperimentalFeatures - * @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.api.PythonSettings.ExperimentalFeatures; - - /** - * Verifies an ExperimentalFeatures 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 ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExperimentalFeatures - */ - public static fromObject(object: { [k: string]: any }): google.api.PythonSettings.ExperimentalFeatures; - - /** - * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. - * @param message ExperimentalFeatures - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.PythonSettings.ExperimentalFeatures, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExperimentalFeatures to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExperimentalFeatures - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a NodeSettings. */ - interface INodeSettings { - - /** NodeSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a NodeSettings. */ - class NodeSettings implements INodeSettings { - - /** - * Constructs a new NodeSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.INodeSettings); - - /** NodeSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new NodeSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns NodeSettings instance - */ - public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @param message NodeSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NodeSettings - * @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.api.NodeSettings; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NodeSettings - * @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.api.NodeSettings; - - /** - * Verifies a NodeSettings 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 NodeSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NodeSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @param message NodeSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NodeSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NodeSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DotnetSettings. */ - interface IDotnetSettings { - - /** DotnetSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - - /** DotnetSettings renamedResources */ - renamedResources?: ({ [k: string]: string }|null); - - /** DotnetSettings ignoredResources */ - ignoredResources?: (string[]|null); - - /** DotnetSettings forcedNamespaceAliases */ - forcedNamespaceAliases?: (string[]|null); - - /** DotnetSettings handwrittenSignatures */ - handwrittenSignatures?: (string[]|null); - } - - /** Represents a DotnetSettings. */ - class DotnetSettings implements IDotnetSettings { - - /** - * Constructs a new DotnetSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IDotnetSettings); - - /** DotnetSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** DotnetSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** DotnetSettings renamedResources. */ - public renamedResources: { [k: string]: string }; - - /** DotnetSettings ignoredResources. */ - public ignoredResources: string[]; - - /** DotnetSettings forcedNamespaceAliases. */ - public forcedNamespaceAliases: string[]; - - /** DotnetSettings handwrittenSignatures. */ - public handwrittenSignatures: string[]; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns DotnetSettings instance - */ - public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @param message DotnetSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DotnetSettings - * @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.api.DotnetSettings; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DotnetSettings - * @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.api.DotnetSettings; - - /** - * Verifies a DotnetSettings 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 DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DotnetSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @param message DotnetSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DotnetSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DotnetSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RubySettings. */ - interface IRubySettings { - - /** RubySettings common */ - common?: (google.api.ICommonLanguageSettings|null); - } - - /** Represents a RubySettings. */ - class RubySettings implements IRubySettings { - - /** - * Constructs a new RubySettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IRubySettings); - - /** RubySettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** - * Creates a new RubySettings instance using the specified properties. - * @param [properties] Properties to set - * @returns RubySettings instance - */ - public static create(properties?: google.api.IRubySettings): google.api.RubySettings; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @param message RubySettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RubySettings - * @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.api.RubySettings; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RubySettings - * @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.api.RubySettings; - - /** - * Verifies a RubySettings 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 RubySettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RubySettings - */ - public static fromObject(object: { [k: string]: any }): google.api.RubySettings; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @param message RubySettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RubySettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RubySettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a GoSettings. */ - interface IGoSettings { - - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); - - /** GoSettings renamedServices */ - renamedServices?: ({ [k: string]: string }|null); - } - - /** Represents a GoSettings. */ - class GoSettings implements IGoSettings { - - /** - * Constructs a new GoSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IGoSettings); - - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); - - /** GoSettings renamedServices. */ - public renamedServices: { [k: string]: string }; - - /** - * Creates a new GoSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns GoSettings instance - */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GoSettings - * @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.api.GoSettings; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GoSettings - * @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.api.GoSettings; - - /** - * Verifies a GoSettings 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 GoSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GoSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GoSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GoSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodSettings. */ - interface IMethodSettings { - - /** MethodSettings selector */ - selector?: (string|null); - - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); - } - - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { - - /** - * Constructs a new MethodSettings. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IMethodSettings); - - /** MethodSettings selector. */ - public selector: string; - - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); - - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: string[]; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodSettings instance - */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodSettings - * @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.api.MethodSettings; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodSettings - * @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.api.MethodSettings; - - /** - * Verifies a MethodSettings 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 MethodSettings message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodSettings - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodSettings to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodSettings - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodSettings { - - /** Properties of a LongRunning. */ - interface ILongRunning { - - /** LongRunning initialPollDelay */ - initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier */ - pollDelayMultiplier?: (number|null); - - /** LongRunning maxPollDelay */ - maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); - } - - /** Represents a LongRunning. */ - class LongRunning implements ILongRunning { - - /** - * Constructs a new LongRunning. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.MethodSettings.ILongRunning); - - /** LongRunning initialPollDelay. */ - public initialPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; - - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); - - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); - - /** - * Creates a new LongRunning instance using the specified properties. - * @param [properties] Properties to set - * @returns LongRunning instance - */ - public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @param message LongRunning message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LongRunning - * @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.api.MethodSettings.LongRunning; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LongRunning - * @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.api.MethodSettings.LongRunning; - - /** - * Verifies a LongRunning 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 LongRunning message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LongRunning - */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @param message LongRunning - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LongRunning - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** ClientLibraryOrganization enum. */ - enum ClientLibraryOrganization { - CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, - CLOUD = 1, - ADS = 2, - PHOTOS = 3, - STREET_VIEW = 4, - SHOPPING = 5, - GEO = 6, - GENERATIVE_AI = 7 - } - - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } - - /** Properties of a SelectiveGapicGeneration. */ - interface ISelectiveGapicGeneration { - - /** SelectiveGapicGeneration methods */ - methods?: (string[]|null); - - /** SelectiveGapicGeneration generateOmittedAsInternal */ - generateOmittedAsInternal?: (boolean|null); - } - - /** Represents a SelectiveGapicGeneration. */ - class SelectiveGapicGeneration implements ISelectiveGapicGeneration { - - /** - * Constructs a new SelectiveGapicGeneration. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.ISelectiveGapicGeneration); - - /** SelectiveGapicGeneration methods. */ - public methods: string[]; - - /** SelectiveGapicGeneration generateOmittedAsInternal. */ - public generateOmittedAsInternal: boolean; - - /** - * Creates a new SelectiveGapicGeneration instance using the specified properties. - * @param [properties] Properties to set - * @returns SelectiveGapicGeneration instance - */ - public static create(properties?: google.api.ISelectiveGapicGeneration): google.api.SelectiveGapicGeneration; - - /** - * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. - * @param message SelectiveGapicGeneration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. - * @param message SelectiveGapicGeneration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.ISelectiveGapicGeneration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SelectiveGapicGeneration - * @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.api.SelectiveGapicGeneration; - - /** - * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SelectiveGapicGeneration - * @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.api.SelectiveGapicGeneration; - - /** - * Verifies a SelectiveGapicGeneration 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 SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SelectiveGapicGeneration - */ - public static fromObject(object: { [k: string]: any }): google.api.SelectiveGapicGeneration; - - /** - * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. - * @param message SelectiveGapicGeneration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.api.SelectiveGapicGeneration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SelectiveGapicGeneration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SelectiveGapicGeneration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace protobuf. */ - namespace protobuf { - - /** Properties of a FileDescriptorSet. */ - interface IFileDescriptorSet { - - /** FileDescriptorSet file */ - file?: (google.protobuf.IFileDescriptorProto[]|null); - } - - /** Represents a FileDescriptorSet. */ - class FileDescriptorSet implements IFileDescriptorSet { - - /** - * Constructs a new FileDescriptorSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorSet); - - /** FileDescriptorSet file. */ - public file: google.protobuf.IFileDescriptorProto[]; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorSet instance - */ - public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @param message FileDescriptorSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorSet - * @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.protobuf.FileDescriptorSet; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorSet - * @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.protobuf.FileDescriptorSet; - - /** - * Verifies a FileDescriptorSet 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 FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @param message FileDescriptorSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Edition enum. */ - enum Edition { - EDITION_UNKNOWN = 0, - EDITION_LEGACY = 900, - EDITION_PROTO2 = 998, - EDITION_PROTO3 = 999, - EDITION_2023 = 1000, - EDITION_2024 = 1001, - EDITION_1_TEST_ONLY = 1, - EDITION_2_TEST_ONLY = 2, - EDITION_99997_TEST_ONLY = 99997, - EDITION_99998_TEST_ONLY = 99998, - EDITION_99999_TEST_ONLY = 99999, - EDITION_MAX = 2147483647 - } - - /** Properties of a FileDescriptorProto. */ - interface IFileDescriptorProto { - - /** FileDescriptorProto name */ - name?: (string|null); - - /** FileDescriptorProto package */ - "package"?: (string|null); - - /** FileDescriptorProto dependency */ - dependency?: (string[]|null); - - /** FileDescriptorProto publicDependency */ - publicDependency?: (number[]|null); - - /** FileDescriptorProto weakDependency */ - weakDependency?: (number[]|null); - - /** FileDescriptorProto optionDependency */ - optionDependency?: (string[]|null); - - /** FileDescriptorProto messageType */ - messageType?: (google.protobuf.IDescriptorProto[]|null); - - /** FileDescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** FileDescriptorProto service */ - service?: (google.protobuf.IServiceDescriptorProto[]|null); - - /** FileDescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** FileDescriptorProto options */ - options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo */ - sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax */ - syntax?: (string|null); - - /** FileDescriptorProto edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FileDescriptorProto. */ - class FileDescriptorProto implements IFileDescriptorProto { - - /** - * Constructs a new FileDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileDescriptorProto); - - /** FileDescriptorProto name. */ - public name: string; - - /** FileDescriptorProto package. */ - public package: string; - - /** FileDescriptorProto dependency. */ - public dependency: string[]; - - /** FileDescriptorProto publicDependency. */ - public publicDependency: number[]; - - /** FileDescriptorProto weakDependency. */ - public weakDependency: number[]; - - /** FileDescriptorProto optionDependency. */ - public optionDependency: string[]; - - /** FileDescriptorProto messageType. */ - public messageType: google.protobuf.IDescriptorProto[]; - - /** FileDescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** FileDescriptorProto service. */ - public service: google.protobuf.IServiceDescriptorProto[]; - - /** FileDescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** FileDescriptorProto options. */ - public options?: (google.protobuf.IFileOptions|null); - - /** FileDescriptorProto sourceCodeInfo. */ - public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); - - /** FileDescriptorProto syntax. */ - public syntax: string; - - /** FileDescriptorProto edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FileDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @param message FileDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileDescriptorProto - * @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.protobuf.FileDescriptorProto; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileDescriptorProto - * @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.protobuf.FileDescriptorProto; - - /** - * Verifies a FileDescriptorProto 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 FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @param message FileDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DescriptorProto. */ - interface IDescriptorProto { - - /** DescriptorProto name */ - name?: (string|null); - - /** DescriptorProto field */ - field?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto extension */ - extension?: (google.protobuf.IFieldDescriptorProto[]|null); - - /** DescriptorProto nestedType */ - nestedType?: (google.protobuf.IDescriptorProto[]|null); - - /** DescriptorProto enumType */ - enumType?: (google.protobuf.IEnumDescriptorProto[]|null); - - /** DescriptorProto extensionRange */ - extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); - - /** DescriptorProto oneofDecl */ - oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); - - /** DescriptorProto options */ - options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange */ - reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); - - /** DescriptorProto reservedName */ - reservedName?: (string[]|null); - - /** DescriptorProto visibility */ - visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); - } - - /** Represents a DescriptorProto. */ - class DescriptorProto implements IDescriptorProto { - - /** - * Constructs a new DescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDescriptorProto); - - /** DescriptorProto name. */ - public name: string; - - /** DescriptorProto field. */ - public field: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto extension. */ - public extension: google.protobuf.IFieldDescriptorProto[]; - - /** DescriptorProto nestedType. */ - public nestedType: google.protobuf.IDescriptorProto[]; - - /** DescriptorProto enumType. */ - public enumType: google.protobuf.IEnumDescriptorProto[]; - - /** DescriptorProto extensionRange. */ - public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; - - /** DescriptorProto oneofDecl. */ - public oneofDecl: google.protobuf.IOneofDescriptorProto[]; - - /** DescriptorProto options. */ - public options?: (google.protobuf.IMessageOptions|null); - - /** DescriptorProto reservedRange. */ - public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; - - /** DescriptorProto reservedName. */ - public reservedName: string[]; - - /** DescriptorProto visibility. */ - public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns DescriptorProto instance - */ - public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @param message DescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DescriptorProto - * @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.protobuf.DescriptorProto; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DescriptorProto - * @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.protobuf.DescriptorProto; - - /** - * Verifies a DescriptorProto 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 DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @param message DescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace DescriptorProto { - - /** Properties of an ExtensionRange. */ - interface IExtensionRange { - - /** ExtensionRange start */ - start?: (number|null); - - /** ExtensionRange end */ - end?: (number|null); - - /** ExtensionRange options */ - options?: (google.protobuf.IExtensionRangeOptions|null); - } - - /** Represents an ExtensionRange. */ - class ExtensionRange implements IExtensionRange { - - /** - * Constructs a new ExtensionRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); - - /** ExtensionRange start. */ - public start: number; - - /** ExtensionRange end. */ - public end: number; - - /** ExtensionRange options. */ - public options?: (google.protobuf.IExtensionRangeOptions|null); - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @param message ExtensionRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRange - * @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.protobuf.DescriptorProto.ExtensionRange; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRange - * @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.protobuf.DescriptorProto.ExtensionRange; - - /** - * Verifies an ExtensionRange 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 ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @param message ExtensionRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ReservedRange. */ - interface IReservedRange { - - /** ReservedRange start */ - start?: (number|null); - - /** ReservedRange end */ - end?: (number|null); - } - - /** Represents a ReservedRange. */ - class ReservedRange implements IReservedRange { - - /** - * Constructs a new ReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); - - /** ReservedRange start. */ - public start: number; - - /** ReservedRange end. */ - public end: number; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns ReservedRange instance - */ - public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @param message ReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReservedRange - * @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.protobuf.DescriptorProto.ReservedRange; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReservedRange - * @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.protobuf.DescriptorProto.ReservedRange; - - /** - * Verifies a ReservedRange 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 ReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @param message ReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an ExtensionRangeOptions. */ - interface IExtensionRangeOptions { - - /** ExtensionRangeOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ExtensionRangeOptions declaration */ - declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); - - /** ExtensionRangeOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification */ - verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); - } - - /** Represents an ExtensionRangeOptions. */ - class ExtensionRangeOptions implements IExtensionRangeOptions { - - /** - * Constructs a new ExtensionRangeOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IExtensionRangeOptions); - - /** ExtensionRangeOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** ExtensionRangeOptions declaration. */ - public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; - - /** ExtensionRangeOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ExtensionRangeOptions verification. */ - public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ExtensionRangeOptions instance - */ - public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @param message ExtensionRangeOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ExtensionRangeOptions - * @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.protobuf.ExtensionRangeOptions; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ExtensionRangeOptions - * @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.protobuf.ExtensionRangeOptions; - - /** - * Verifies an ExtensionRangeOptions 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 ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ExtensionRangeOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @param message ExtensionRangeOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ExtensionRangeOptions { - - /** Properties of a Declaration. */ - interface IDeclaration { - - /** Declaration number */ - number?: (number|null); - - /** Declaration fullName */ - fullName?: (string|null); - - /** Declaration type */ - type?: (string|null); - - /** Declaration reserved */ - reserved?: (boolean|null); - - /** Declaration repeated */ - repeated?: (boolean|null); - } - - /** Represents a Declaration. */ - class Declaration implements IDeclaration { - - /** - * Constructs a new Declaration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); - - /** Declaration number. */ - public number: number; - - /** Declaration fullName. */ - public fullName: string; - - /** Declaration type. */ - public type: string; - - /** Declaration reserved. */ - public reserved: boolean; - - /** Declaration repeated. */ - public repeated: boolean; - - /** - * Creates a new Declaration instance using the specified properties. - * @param [properties] Properties to set - * @returns Declaration instance - */ - public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @param message Declaration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Declaration - * @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.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Declaration - * @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.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Verifies a Declaration 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 Declaration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Declaration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @param message Declaration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Declaration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Declaration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** VerificationState enum. */ - enum VerificationState { - DECLARATION = 0, - UNVERIFIED = 1 - } - } - - /** Properties of a FieldDescriptorProto. */ - interface IFieldDescriptorProto { - - /** FieldDescriptorProto name */ - name?: (string|null); - - /** FieldDescriptorProto number */ - number?: (number|null); - - /** FieldDescriptorProto label */ - label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); - - /** FieldDescriptorProto type */ - type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); - - /** FieldDescriptorProto typeName */ - typeName?: (string|null); - - /** FieldDescriptorProto extendee */ - extendee?: (string|null); - - /** FieldDescriptorProto defaultValue */ - defaultValue?: (string|null); - - /** FieldDescriptorProto oneofIndex */ - oneofIndex?: (number|null); - - /** FieldDescriptorProto jsonName */ - jsonName?: (string|null); - - /** FieldDescriptorProto options */ - options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional */ - proto3Optional?: (boolean|null); - } - - /** Represents a FieldDescriptorProto. */ - class FieldDescriptorProto implements IFieldDescriptorProto { - - /** - * Constructs a new FieldDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldDescriptorProto); - - /** FieldDescriptorProto name. */ - public name: string; - - /** FieldDescriptorProto number. */ - public number: number; - - /** FieldDescriptorProto label. */ - public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); - - /** FieldDescriptorProto type. */ - public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); - - /** FieldDescriptorProto typeName. */ - public typeName: string; - - /** FieldDescriptorProto extendee. */ - public extendee: string; - - /** FieldDescriptorProto defaultValue. */ - public defaultValue: string; - - /** FieldDescriptorProto oneofIndex. */ - public oneofIndex: number; - - /** FieldDescriptorProto jsonName. */ - public jsonName: string; - - /** FieldDescriptorProto options. */ - public options?: (google.protobuf.IFieldOptions|null); - - /** FieldDescriptorProto proto3Optional. */ - public proto3Optional: boolean; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldDescriptorProto instance - */ - public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @param message FieldDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldDescriptorProto - * @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.protobuf.FieldDescriptorProto; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldDescriptorProto - * @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.protobuf.FieldDescriptorProto; - - /** - * Verifies a FieldDescriptorProto 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 FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @param message FieldDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldDescriptorProto { - - /** Type enum. */ - enum Type { - TYPE_DOUBLE = 1, - TYPE_FLOAT = 2, - TYPE_INT64 = 3, - TYPE_UINT64 = 4, - TYPE_INT32 = 5, - TYPE_FIXED64 = 6, - TYPE_FIXED32 = 7, - TYPE_BOOL = 8, - TYPE_STRING = 9, - TYPE_GROUP = 10, - TYPE_MESSAGE = 11, - TYPE_BYTES = 12, - TYPE_UINT32 = 13, - TYPE_ENUM = 14, - TYPE_SFIXED32 = 15, - TYPE_SFIXED64 = 16, - TYPE_SINT32 = 17, - TYPE_SINT64 = 18 - } - - /** Label enum. */ - enum Label { - LABEL_OPTIONAL = 1, - LABEL_REPEATED = 3, - LABEL_REQUIRED = 2 - } - } - - /** Properties of an OneofDescriptorProto. */ - interface IOneofDescriptorProto { - - /** OneofDescriptorProto name */ - name?: (string|null); - - /** OneofDescriptorProto options */ - options?: (google.protobuf.IOneofOptions|null); - } - - /** Represents an OneofDescriptorProto. */ - class OneofDescriptorProto implements IOneofDescriptorProto { - - /** - * Constructs a new OneofDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofDescriptorProto); - - /** OneofDescriptorProto name. */ - public name: string; - - /** OneofDescriptorProto options. */ - public options?: (google.protobuf.IOneofOptions|null); - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofDescriptorProto instance - */ - public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @param message OneofDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofDescriptorProto - * @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.protobuf.OneofDescriptorProto; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofDescriptorProto - * @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.protobuf.OneofDescriptorProto; - - /** - * Verifies an OneofDescriptorProto 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 OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @param message OneofDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumDescriptorProto. */ - interface IEnumDescriptorProto { - - /** EnumDescriptorProto name */ - name?: (string|null); - - /** EnumDescriptorProto value */ - value?: (google.protobuf.IEnumValueDescriptorProto[]|null); - - /** EnumDescriptorProto options */ - options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange */ - reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); - - /** EnumDescriptorProto reservedName */ - reservedName?: (string[]|null); - - /** EnumDescriptorProto visibility */ - visibility?: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility|null); - } - - /** Represents an EnumDescriptorProto. */ - class EnumDescriptorProto implements IEnumDescriptorProto { - - /** - * Constructs a new EnumDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumDescriptorProto); - - /** EnumDescriptorProto name. */ - public name: string; - - /** EnumDescriptorProto value. */ - public value: google.protobuf.IEnumValueDescriptorProto[]; - - /** EnumDescriptorProto options. */ - public options?: (google.protobuf.IEnumOptions|null); - - /** EnumDescriptorProto reservedRange. */ - public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; - - /** EnumDescriptorProto reservedName. */ - public reservedName: string[]; - - /** EnumDescriptorProto visibility. */ - public visibility: (google.protobuf.SymbolVisibility|keyof typeof google.protobuf.SymbolVisibility); - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @param message EnumDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumDescriptorProto - * @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.protobuf.EnumDescriptorProto; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumDescriptorProto - * @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.protobuf.EnumDescriptorProto; - - /** - * Verifies an EnumDescriptorProto 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 EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @param message EnumDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace EnumDescriptorProto { - - /** Properties of an EnumReservedRange. */ - interface IEnumReservedRange { - - /** EnumReservedRange start */ - start?: (number|null); - - /** EnumReservedRange end */ - end?: (number|null); - } - - /** Represents an EnumReservedRange. */ - class EnumReservedRange implements IEnumReservedRange { - - /** - * Constructs a new EnumReservedRange. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); - - /** EnumReservedRange start. */ - public start: number; - - /** EnumReservedRange end. */ - public end: number; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumReservedRange instance - */ - public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @param message EnumReservedRange message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumReservedRange - * @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.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumReservedRange - * @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.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Verifies an EnumReservedRange 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 EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumReservedRange - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @param message EnumReservedRange - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumReservedRange to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumReservedRange - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an EnumValueDescriptorProto. */ - interface IEnumValueDescriptorProto { - - /** EnumValueDescriptorProto name */ - name?: (string|null); - - /** EnumValueDescriptorProto number */ - number?: (number|null); - - /** EnumValueDescriptorProto options */ - options?: (google.protobuf.IEnumValueOptions|null); - } - - /** Represents an EnumValueDescriptorProto. */ - class EnumValueDescriptorProto implements IEnumValueDescriptorProto { - - /** - * Constructs a new EnumValueDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueDescriptorProto); - - /** EnumValueDescriptorProto name. */ - public name: string; - - /** EnumValueDescriptorProto number. */ - public number: number; - - /** EnumValueDescriptorProto options. */ - public options?: (google.protobuf.IEnumValueOptions|null); - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueDescriptorProto instance - */ - public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @param message EnumValueDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueDescriptorProto - * @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.protobuf.EnumValueDescriptorProto; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueDescriptorProto - * @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.protobuf.EnumValueDescriptorProto; - - /** - * Verifies an EnumValueDescriptorProto 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 EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @param message EnumValueDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceDescriptorProto. */ - interface IServiceDescriptorProto { - - /** ServiceDescriptorProto name */ - name?: (string|null); - - /** ServiceDescriptorProto method */ - method?: (google.protobuf.IMethodDescriptorProto[]|null); - - /** ServiceDescriptorProto options */ - options?: (google.protobuf.IServiceOptions|null); - } - - /** Represents a ServiceDescriptorProto. */ - class ServiceDescriptorProto implements IServiceDescriptorProto { - - /** - * Constructs a new ServiceDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceDescriptorProto); - - /** ServiceDescriptorProto name. */ - public name: string; - - /** ServiceDescriptorProto method. */ - public method: google.protobuf.IMethodDescriptorProto[]; - - /** ServiceDescriptorProto options. */ - public options?: (google.protobuf.IServiceOptions|null); - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceDescriptorProto instance - */ - public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @param message ServiceDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceDescriptorProto - * @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.protobuf.ServiceDescriptorProto; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceDescriptorProto - * @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.protobuf.ServiceDescriptorProto; - - /** - * Verifies a ServiceDescriptorProto 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 ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @param message ServiceDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodDescriptorProto. */ - interface IMethodDescriptorProto { - - /** MethodDescriptorProto name */ - name?: (string|null); - - /** MethodDescriptorProto inputType */ - inputType?: (string|null); - - /** MethodDescriptorProto outputType */ - outputType?: (string|null); - - /** MethodDescriptorProto options */ - options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming */ - clientStreaming?: (boolean|null); - - /** MethodDescriptorProto serverStreaming */ - serverStreaming?: (boolean|null); - } - - /** Represents a MethodDescriptorProto. */ - class MethodDescriptorProto implements IMethodDescriptorProto { - - /** - * Constructs a new MethodDescriptorProto. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodDescriptorProto); - - /** MethodDescriptorProto name. */ - public name: string; - - /** MethodDescriptorProto inputType. */ - public inputType: string; - - /** MethodDescriptorProto outputType. */ - public outputType: string; - - /** MethodDescriptorProto options. */ - public options?: (google.protobuf.IMethodOptions|null); - - /** MethodDescriptorProto clientStreaming. */ - public clientStreaming: boolean; - - /** MethodDescriptorProto serverStreaming. */ - public serverStreaming: boolean; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodDescriptorProto instance - */ - public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @param message MethodDescriptorProto message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodDescriptorProto - * @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.protobuf.MethodDescriptorProto; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodDescriptorProto - * @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.protobuf.MethodDescriptorProto; - - /** - * Verifies a MethodDescriptorProto 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 MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodDescriptorProto - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @param message MethodDescriptorProto - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodDescriptorProto - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FileOptions. */ - interface IFileOptions { - - /** FileOptions javaPackage */ - javaPackage?: (string|null); - - /** FileOptions javaOuterClassname */ - javaOuterClassname?: (string|null); - - /** FileOptions javaMultipleFiles */ - javaMultipleFiles?: (boolean|null); - - /** FileOptions javaGenerateEqualsAndHash */ - javaGenerateEqualsAndHash?: (boolean|null); - - /** FileOptions javaStringCheckUtf8 */ - javaStringCheckUtf8?: (boolean|null); - - /** FileOptions optimizeFor */ - optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); - - /** FileOptions goPackage */ - goPackage?: (string|null); - - /** FileOptions ccGenericServices */ - ccGenericServices?: (boolean|null); - - /** FileOptions javaGenericServices */ - javaGenericServices?: (boolean|null); - - /** FileOptions pyGenericServices */ - pyGenericServices?: (boolean|null); - - /** FileOptions deprecated */ - deprecated?: (boolean|null); - - /** FileOptions ccEnableArenas */ - ccEnableArenas?: (boolean|null); - - /** FileOptions objcClassPrefix */ - objcClassPrefix?: (string|null); - - /** FileOptions csharpNamespace */ - csharpNamespace?: (string|null); - - /** FileOptions swiftPrefix */ - swiftPrefix?: (string|null); - - /** FileOptions phpClassPrefix */ - phpClassPrefix?: (string|null); - - /** FileOptions phpNamespace */ - phpNamespace?: (string|null); - - /** FileOptions phpMetadataNamespace */ - phpMetadataNamespace?: (string|null); - - /** FileOptions rubyPackage */ - rubyPackage?: (string|null); - - /** FileOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FileOptions .google.api.resourceDefinition */ - ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); - } - - /** Represents a FileOptions. */ - class FileOptions implements IFileOptions { - - /** - * Constructs a new FileOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFileOptions); - - /** FileOptions javaPackage. */ - public javaPackage: string; - - /** FileOptions javaOuterClassname. */ - public javaOuterClassname: string; - - /** FileOptions javaMultipleFiles. */ - public javaMultipleFiles: boolean; - - /** FileOptions javaGenerateEqualsAndHash. */ - public javaGenerateEqualsAndHash: boolean; - - /** FileOptions javaStringCheckUtf8. */ - public javaStringCheckUtf8: boolean; - - /** FileOptions optimizeFor. */ - public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); - - /** FileOptions goPackage. */ - public goPackage: string; - - /** FileOptions ccGenericServices. */ - public ccGenericServices: boolean; - - /** FileOptions javaGenericServices. */ - public javaGenericServices: boolean; - - /** FileOptions pyGenericServices. */ - public pyGenericServices: boolean; - - /** FileOptions deprecated. */ - public deprecated: boolean; - - /** FileOptions ccEnableArenas. */ - public ccEnableArenas: boolean; - - /** FileOptions objcClassPrefix. */ - public objcClassPrefix: string; - - /** FileOptions csharpNamespace. */ - public csharpNamespace: string; - - /** FileOptions swiftPrefix. */ - public swiftPrefix: string; - - /** FileOptions phpClassPrefix. */ - public phpClassPrefix: string; - - /** FileOptions phpNamespace. */ - public phpNamespace: string; - - /** FileOptions phpMetadataNamespace. */ - public phpMetadataNamespace: string; - - /** FileOptions rubyPackage. */ - public rubyPackage: string; - - /** FileOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FileOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FileOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FileOptions instance - */ - public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @param message FileOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FileOptions - * @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.protobuf.FileOptions; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FileOptions - * @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.protobuf.FileOptions; - - /** - * Verifies a FileOptions 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 FileOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FileOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @param message FileOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FileOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FileOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FileOptions { - - /** OptimizeMode enum. */ - enum OptimizeMode { - SPEED = 1, - CODE_SIZE = 2, - LITE_RUNTIME = 3 - } - } - - /** Properties of a MessageOptions. */ - interface IMessageOptions { - - /** MessageOptions messageSetWireFormat */ - messageSetWireFormat?: (boolean|null); - - /** MessageOptions noStandardDescriptorAccessor */ - noStandardDescriptorAccessor?: (boolean|null); - - /** MessageOptions deprecated */ - deprecated?: (boolean|null); - - /** MessageOptions mapEntry */ - mapEntry?: (boolean|null); - - /** MessageOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** MessageOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MessageOptions .google.api.resource */ - ".google.api.resource"?: (google.api.IResourceDescriptor|null); - } - - /** Represents a MessageOptions. */ - class MessageOptions implements IMessageOptions { - - /** - * Constructs a new MessageOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMessageOptions); - - /** MessageOptions messageSetWireFormat. */ - public messageSetWireFormat: boolean; - - /** MessageOptions noStandardDescriptorAccessor. */ - public noStandardDescriptorAccessor: boolean; - - /** MessageOptions deprecated. */ - public deprecated: boolean; - - /** MessageOptions mapEntry. */ - public mapEntry: boolean; - - /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** MessageOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MessageOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MessageOptions instance - */ - public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @param message MessageOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MessageOptions - * @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.protobuf.MessageOptions; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MessageOptions - * @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.protobuf.MessageOptions; - - /** - * Verifies a MessageOptions 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 MessageOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MessageOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @param message MessageOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MessageOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MessageOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldOptions. */ - interface IFieldOptions { - - /** FieldOptions ctype */ - ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); - - /** FieldOptions packed */ - packed?: (boolean|null); - - /** FieldOptions jstype */ - jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); - - /** FieldOptions lazy */ - lazy?: (boolean|null); - - /** FieldOptions unverifiedLazy */ - unverifiedLazy?: (boolean|null); - - /** FieldOptions deprecated */ - deprecated?: (boolean|null); - - /** FieldOptions weak */ - weak?: (boolean|null); - - /** FieldOptions debugRedact */ - debugRedact?: (boolean|null); - - /** FieldOptions retention */ - retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); - - /** FieldOptions targets */ - targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); - - /** FieldOptions editionDefaults */ - editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); - - /** FieldOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions featureSupport */ - featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); - - /** FieldOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** FieldOptions .google.api.fieldBehavior */ - ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); - - /** FieldOptions .google.api.resourceReference */ - ".google.api.resourceReference"?: (google.api.IResourceReference|null); - } - - /** Represents a FieldOptions. */ - class FieldOptions implements IFieldOptions { - - /** - * Constructs a new FieldOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldOptions); - - /** FieldOptions ctype. */ - public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); - - /** FieldOptions packed. */ - public packed: boolean; - - /** FieldOptions jstype. */ - public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); - - /** FieldOptions lazy. */ - public lazy: boolean; - - /** FieldOptions unverifiedLazy. */ - public unverifiedLazy: boolean; - - /** FieldOptions deprecated. */ - public deprecated: boolean; - - /** FieldOptions weak. */ - public weak: boolean; - - /** FieldOptions debugRedact. */ - public debugRedact: boolean; - - /** FieldOptions retention. */ - public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); - - /** FieldOptions targets. */ - public targets: google.protobuf.FieldOptions.OptionTargetType[]; - - /** FieldOptions editionDefaults. */ - public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; - - /** FieldOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** FieldOptions featureSupport. */ - public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); - - /** FieldOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldOptions instance - */ - public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @param message FieldOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldOptions - * @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.protobuf.FieldOptions; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldOptions - * @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.protobuf.FieldOptions; - - /** - * Verifies a FieldOptions 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 FieldOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @param message FieldOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FieldOptions { - - /** CType enum. */ - enum CType { - STRING = 0, - CORD = 1, - STRING_PIECE = 2 - } - - /** JSType enum. */ - enum JSType { - JS_NORMAL = 0, - JS_STRING = 1, - JS_NUMBER = 2 - } - - /** OptionRetention enum. */ - enum OptionRetention { - RETENTION_UNKNOWN = 0, - RETENTION_RUNTIME = 1, - RETENTION_SOURCE = 2 - } - - /** OptionTargetType enum. */ - enum OptionTargetType { - TARGET_TYPE_UNKNOWN = 0, - TARGET_TYPE_FILE = 1, - TARGET_TYPE_EXTENSION_RANGE = 2, - TARGET_TYPE_MESSAGE = 3, - TARGET_TYPE_FIELD = 4, - TARGET_TYPE_ONEOF = 5, - TARGET_TYPE_ENUM = 6, - TARGET_TYPE_ENUM_ENTRY = 7, - TARGET_TYPE_SERVICE = 8, - TARGET_TYPE_METHOD = 9 - } - - /** Properties of an EditionDefault. */ - interface IEditionDefault { - - /** EditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** EditionDefault value */ - value?: (string|null); - } - - /** Represents an EditionDefault. */ - class EditionDefault implements IEditionDefault { - - /** - * Constructs a new EditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); - - /** EditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** EditionDefault value. */ - public value: string; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns EditionDefault instance - */ - public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @param message EditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EditionDefault - * @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.protobuf.FieldOptions.EditionDefault; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EditionDefault - * @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.protobuf.FieldOptions.EditionDefault; - - /** - * Verifies an EditionDefault 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 EditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @param message EditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FeatureSupport. */ - interface IFeatureSupport { - - /** FeatureSupport editionIntroduced */ - editionIntroduced?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSupport editionDeprecated */ - editionDeprecated?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSupport deprecationWarning */ - deprecationWarning?: (string|null); - - /** FeatureSupport editionRemoved */ - editionRemoved?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSupport. */ - class FeatureSupport implements IFeatureSupport { - - /** - * Constructs a new FeatureSupport. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FieldOptions.IFeatureSupport); - - /** FeatureSupport editionIntroduced. */ - public editionIntroduced: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSupport editionDeprecated. */ - public editionDeprecated: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSupport deprecationWarning. */ - public deprecationWarning: string; - - /** FeatureSupport editionRemoved. */ - public editionRemoved: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSupport instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSupport instance - */ - public static create(properties?: google.protobuf.FieldOptions.IFeatureSupport): google.protobuf.FieldOptions.FeatureSupport; - - /** - * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. - * @param message FeatureSupport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. - * @param message FeatureSupport message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FieldOptions.IFeatureSupport, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSupport message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSupport - * @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.protobuf.FieldOptions.FeatureSupport; - - /** - * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSupport - * @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.protobuf.FieldOptions.FeatureSupport; - - /** - * Verifies a FeatureSupport 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 FeatureSupport message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSupport - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.FeatureSupport; - - /** - * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. - * @param message FeatureSupport - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldOptions.FeatureSupport, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSupport to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSupport - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of an OneofOptions. */ - interface IOneofOptions { - - /** OneofOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an OneofOptions. */ - class OneofOptions implements IOneofOptions { - - /** - * Constructs a new OneofOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IOneofOptions); - - /** OneofOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** OneofOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns OneofOptions instance - */ - public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @param message OneofOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns OneofOptions - * @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.protobuf.OneofOptions; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns OneofOptions - * @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.protobuf.OneofOptions; - - /** - * Verifies an OneofOptions 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 OneofOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns OneofOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @param message OneofOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this OneofOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for OneofOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumOptions. */ - interface IEnumOptions { - - /** EnumOptions allowAlias */ - allowAlias?: (boolean|null); - - /** EnumOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumOptions deprecatedLegacyJsonFieldConflicts */ - deprecatedLegacyJsonFieldConflicts?: (boolean|null); - - /** EnumOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumOptions. */ - class EnumOptions implements IEnumOptions { - - /** - * Constructs a new EnumOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumOptions); - - /** EnumOptions allowAlias. */ - public allowAlias: boolean; - - /** EnumOptions deprecated. */ - public deprecated: boolean; - - /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ - public deprecatedLegacyJsonFieldConflicts: boolean; - - /** EnumOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumOptions instance - */ - public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @param message EnumOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumOptions - * @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.protobuf.EnumOptions; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumOptions - * @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.protobuf.EnumOptions; - - /** - * Verifies an EnumOptions 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 EnumOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @param message EnumOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an EnumValueOptions. */ - interface IEnumValueOptions { - - /** EnumValueOptions deprecated */ - deprecated?: (boolean|null); - - /** EnumValueOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact */ - debugRedact?: (boolean|null); - - /** EnumValueOptions featureSupport */ - featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); - - /** EnumValueOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - } - - /** Represents an EnumValueOptions. */ - class EnumValueOptions implements IEnumValueOptions { - - /** - * Constructs a new EnumValueOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEnumValueOptions); - - /** EnumValueOptions deprecated. */ - public deprecated: boolean; - - /** EnumValueOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** EnumValueOptions debugRedact. */ - public debugRedact: boolean; - - /** EnumValueOptions featureSupport. */ - public featureSupport?: (google.protobuf.FieldOptions.IFeatureSupport|null); - - /** EnumValueOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns EnumValueOptions instance - */ - public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @param message EnumValueOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns EnumValueOptions - * @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.protobuf.EnumValueOptions; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns EnumValueOptions - * @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.protobuf.EnumValueOptions; - - /** - * Verifies an EnumValueOptions 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 EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns EnumValueOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @param message EnumValueOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this EnumValueOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for EnumValueOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ServiceOptions. */ - interface IServiceOptions { - - /** ServiceOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated */ - deprecated?: (boolean|null); - - /** ServiceOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** ServiceOptions .google.api.defaultHost */ - ".google.api.defaultHost"?: (string|null); - - /** ServiceOptions .google.api.oauthScopes */ - ".google.api.oauthScopes"?: (string|null); - - /** ServiceOptions .google.api.apiVersion */ - ".google.api.apiVersion"?: (string|null); - } - - /** Represents a ServiceOptions. */ - class ServiceOptions implements IServiceOptions { - - /** - * Constructs a new ServiceOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IServiceOptions); - - /** ServiceOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** ServiceOptions deprecated. */ - public deprecated: boolean; - - /** ServiceOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns ServiceOptions instance - */ - public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @param message ServiceOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ServiceOptions - * @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.protobuf.ServiceOptions; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ServiceOptions - * @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.protobuf.ServiceOptions; - - /** - * Verifies a ServiceOptions 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 ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ServiceOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @param message ServiceOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ServiceOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ServiceOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a MethodOptions. */ - interface IMethodOptions { - - /** MethodOptions deprecated */ - deprecated?: (boolean|null); - - /** MethodOptions idempotencyLevel */ - idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); - - /** MethodOptions features */ - features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption */ - uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); - - /** MethodOptions .google.api.http */ - ".google.api.http"?: (google.api.IHttpRule|null); - - /** MethodOptions .google.api.methodSignature */ - ".google.api.methodSignature"?: (string[]|null); - } - - /** Represents a MethodOptions. */ - class MethodOptions implements IMethodOptions { - - /** - * Constructs a new MethodOptions. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IMethodOptions); - - /** MethodOptions deprecated. */ - public deprecated: boolean; - - /** MethodOptions idempotencyLevel. */ - public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); - - /** MethodOptions features. */ - public features?: (google.protobuf.IFeatureSet|null); - - /** MethodOptions uninterpretedOption. */ - public uninterpretedOption: google.protobuf.IUninterpretedOption[]; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @param [properties] Properties to set - * @returns MethodOptions instance - */ - public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @param message MethodOptions message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns MethodOptions - * @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.protobuf.MethodOptions; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns MethodOptions - * @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.protobuf.MethodOptions; - - /** - * Verifies a MethodOptions 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 MethodOptions message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns MethodOptions - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @param message MethodOptions - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this MethodOptions to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for MethodOptions - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace MethodOptions { - - /** IdempotencyLevel enum. */ - enum IdempotencyLevel { - IDEMPOTENCY_UNKNOWN = 0, - NO_SIDE_EFFECTS = 1, - IDEMPOTENT = 2 - } - } - - /** Properties of an UninterpretedOption. */ - interface IUninterpretedOption { - - /** UninterpretedOption name */ - name?: (google.protobuf.UninterpretedOption.INamePart[]|null); - - /** UninterpretedOption identifierValue */ - identifierValue?: (string|null); - - /** UninterpretedOption positiveIntValue */ - positiveIntValue?: (number|Long|string|null); - - /** UninterpretedOption negativeIntValue */ - negativeIntValue?: (number|Long|string|null); - - /** UninterpretedOption doubleValue */ - doubleValue?: (number|null); - - /** UninterpretedOption stringValue */ - stringValue?: (Uint8Array|Buffer|string|null); - - /** UninterpretedOption aggregateValue */ - aggregateValue?: (string|null); - } - - /** Represents an UninterpretedOption. */ - class UninterpretedOption implements IUninterpretedOption { - - /** - * Constructs a new UninterpretedOption. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IUninterpretedOption); - - /** UninterpretedOption name. */ - public name: google.protobuf.UninterpretedOption.INamePart[]; - - /** UninterpretedOption identifierValue. */ - public identifierValue: string; - - /** UninterpretedOption positiveIntValue. */ - public positiveIntValue: (number|Long|string); - - /** UninterpretedOption negativeIntValue. */ - public negativeIntValue: (number|Long|string); - - /** UninterpretedOption doubleValue. */ - public doubleValue: number; - - /** UninterpretedOption stringValue. */ - public stringValue: (Uint8Array|Buffer|string); - - /** UninterpretedOption aggregateValue. */ - public aggregateValue: string; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @param [properties] Properties to set - * @returns UninterpretedOption instance - */ - public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @param message UninterpretedOption message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns UninterpretedOption - * @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.protobuf.UninterpretedOption; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns UninterpretedOption - * @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.protobuf.UninterpretedOption; - - /** - * Verifies an UninterpretedOption 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 UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns UninterpretedOption - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @param message UninterpretedOption - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this UninterpretedOption to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for UninterpretedOption - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace UninterpretedOption { - - /** Properties of a NamePart. */ - interface INamePart { - - /** NamePart namePart */ - namePart: string; - - /** NamePart isExtension */ - isExtension: boolean; - } - - /** Represents a NamePart. */ - class NamePart implements INamePart { - - /** - * Constructs a new NamePart. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.UninterpretedOption.INamePart); - - /** NamePart namePart. */ - public namePart: string; - - /** NamePart isExtension. */ - public isExtension: boolean; - - /** - * Creates a new NamePart instance using the specified properties. - * @param [properties] Properties to set - * @returns NamePart instance - */ - public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @param message NamePart message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns NamePart - * @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.protobuf.UninterpretedOption.NamePart; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns NamePart - * @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.protobuf.UninterpretedOption.NamePart; - - /** - * Verifies a NamePart 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 NamePart message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns NamePart - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @param message NamePart - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this NamePart to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for NamePart - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a FeatureSet. */ - interface IFeatureSet { - - /** FeatureSet fieldPresence */ - fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); - - /** FeatureSet enumType */ - enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); - - /** FeatureSet repeatedFieldEncoding */ - repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); - - /** FeatureSet utf8Validation */ - utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); - - /** FeatureSet messageEncoding */ - messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); - - /** FeatureSet jsonFormat */ - jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); - - /** FeatureSet enforceNamingStyle */ - enforceNamingStyle?: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle|null); - - /** FeatureSet defaultSymbolVisibility */ - defaultSymbolVisibility?: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null); - } - - /** Represents a FeatureSet. */ - class FeatureSet implements IFeatureSet { - - /** - * Constructs a new FeatureSet. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSet); - - /** FeatureSet fieldPresence. */ - public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); - - /** FeatureSet enumType. */ - public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); - - /** FeatureSet repeatedFieldEncoding. */ - public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); - - /** FeatureSet utf8Validation. */ - public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); - - /** FeatureSet messageEncoding. */ - public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); - - /** FeatureSet jsonFormat. */ - public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); - - /** FeatureSet enforceNamingStyle. */ - public enforceNamingStyle: (google.protobuf.FeatureSet.EnforceNamingStyle|keyof typeof google.protobuf.FeatureSet.EnforceNamingStyle); - - /** FeatureSet defaultSymbolVisibility. */ - public defaultSymbolVisibility: (google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|keyof typeof google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility); - - /** - * Creates a new FeatureSet instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSet instance - */ - public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @param message FeatureSet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSet - * @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.protobuf.FeatureSet; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSet - * @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.protobuf.FeatureSet; - - /** - * Verifies a FeatureSet 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 FeatureSet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSet - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @param message FeatureSet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSet { - - /** FieldPresence enum. */ - enum FieldPresence { - FIELD_PRESENCE_UNKNOWN = 0, - EXPLICIT = 1, - IMPLICIT = 2, - LEGACY_REQUIRED = 3 - } - - /** EnumType enum. */ - enum EnumType { - ENUM_TYPE_UNKNOWN = 0, - OPEN = 1, - CLOSED = 2 - } - - /** RepeatedFieldEncoding enum. */ - enum RepeatedFieldEncoding { - REPEATED_FIELD_ENCODING_UNKNOWN = 0, - PACKED = 1, - EXPANDED = 2 - } - - /** Utf8Validation enum. */ - enum Utf8Validation { - UTF8_VALIDATION_UNKNOWN = 0, - VERIFY = 2, - NONE = 3 - } - - /** MessageEncoding enum. */ - enum MessageEncoding { - MESSAGE_ENCODING_UNKNOWN = 0, - LENGTH_PREFIXED = 1, - DELIMITED = 2 - } - - /** JsonFormat enum. */ - enum JsonFormat { - JSON_FORMAT_UNKNOWN = 0, - ALLOW = 1, - LEGACY_BEST_EFFORT = 2 - } - - /** EnforceNamingStyle enum. */ - enum EnforceNamingStyle { - ENFORCE_NAMING_STYLE_UNKNOWN = 0, - STYLE2024 = 1, - STYLE_LEGACY = 2 - } - - /** Properties of a VisibilityFeature. */ - interface IVisibilityFeature { - } - - /** Represents a VisibilityFeature. */ - class VisibilityFeature implements IVisibilityFeature { - - /** - * Constructs a new VisibilityFeature. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSet.IVisibilityFeature); - - /** - * Creates a new VisibilityFeature instance using the specified properties. - * @param [properties] Properties to set - * @returns VisibilityFeature instance - */ - public static create(properties?: google.protobuf.FeatureSet.IVisibilityFeature): google.protobuf.FeatureSet.VisibilityFeature; - - /** - * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. - * @param message VisibilityFeature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. - * @param message VisibilityFeature message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSet.IVisibilityFeature, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a VisibilityFeature message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns VisibilityFeature - * @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.protobuf.FeatureSet.VisibilityFeature; - - /** - * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns VisibilityFeature - * @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.protobuf.FeatureSet.VisibilityFeature; - - /** - * Verifies a VisibilityFeature 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 VisibilityFeature message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns VisibilityFeature - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet.VisibilityFeature; - - /** - * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. - * @param message VisibilityFeature - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSet.VisibilityFeature, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this VisibilityFeature to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for VisibilityFeature - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace VisibilityFeature { - - /** DefaultSymbolVisibility enum. */ - enum DefaultSymbolVisibility { - DEFAULT_SYMBOL_VISIBILITY_UNKNOWN = 0, - EXPORT_ALL = 1, - EXPORT_TOP_LEVEL = 2, - LOCAL_ALL = 3, - STRICT = 4 - } - } - } - - /** Properties of a FeatureSetDefaults. */ - interface IFeatureSetDefaults { - - /** FeatureSetDefaults defaults */ - defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); - - /** FeatureSetDefaults minimumEdition */ - minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetDefaults maximumEdition */ - maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - } - - /** Represents a FeatureSetDefaults. */ - class FeatureSetDefaults implements IFeatureSetDefaults { - - /** - * Constructs a new FeatureSetDefaults. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFeatureSetDefaults); - - /** FeatureSetDefaults defaults. */ - public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; - - /** FeatureSetDefaults minimumEdition. */ - public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetDefaults maximumEdition. */ - public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetDefaults instance - */ - public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @param message FeatureSetDefaults message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetDefaults - * @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.protobuf.FeatureSetDefaults; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetDefaults - * @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.protobuf.FeatureSetDefaults; - - /** - * Verifies a FeatureSetDefaults 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 FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetDefaults - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @param message FeatureSetDefaults - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetDefaults - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace FeatureSetDefaults { - - /** Properties of a FeatureSetEditionDefault. */ - interface IFeatureSetEditionDefault { - - /** FeatureSetEditionDefault edition */ - edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); - - /** FeatureSetEditionDefault overridableFeatures */ - overridableFeatures?: (google.protobuf.IFeatureSet|null); - - /** FeatureSetEditionDefault fixedFeatures */ - fixedFeatures?: (google.protobuf.IFeatureSet|null); - } - - /** Represents a FeatureSetEditionDefault. */ - class FeatureSetEditionDefault implements IFeatureSetEditionDefault { - - /** - * Constructs a new FeatureSetEditionDefault. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); - - /** FeatureSetEditionDefault edition. */ - public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); - - /** FeatureSetEditionDefault overridableFeatures. */ - public overridableFeatures?: (google.protobuf.IFeatureSet|null); - - /** FeatureSetEditionDefault fixedFeatures. */ - public fixedFeatures?: (google.protobuf.IFeatureSet|null); - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @param [properties] Properties to set - * @returns FeatureSetEditionDefault instance - */ - public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @param message FeatureSetEditionDefault message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FeatureSetEditionDefault - * @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.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FeatureSetEditionDefault - * @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.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Verifies a FeatureSetEditionDefault 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 FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FeatureSetEditionDefault - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @param message FeatureSetEditionDefault - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a SourceCodeInfo. */ - interface ISourceCodeInfo { - - /** SourceCodeInfo location */ - location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); - } - - /** Represents a SourceCodeInfo. */ - class SourceCodeInfo implements ISourceCodeInfo { - - /** - * Constructs a new SourceCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ISourceCodeInfo); - - /** SourceCodeInfo location. */ - public location: google.protobuf.SourceCodeInfo.ILocation[]; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns SourceCodeInfo instance - */ - public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @param message SourceCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns SourceCodeInfo - * @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.protobuf.SourceCodeInfo; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns SourceCodeInfo - * @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.protobuf.SourceCodeInfo; - - /** - * Verifies a SourceCodeInfo 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 SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns SourceCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @param message SourceCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this SourceCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for SourceCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace SourceCodeInfo { - - /** Properties of a Location. */ - interface ILocation { - - /** Location path */ - path?: (number[]|null); - - /** Location span */ - span?: (number[]|null); - - /** Location leadingComments */ - leadingComments?: (string|null); - - /** Location trailingComments */ - trailingComments?: (string|null); - - /** Location leadingDetachedComments */ - leadingDetachedComments?: (string[]|null); - } - - /** Represents a Location. */ - class Location implements ILocation { - - /** - * Constructs a new Location. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); - - /** Location path. */ - public path: number[]; - - /** Location span. */ - public span: number[]; - - /** Location leadingComments. */ - public leadingComments: string; - - /** Location trailingComments. */ - public trailingComments: string; - - /** Location leadingDetachedComments. */ - public leadingDetachedComments: string[]; - - /** - * Creates a new Location instance using the specified properties. - * @param [properties] Properties to set - * @returns Location instance - */ - public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @param message Location message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Location message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Location - * @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.protobuf.SourceCodeInfo.Location; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Location - * @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.protobuf.SourceCodeInfo.Location; - - /** - * Verifies a Location 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 Location message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Location - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @param message Location - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Location to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Location - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a GeneratedCodeInfo. */ - interface IGeneratedCodeInfo { - - /** GeneratedCodeInfo annotation */ - annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); - } - - /** Represents a GeneratedCodeInfo. */ - class GeneratedCodeInfo implements IGeneratedCodeInfo { - - /** - * Constructs a new GeneratedCodeInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IGeneratedCodeInfo); - - /** GeneratedCodeInfo annotation. */ - public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns GeneratedCodeInfo instance - */ - public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @param message GeneratedCodeInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns GeneratedCodeInfo - * @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.protobuf.GeneratedCodeInfo; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns GeneratedCodeInfo - * @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.protobuf.GeneratedCodeInfo; - - /** - * Verifies a GeneratedCodeInfo 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 GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns GeneratedCodeInfo - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @param message GeneratedCodeInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace GeneratedCodeInfo { - - /** Properties of an Annotation. */ - interface IAnnotation { - - /** Annotation path */ - path?: (number[]|null); - - /** Annotation sourceFile */ - sourceFile?: (string|null); - - /** Annotation begin */ - begin?: (number|null); - - /** Annotation end */ - end?: (number|null); - - /** Annotation semantic */ - semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); - } - - /** Represents an Annotation. */ - class Annotation implements IAnnotation { - - /** - * Constructs a new Annotation. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); - - /** Annotation path. */ - public path: number[]; - - /** Annotation sourceFile. */ - public sourceFile: string; - - /** Annotation begin. */ - public begin: number; - - /** Annotation end. */ - public end: number; - - /** Annotation semantic. */ - public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); - - /** - * Creates a new Annotation instance using the specified properties. - * @param [properties] Properties to set - * @returns Annotation instance - */ - public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @param message Annotation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Annotation - * @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.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Annotation - * @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.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Verifies an Annotation 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 Annotation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Annotation - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @param message Annotation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Annotation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Annotation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Annotation { - - /** Semantic enum. */ - enum Semantic { - NONE = 0, - SET = 1, - ALIAS = 2 - } - } - } - - /** SymbolVisibility enum. */ - enum SymbolVisibility { - VISIBILITY_UNSET = 0, - VISIBILITY_LOCAL = 1, - VISIBILITY_EXPORT = 2 - } - - /** Properties of a Duration. */ - interface IDuration { - - /** Duration seconds */ - seconds?: (number|Long|string|null); - - /** Duration nanos */ - nanos?: (number|null); - } - - /** Represents a Duration. */ - class Duration implements IDuration { - - /** - * Constructs a new Duration. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IDuration); - - /** Duration seconds. */ - public seconds: (number|Long|string); - - /** Duration nanos. */ - public nanos: number; - - /** - * Creates a new Duration instance using the specified properties. - * @param [properties] Properties to set - * @returns Duration instance - */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Duration - * @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.protobuf.Duration; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Duration - * @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.protobuf.Duration; - - /** - * Verifies a Duration 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 Duration message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Duration - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Duration to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Duration - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Any. */ - interface IAny { - - /** Any type_url */ - type_url?: (string|null); - - /** Any value */ - value?: (Uint8Array|Buffer|string|null); - } - - /** Represents an Any. */ - class Any implements IAny { - - /** - * Constructs a new Any. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IAny); - - /** Any type_url. */ - public type_url: string; - - /** Any value. */ - public value: (Uint8Array|Buffer|string); - - /** - * Creates a new Any instance using the specified properties. - * @param [properties] Properties to set - * @returns Any instance - */ - public static create(properties?: google.protobuf.IAny): google.protobuf.Any; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @param message Any message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IAny, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Any message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Any - * @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.protobuf.Any; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Any - * @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.protobuf.Any; - - /** - * Verifies an Any 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 Any message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Any - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Any; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @param message Any - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Any, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Any to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Any - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Timestamp. */ - interface ITimestamp { - - /** Timestamp seconds */ - seconds?: (number|Long|string|null); - - /** Timestamp nanos */ - nanos?: (number|null); - } - - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { - - /** - * Constructs a new Timestamp. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.ITimestamp); - - /** Timestamp seconds. */ - public seconds: (number|Long|string); - - /** Timestamp nanos. */ - public nanos: number; - - /** - * Creates a new Timestamp instance using the specified properties. - * @param [properties] Properties to set - * @returns Timestamp instance - */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Timestamp - * @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.protobuf.Timestamp; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Timestamp - * @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.protobuf.Timestamp; - - /** - * Verifies a Timestamp 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 Timestamp message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Timestamp - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Timestamp to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Timestamp - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of an Empty. */ - interface IEmpty { - } - - /** Represents an Empty. */ - class Empty implements IEmpty { - - /** - * Constructs a new Empty. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IEmpty); - - /** - * Creates a new Empty instance using the specified properties. - * @param [properties] Properties to set - * @returns Empty instance - */ - public static create(properties?: google.protobuf.IEmpty): google.protobuf.Empty; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @param message Empty message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IEmpty, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Empty - * @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.protobuf.Empty; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Empty - * @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.protobuf.Empty; - - /** - * Verifies an Empty 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 Empty message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Empty - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Empty; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @param message Empty - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.Empty, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Empty to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Empty - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a FieldMask. */ - interface IFieldMask { - - /** FieldMask paths */ - paths?: (string[]|null); - } - - /** Represents a FieldMask. */ - class FieldMask implements IFieldMask { - - /** - * Constructs a new FieldMask. - * @param [properties] Properties to set - */ - constructor(properties?: google.protobuf.IFieldMask); - - /** FieldMask paths. */ - public paths: string[]; - - /** - * Creates a new FieldMask instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldMask instance - */ - public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @param message FieldMask message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldMask - * @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.protobuf.FieldMask; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldMask - * @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.protobuf.FieldMask; - - /** - * Verifies a FieldMask 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 FieldMask message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldMask - */ - public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @param message FieldMask - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldMask to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldMask - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Namespace rpc. */ - namespace rpc { - - /** Properties of an ErrorInfo. */ - interface IErrorInfo { - - /** ErrorInfo reason */ - reason?: (string|null); - - /** ErrorInfo domain */ - domain?: (string|null); - - /** ErrorInfo metadata */ - metadata?: ({ [k: string]: string }|null); - } - - /** Represents an ErrorInfo. */ - class ErrorInfo implements IErrorInfo { - - /** - * Constructs a new ErrorInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IErrorInfo); - - /** ErrorInfo reason. */ - public reason: string; - - /** ErrorInfo domain. */ - public domain: string; - - /** ErrorInfo metadata. */ - public metadata: { [k: string]: string }; - - /** - * Creates a new ErrorInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ErrorInfo instance - */ - public static create(properties?: google.rpc.IErrorInfo): google.rpc.ErrorInfo; - - /** - * Encodes the specified ErrorInfo message. Does not implicitly {@link google.rpc.ErrorInfo.verify|verify} messages. - * @param message ErrorInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ErrorInfo message, length delimited. Does not implicitly {@link google.rpc.ErrorInfo.verify|verify} messages. - * @param message ErrorInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IErrorInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes an ErrorInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ErrorInfo - * @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.rpc.ErrorInfo; - - /** - * Decodes an ErrorInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ErrorInfo - * @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.rpc.ErrorInfo; - - /** - * Verifies an ErrorInfo 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 ErrorInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ErrorInfo - */ - public static fromObject(object: { [k: string]: any }): google.rpc.ErrorInfo; - - /** - * Creates a plain object from an ErrorInfo message. Also converts values to other types if specified. - * @param message ErrorInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.ErrorInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ErrorInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ErrorInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a RetryInfo. */ - interface IRetryInfo { - - /** RetryInfo retryDelay */ - retryDelay?: (google.protobuf.IDuration|null); - } - - /** Represents a RetryInfo. */ - class RetryInfo implements IRetryInfo { - - /** - * Constructs a new RetryInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IRetryInfo); - - /** RetryInfo retryDelay. */ - public retryDelay?: (google.protobuf.IDuration|null); - - /** - * Creates a new RetryInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RetryInfo instance - */ - public static create(properties?: google.rpc.IRetryInfo): google.rpc.RetryInfo; - - /** - * Encodes the specified RetryInfo message. Does not implicitly {@link google.rpc.RetryInfo.verify|verify} messages. - * @param message RetryInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IRetryInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RetryInfo message, length delimited. Does not implicitly {@link google.rpc.RetryInfo.verify|verify} messages. - * @param message RetryInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IRetryInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RetryInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RetryInfo - * @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.rpc.RetryInfo; - - /** - * Decodes a RetryInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RetryInfo - * @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.rpc.RetryInfo; - - /** - * Verifies a RetryInfo 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 RetryInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RetryInfo - */ - public static fromObject(object: { [k: string]: any }): google.rpc.RetryInfo; - - /** - * Creates a plain object from a RetryInfo message. Also converts values to other types if specified. - * @param message RetryInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.RetryInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RetryInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RetryInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a DebugInfo. */ - interface IDebugInfo { - - /** DebugInfo stackEntries */ - stackEntries?: (string[]|null); - - /** DebugInfo detail */ - detail?: (string|null); - } - - /** Represents a DebugInfo. */ - class DebugInfo implements IDebugInfo { - - /** - * Constructs a new DebugInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IDebugInfo); - - /** DebugInfo stackEntries. */ - public stackEntries: string[]; - - /** DebugInfo detail. */ - public detail: string; - - /** - * Creates a new DebugInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns DebugInfo instance - */ - public static create(properties?: google.rpc.IDebugInfo): google.rpc.DebugInfo; - - /** - * Encodes the specified DebugInfo message. Does not implicitly {@link google.rpc.DebugInfo.verify|verify} messages. - * @param message DebugInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IDebugInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified DebugInfo message, length delimited. Does not implicitly {@link google.rpc.DebugInfo.verify|verify} messages. - * @param message DebugInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IDebugInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a DebugInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns DebugInfo - * @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.rpc.DebugInfo; - - /** - * Decodes a DebugInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns DebugInfo - * @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.rpc.DebugInfo; - - /** - * Verifies a DebugInfo 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 DebugInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns DebugInfo - */ - public static fromObject(object: { [k: string]: any }): google.rpc.DebugInfo; - - /** - * Creates a plain object from a DebugInfo message. Also converts values to other types if specified. - * @param message DebugInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.DebugInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this DebugInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for DebugInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a QuotaFailure. */ - interface IQuotaFailure { - - /** QuotaFailure violations */ - violations?: (google.rpc.QuotaFailure.IViolation[]|null); - } - - /** Represents a QuotaFailure. */ - class QuotaFailure implements IQuotaFailure { - - /** - * Constructs a new QuotaFailure. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IQuotaFailure); - - /** QuotaFailure violations. */ - public violations: google.rpc.QuotaFailure.IViolation[]; - - /** - * Creates a new QuotaFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns QuotaFailure instance - */ - public static create(properties?: google.rpc.IQuotaFailure): google.rpc.QuotaFailure; - - /** - * Encodes the specified QuotaFailure message. Does not implicitly {@link google.rpc.QuotaFailure.verify|verify} messages. - * @param message QuotaFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IQuotaFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified QuotaFailure message, length delimited. Does not implicitly {@link google.rpc.QuotaFailure.verify|verify} messages. - * @param message QuotaFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IQuotaFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a QuotaFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns QuotaFailure - * @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.rpc.QuotaFailure; - - /** - * Decodes a QuotaFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns QuotaFailure - * @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.rpc.QuotaFailure; - - /** - * Verifies a QuotaFailure 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 QuotaFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns QuotaFailure - */ - public static fromObject(object: { [k: string]: any }): google.rpc.QuotaFailure; - - /** - * Creates a plain object from a QuotaFailure message. Also converts values to other types if specified. - * @param message QuotaFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.QuotaFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this QuotaFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for QuotaFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace QuotaFailure { - - /** Properties of a Violation. */ - interface IViolation { - - /** Violation subject */ - subject?: (string|null); - - /** Violation description */ - description?: (string|null); - - /** Violation apiService */ - apiService?: (string|null); - - /** Violation quotaMetric */ - quotaMetric?: (string|null); - - /** Violation quotaId */ - quotaId?: (string|null); - - /** Violation quotaDimensions */ - quotaDimensions?: ({ [k: string]: string }|null); - - /** Violation quotaValue */ - quotaValue?: (number|Long|string|null); - - /** Violation futureQuotaValue */ - futureQuotaValue?: (number|Long|string|null); - } - - /** Represents a Violation. */ - class Violation implements IViolation { - - /** - * Constructs a new Violation. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.QuotaFailure.IViolation); - - /** Violation subject. */ - public subject: string; - - /** Violation description. */ - public description: string; - - /** Violation apiService. */ - public apiService: string; - - /** Violation quotaMetric. */ - public quotaMetric: string; - - /** Violation quotaId. */ - public quotaId: string; - - /** Violation quotaDimensions. */ - public quotaDimensions: { [k: string]: string }; - - /** Violation quotaValue. */ - public quotaValue: (number|Long|string); - - /** Violation futureQuotaValue. */ - public futureQuotaValue?: (number|Long|string|null); - - /** - * Creates a new Violation instance using the specified properties. - * @param [properties] Properties to set - * @returns Violation instance - */ - public static create(properties?: google.rpc.QuotaFailure.IViolation): google.rpc.QuotaFailure.Violation; - - /** - * Encodes the specified Violation message. Does not implicitly {@link google.rpc.QuotaFailure.Violation.verify|verify} messages. - * @param message Violation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.QuotaFailure.IViolation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Violation message, length delimited. Does not implicitly {@link google.rpc.QuotaFailure.Violation.verify|verify} messages. - * @param message Violation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.QuotaFailure.IViolation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Violation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Violation - * @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.rpc.QuotaFailure.Violation; - - /** - * Decodes a Violation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Violation - * @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.rpc.QuotaFailure.Violation; - - /** - * Verifies a Violation 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 Violation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Violation - */ - public static fromObject(object: { [k: string]: any }): google.rpc.QuotaFailure.Violation; - - /** - * Creates a plain object from a Violation message. Also converts values to other types if specified. - * @param message Violation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.QuotaFailure.Violation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Violation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Violation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a PreconditionFailure. */ - interface IPreconditionFailure { - - /** PreconditionFailure violations */ - violations?: (google.rpc.PreconditionFailure.IViolation[]|null); - } - - /** Represents a PreconditionFailure. */ - class PreconditionFailure implements IPreconditionFailure { - - /** - * Constructs a new PreconditionFailure. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IPreconditionFailure); - - /** PreconditionFailure violations. */ - public violations: google.rpc.PreconditionFailure.IViolation[]; - - /** - * Creates a new PreconditionFailure instance using the specified properties. - * @param [properties] Properties to set - * @returns PreconditionFailure instance - */ - public static create(properties?: google.rpc.IPreconditionFailure): google.rpc.PreconditionFailure; - - /** - * Encodes the specified PreconditionFailure message. Does not implicitly {@link google.rpc.PreconditionFailure.verify|verify} messages. - * @param message PreconditionFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IPreconditionFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified PreconditionFailure message, length delimited. Does not implicitly {@link google.rpc.PreconditionFailure.verify|verify} messages. - * @param message PreconditionFailure message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IPreconditionFailure, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a PreconditionFailure message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns PreconditionFailure - * @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.rpc.PreconditionFailure; - - /** - * Decodes a PreconditionFailure message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns PreconditionFailure - * @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.rpc.PreconditionFailure; - - /** - * Verifies a PreconditionFailure 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 PreconditionFailure message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns PreconditionFailure - */ - public static fromObject(object: { [k: string]: any }): google.rpc.PreconditionFailure; - - /** - * Creates a plain object from a PreconditionFailure message. Also converts values to other types if specified. - * @param message PreconditionFailure - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.PreconditionFailure, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this PreconditionFailure to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for PreconditionFailure - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace PreconditionFailure { - - /** Properties of a Violation. */ - interface IViolation { - - /** Violation type */ - type?: (string|null); - - /** Violation subject */ - subject?: (string|null); - - /** Violation description */ - description?: (string|null); - } - - /** Represents a Violation. */ - class Violation implements IViolation { - - /** - * Constructs a new Violation. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.PreconditionFailure.IViolation); - - /** Violation type. */ - public type: string; - - /** Violation subject. */ - public subject: string; - - /** Violation description. */ - public description: string; - - /** - * Creates a new Violation instance using the specified properties. - * @param [properties] Properties to set - * @returns Violation instance - */ - public static create(properties?: google.rpc.PreconditionFailure.IViolation): google.rpc.PreconditionFailure.Violation; - - /** - * Encodes the specified Violation message. Does not implicitly {@link google.rpc.PreconditionFailure.Violation.verify|verify} messages. - * @param message Violation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.PreconditionFailure.IViolation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Violation message, length delimited. Does not implicitly {@link google.rpc.PreconditionFailure.Violation.verify|verify} messages. - * @param message Violation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.PreconditionFailure.IViolation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Violation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Violation - * @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.rpc.PreconditionFailure.Violation; - - /** - * Decodes a Violation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Violation - * @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.rpc.PreconditionFailure.Violation; - - /** - * Verifies a Violation 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 Violation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Violation - */ - public static fromObject(object: { [k: string]: any }): google.rpc.PreconditionFailure.Violation; - - /** - * Creates a plain object from a Violation message. Also converts values to other types if specified. - * @param message Violation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.PreconditionFailure.Violation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Violation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Violation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a BadRequest. */ - interface IBadRequest { - - /** BadRequest fieldViolations */ - fieldViolations?: (google.rpc.BadRequest.IFieldViolation[]|null); - } - - /** Represents a BadRequest. */ - class BadRequest implements IBadRequest { - - /** - * Constructs a new BadRequest. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IBadRequest); - - /** BadRequest fieldViolations. */ - public fieldViolations: google.rpc.BadRequest.IFieldViolation[]; - - /** - * Creates a new BadRequest instance using the specified properties. - * @param [properties] Properties to set - * @returns BadRequest instance - */ - public static create(properties?: google.rpc.IBadRequest): google.rpc.BadRequest; - - /** - * Encodes the specified BadRequest message. Does not implicitly {@link google.rpc.BadRequest.verify|verify} messages. - * @param message BadRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IBadRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified BadRequest message, length delimited. Does not implicitly {@link google.rpc.BadRequest.verify|verify} messages. - * @param message BadRequest message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IBadRequest, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a BadRequest message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns BadRequest - * @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.rpc.BadRequest; - - /** - * Decodes a BadRequest message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns BadRequest - * @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.rpc.BadRequest; - - /** - * Verifies a BadRequest 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 BadRequest message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns BadRequest - */ - public static fromObject(object: { [k: string]: any }): google.rpc.BadRequest; - - /** - * Creates a plain object from a BadRequest message. Also converts values to other types if specified. - * @param message BadRequest - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.BadRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this BadRequest to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for BadRequest - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace BadRequest { - - /** Properties of a FieldViolation. */ - interface IFieldViolation { - - /** FieldViolation field */ - field?: (string|null); - - /** FieldViolation description */ - description?: (string|null); - - /** FieldViolation reason */ - reason?: (string|null); - - /** FieldViolation localizedMessage */ - localizedMessage?: (google.rpc.ILocalizedMessage|null); - } - - /** Represents a FieldViolation. */ - class FieldViolation implements IFieldViolation { - - /** - * Constructs a new FieldViolation. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.BadRequest.IFieldViolation); - - /** FieldViolation field. */ - public field: string; - - /** FieldViolation description. */ - public description: string; - - /** FieldViolation reason. */ - public reason: string; - - /** FieldViolation localizedMessage. */ - public localizedMessage?: (google.rpc.ILocalizedMessage|null); - - /** - * Creates a new FieldViolation instance using the specified properties. - * @param [properties] Properties to set - * @returns FieldViolation instance - */ - public static create(properties?: google.rpc.BadRequest.IFieldViolation): google.rpc.BadRequest.FieldViolation; - - /** - * Encodes the specified FieldViolation message. Does not implicitly {@link google.rpc.BadRequest.FieldViolation.verify|verify} messages. - * @param message FieldViolation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.BadRequest.IFieldViolation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified FieldViolation message, length delimited. Does not implicitly {@link google.rpc.BadRequest.FieldViolation.verify|verify} messages. - * @param message FieldViolation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.BadRequest.IFieldViolation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a FieldViolation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns FieldViolation - * @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.rpc.BadRequest.FieldViolation; - - /** - * Decodes a FieldViolation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns FieldViolation - * @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.rpc.BadRequest.FieldViolation; - - /** - * Verifies a FieldViolation 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 FieldViolation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns FieldViolation - */ - public static fromObject(object: { [k: string]: any }): google.rpc.BadRequest.FieldViolation; - - /** - * Creates a plain object from a FieldViolation message. Also converts values to other types if specified. - * @param message FieldViolation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.BadRequest.FieldViolation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this FieldViolation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for FieldViolation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a RequestInfo. */ - interface IRequestInfo { - - /** RequestInfo requestId */ - requestId?: (string|null); - - /** RequestInfo servingData */ - servingData?: (string|null); - } - - /** Represents a RequestInfo. */ - class RequestInfo implements IRequestInfo { - - /** - * Constructs a new RequestInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IRequestInfo); - - /** RequestInfo requestId. */ - public requestId: string; - - /** RequestInfo servingData. */ - public servingData: string; - - /** - * Creates a new RequestInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns RequestInfo instance - */ - public static create(properties?: google.rpc.IRequestInfo): google.rpc.RequestInfo; - - /** - * Encodes the specified RequestInfo message. Does not implicitly {@link google.rpc.RequestInfo.verify|verify} messages. - * @param message RequestInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IRequestInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link google.rpc.RequestInfo.verify|verify} messages. - * @param message RequestInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IRequestInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a RequestInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns RequestInfo - * @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.rpc.RequestInfo; - - /** - * Decodes a RequestInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns RequestInfo - * @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.rpc.RequestInfo; - - /** - * Verifies a RequestInfo 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 RequestInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns RequestInfo - */ - public static fromObject(object: { [k: string]: any }): google.rpc.RequestInfo; - - /** - * Creates a plain object from a RequestInfo message. Also converts values to other types if specified. - * @param message RequestInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.RequestInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this RequestInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for RequestInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a ResourceInfo. */ - interface IResourceInfo { - - /** ResourceInfo resourceType */ - resourceType?: (string|null); - - /** ResourceInfo resourceName */ - resourceName?: (string|null); - - /** ResourceInfo owner */ - owner?: (string|null); - - /** ResourceInfo description */ - description?: (string|null); - } - - /** Represents a ResourceInfo. */ - class ResourceInfo implements IResourceInfo { - - /** - * Constructs a new ResourceInfo. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IResourceInfo); - - /** ResourceInfo resourceType. */ - public resourceType: string; - - /** ResourceInfo resourceName. */ - public resourceName: string; - - /** ResourceInfo owner. */ - public owner: string; - - /** ResourceInfo description. */ - public description: string; - - /** - * Creates a new ResourceInfo instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceInfo instance - */ - public static create(properties?: google.rpc.IResourceInfo): google.rpc.ResourceInfo; - - /** - * Encodes the specified ResourceInfo message. Does not implicitly {@link google.rpc.ResourceInfo.verify|verify} messages. - * @param message ResourceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IResourceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ResourceInfo message, length delimited. Does not implicitly {@link google.rpc.ResourceInfo.verify|verify} messages. - * @param message ResourceInfo message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IResourceInfo, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ResourceInfo message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceInfo - * @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.rpc.ResourceInfo; - - /** - * Decodes a ResourceInfo message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ResourceInfo - * @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.rpc.ResourceInfo; - - /** - * Verifies a ResourceInfo 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 ResourceInfo message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceInfo - */ - public static fromObject(object: { [k: string]: any }): google.rpc.ResourceInfo; - - /** - * Creates a plain object from a ResourceInfo message. Also converts values to other types if specified. - * @param message ResourceInfo - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.ResourceInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this ResourceInfo to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for ResourceInfo - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a Help. */ - interface IHelp { - - /** Help links */ - links?: (google.rpc.Help.ILink[]|null); - } - - /** Represents a Help. */ - class Help implements IHelp { - - /** - * Constructs a new Help. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.IHelp); - - /** Help links. */ - public links: google.rpc.Help.ILink[]; - - /** - * Creates a new Help instance using the specified properties. - * @param [properties] Properties to set - * @returns Help instance - */ - public static create(properties?: google.rpc.IHelp): google.rpc.Help; - - /** - * Encodes the specified Help message. Does not implicitly {@link google.rpc.Help.verify|verify} messages. - * @param message Help message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.IHelp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Help message, length delimited. Does not implicitly {@link google.rpc.Help.verify|verify} messages. - * @param message Help message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.IHelp, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Help message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Help - * @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.rpc.Help; - - /** - * Decodes a Help message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Help - * @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.rpc.Help; - - /** - * Verifies a Help 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 Help message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Help - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Help; - - /** - * Creates a plain object from a Help message. Also converts values to other types if specified. - * @param message Help - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Help, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Help to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Help - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Help { - - /** Properties of a Link. */ - interface ILink { - - /** Link description */ - description?: (string|null); - - /** Link url */ - url?: (string|null); - } - - /** Represents a Link. */ - class Link implements ILink { - - /** - * Constructs a new Link. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.Help.ILink); - - /** Link description. */ - public description: string; - - /** Link url. */ - public url: string; - - /** - * Creates a new Link instance using the specified properties. - * @param [properties] Properties to set - * @returns Link instance - */ - public static create(properties?: google.rpc.Help.ILink): google.rpc.Help.Link; - - /** - * Encodes the specified Link message. Does not implicitly {@link google.rpc.Help.Link.verify|verify} messages. - * @param message Link message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.Help.ILink, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Link message, length delimited. Does not implicitly {@link google.rpc.Help.Link.verify|verify} messages. - * @param message Link message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.Help.ILink, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Link message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Link - * @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.rpc.Help.Link; - - /** - * Decodes a Link message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Link - * @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.rpc.Help.Link; - - /** - * Verifies a Link 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 Link message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Link - */ - public static fromObject(object: { [k: string]: any }): google.rpc.Help.Link; - - /** - * Creates a plain object from a Link message. Also converts values to other types if specified. - * @param message Link - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.Help.Link, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Link to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Link - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a LocalizedMessage. */ - interface ILocalizedMessage { - - /** LocalizedMessage locale */ - locale?: (string|null); - - /** LocalizedMessage message */ - message?: (string|null); - } - - /** Represents a LocalizedMessage. */ - class LocalizedMessage implements ILocalizedMessage { - - /** - * Constructs a new LocalizedMessage. - * @param [properties] Properties to set - */ - constructor(properties?: google.rpc.ILocalizedMessage); - - /** LocalizedMessage locale. */ - public locale: string; - - /** LocalizedMessage message. */ - public message: string; - - /** - * Creates a new LocalizedMessage instance using the specified properties. - * @param [properties] Properties to set - * @returns LocalizedMessage instance - */ - public static create(properties?: google.rpc.ILocalizedMessage): google.rpc.LocalizedMessage; - - /** - * Encodes the specified LocalizedMessage message. Does not implicitly {@link google.rpc.LocalizedMessage.verify|verify} messages. - * @param message LocalizedMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.rpc.ILocalizedMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified LocalizedMessage message, length delimited. Does not implicitly {@link google.rpc.LocalizedMessage.verify|verify} messages. - * @param message LocalizedMessage message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.rpc.ILocalizedMessage, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a LocalizedMessage message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns LocalizedMessage - * @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.rpc.LocalizedMessage; - - /** - * Decodes a LocalizedMessage message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns LocalizedMessage - * @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.rpc.LocalizedMessage; - - /** - * Verifies a LocalizedMessage 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 LocalizedMessage message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns LocalizedMessage - */ - public static fromObject(object: { [k: string]: any }): google.rpc.LocalizedMessage; - - /** - * Creates a plain object from a LocalizedMessage message. Also converts values to other types if specified. - * @param message LocalizedMessage - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.rpc.LocalizedMessage, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this LocalizedMessage to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for LocalizedMessage - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.js b/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.js deleted file mode 100644 index 2a2bf8e377b6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.js +++ /dev/null @@ -1,53890 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ -(function(global, factory) { /* global define, require, module */ - - /* AMD */ if (typeof define === 'function' && define.amd) - define(["protobufjs/minimal"], factory); - - /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) - module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); - -})(this, function($protobuf) { - "use strict"; - - // Common aliases - var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; - - // Exported root namespace - var $root = $protobuf.roots._google_cloud_bigquery_migration_protos || ($protobuf.roots._google_cloud_bigquery_migration_protos = {}); - - $root.google = (function() { - - /** - * Namespace google. - * @exports google - * @namespace - */ - var google = {}; - - google.cloud = (function() { - - /** - * Namespace cloud. - * @memberof google - * @namespace - */ - var cloud = {}; - - cloud.bigquery = (function() { - - /** - * Namespace bigquery. - * @memberof google.cloud - * @namespace - */ - var bigquery = {}; - - bigquery.migration = (function() { - - /** - * Namespace migration. - * @memberof google.cloud.bigquery - * @namespace - */ - var migration = {}; - - migration.v2 = (function() { - - /** - * Namespace v2. - * @memberof google.cloud.bigquery.migration - * @namespace - */ - var v2 = {}; - - v2.AssessmentTaskDetails = (function() { - - /** - * Properties of an AssessmentTaskDetails. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IAssessmentTaskDetails - * @property {string|null} [inputPath] AssessmentTaskDetails inputPath - * @property {string|null} [outputDataset] AssessmentTaskDetails outputDataset - * @property {string|null} [querylogsPath] AssessmentTaskDetails querylogsPath - * @property {string|null} [dataSource] AssessmentTaskDetails dataSource - * @property {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null} [featureHandle] AssessmentTaskDetails featureHandle - */ - - /** - * Constructs a new AssessmentTaskDetails. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an AssessmentTaskDetails. - * @implements IAssessmentTaskDetails - * @constructor - * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails=} [properties] Properties to set - */ - function AssessmentTaskDetails(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]]; - } - - /** - * AssessmentTaskDetails inputPath. - * @member {string} inputPath - * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails - * @instance - */ - AssessmentTaskDetails.prototype.inputPath = ""; - - /** - * AssessmentTaskDetails outputDataset. - * @member {string} outputDataset - * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails - * @instance - */ - AssessmentTaskDetails.prototype.outputDataset = ""; - - /** - * AssessmentTaskDetails querylogsPath. - * @member {string} querylogsPath - * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails - * @instance - */ - AssessmentTaskDetails.prototype.querylogsPath = ""; - - /** - * AssessmentTaskDetails dataSource. - * @member {string} dataSource - * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails - * @instance - */ - AssessmentTaskDetails.prototype.dataSource = ""; - - /** - * AssessmentTaskDetails featureHandle. - * @member {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null|undefined} featureHandle - * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails - * @instance - */ - AssessmentTaskDetails.prototype.featureHandle = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AssessmentTaskDetails.prototype, "_featureHandle", { - get: $util.oneOfGetter($oneOfFields = ["featureHandle"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AssessmentTaskDetails instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails - * @static - * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails instance - */ - AssessmentTaskDetails.create = function create(properties) { - return new AssessmentTaskDetails(properties); - }; - - /** - * Encodes the specified AssessmentTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails - * @static - * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails} message AssessmentTaskDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssessmentTaskDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inputPath != null && Object.hasOwnProperty.call(message, "inputPath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputPath); - if (message.outputDataset != null && Object.hasOwnProperty.call(message, "outputDataset")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.outputDataset); - if (message.querylogsPath != null && Object.hasOwnProperty.call(message, "querylogsPath")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.querylogsPath); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dataSource); - if (message.featureHandle != null && Object.hasOwnProperty.call(message, "featureHandle")) - $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.encode(message.featureHandle, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified AssessmentTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails - * @static - * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails} message AssessmentTaskDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssessmentTaskDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AssessmentTaskDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssessmentTaskDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.inputPath = reader.string(); - break; - } - case 2: { - message.outputDataset = reader.string(); - break; - } - case 3: { - message.querylogsPath = reader.string(); - break; - } - case 4: { - message.dataSource = reader.string(); - break; - } - case 6: { - message.featureHandle = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AssessmentTaskDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssessmentTaskDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AssessmentTaskDetails message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AssessmentTaskDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.inputPath != null && message.hasOwnProperty("inputPath")) - if (!$util.isString(message.inputPath)) - return "inputPath: string expected"; - if (message.outputDataset != null && message.hasOwnProperty("outputDataset")) - if (!$util.isString(message.outputDataset)) - return "outputDataset: string expected"; - if (message.querylogsPath != null && message.hasOwnProperty("querylogsPath")) - if (!$util.isString(message.querylogsPath)) - return "querylogsPath: string expected"; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; - if (message.featureHandle != null && message.hasOwnProperty("featureHandle")) { - properties._featureHandle = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify(message.featureHandle); - if (error) - return "featureHandle." + error; - } - } - return null; - }; - - /** - * Creates an AssessmentTaskDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails - */ - AssessmentTaskDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails(); - if (object.inputPath != null) - message.inputPath = String(object.inputPath); - if (object.outputDataset != null) - message.outputDataset = String(object.outputDataset); - if (object.querylogsPath != null) - message.querylogsPath = String(object.querylogsPath); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - if (object.featureHandle != null) { - if (typeof object.featureHandle !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.AssessmentTaskDetails.featureHandle: object expected"); - message.featureHandle = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.fromObject(object.featureHandle); - } - return message; - }; - - /** - * Creates a plain object from an AssessmentTaskDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails - * @static - * @param {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} message AssessmentTaskDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AssessmentTaskDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.inputPath = ""; - object.outputDataset = ""; - object.querylogsPath = ""; - object.dataSource = ""; - } - if (message.inputPath != null && message.hasOwnProperty("inputPath")) - object.inputPath = message.inputPath; - if (message.outputDataset != null && message.hasOwnProperty("outputDataset")) - object.outputDataset = message.outputDataset; - if (message.querylogsPath != null && message.hasOwnProperty("querylogsPath")) - object.querylogsPath = message.querylogsPath; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - if (message.featureHandle != null && message.hasOwnProperty("featureHandle")) { - object.featureHandle = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.toObject(message.featureHandle, options); - if (options.oneofs) - object._featureHandle = "featureHandle"; - } - return object; - }; - - /** - * Converts this AssessmentTaskDetails to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails - * @instance - * @returns {Object.} JSON object - */ - AssessmentTaskDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AssessmentTaskDetails - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AssessmentTaskDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.AssessmentTaskDetails"; - }; - - return AssessmentTaskDetails; - })(); - - v2.AssessmentFeatureHandle = (function() { - - /** - * Properties of an AssessmentFeatureHandle. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IAssessmentFeatureHandle - * @property {boolean|null} [addShareableDataset] AssessmentFeatureHandle addShareableDataset - */ - - /** - * Constructs a new AssessmentFeatureHandle. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an AssessmentFeatureHandle. - * @implements IAssessmentFeatureHandle - * @constructor - * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle=} [properties] Properties to set - */ - function AssessmentFeatureHandle(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]]; - } - - /** - * AssessmentFeatureHandle addShareableDataset. - * @member {boolean|null|undefined} addShareableDataset - * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle - * @instance - */ - AssessmentFeatureHandle.prototype.addShareableDataset = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(AssessmentFeatureHandle.prototype, "_addShareableDataset", { - get: $util.oneOfGetter($oneOfFields = ["addShareableDataset"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new AssessmentFeatureHandle instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle - * @static - * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle instance - */ - AssessmentFeatureHandle.create = function create(properties) { - return new AssessmentFeatureHandle(properties); - }; - - /** - * Encodes the specified AssessmentFeatureHandle message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle - * @static - * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle} message AssessmentFeatureHandle message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssessmentFeatureHandle.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.addShareableDataset != null && Object.hasOwnProperty.call(message, "addShareableDataset")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.addShareableDataset); - return writer; - }; - - /** - * Encodes the specified AssessmentFeatureHandle message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle - * @static - * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle} message AssessmentFeatureHandle message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssessmentFeatureHandle.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AssessmentFeatureHandle message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssessmentFeatureHandle.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.addShareableDataset = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AssessmentFeatureHandle message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssessmentFeatureHandle.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AssessmentFeatureHandle message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AssessmentFeatureHandle.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.addShareableDataset != null && message.hasOwnProperty("addShareableDataset")) { - properties._addShareableDataset = 1; - if (typeof message.addShareableDataset !== "boolean") - return "addShareableDataset: boolean expected"; - } - return null; - }; - - /** - * Creates an AssessmentFeatureHandle message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle - */ - AssessmentFeatureHandle.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle(); - if (object.addShareableDataset != null) - message.addShareableDataset = Boolean(object.addShareableDataset); - return message; - }; - - /** - * Creates a plain object from an AssessmentFeatureHandle message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle - * @static - * @param {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} message AssessmentFeatureHandle - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AssessmentFeatureHandle.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.addShareableDataset != null && message.hasOwnProperty("addShareableDataset")) { - object.addShareableDataset = message.addShareableDataset; - if (options.oneofs) - object._addShareableDataset = "addShareableDataset"; - } - return object; - }; - - /** - * Converts this AssessmentFeatureHandle to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle - * @instance - * @returns {Object.} JSON object - */ - AssessmentFeatureHandle.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AssessmentFeatureHandle - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AssessmentFeatureHandle.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.AssessmentFeatureHandle"; - }; - - return AssessmentFeatureHandle; - })(); - - v2.MigrationWorkflow = (function() { - - /** - * Properties of a MigrationWorkflow. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IMigrationWorkflow - * @property {string|null} [name] MigrationWorkflow name - * @property {string|null} [displayName] MigrationWorkflow displayName - * @property {Object.|null} [tasks] MigrationWorkflow tasks - * @property {google.cloud.bigquery.migration.v2.MigrationWorkflow.State|null} [state] MigrationWorkflow state - * @property {google.protobuf.ITimestamp|null} [createTime] MigrationWorkflow createTime - * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationWorkflow lastUpdateTime - */ - - /** - * Constructs a new MigrationWorkflow. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MigrationWorkflow. - * @implements IMigrationWorkflow - * @constructor - * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow=} [properties] Properties to set - */ - function MigrationWorkflow(properties) { - this.tasks = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MigrationWorkflow name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @instance - */ - MigrationWorkflow.prototype.name = ""; - - /** - * MigrationWorkflow displayName. - * @member {string} displayName - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @instance - */ - MigrationWorkflow.prototype.displayName = ""; - - /** - * MigrationWorkflow tasks. - * @member {Object.} tasks - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @instance - */ - MigrationWorkflow.prototype.tasks = $util.emptyObject; - - /** - * MigrationWorkflow state. - * @member {google.cloud.bigquery.migration.v2.MigrationWorkflow.State} state - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @instance - */ - MigrationWorkflow.prototype.state = 0; - - /** - * MigrationWorkflow createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @instance - */ - MigrationWorkflow.prototype.createTime = null; - - /** - * MigrationWorkflow lastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @instance - */ - MigrationWorkflow.prototype.lastUpdateTime = null; - - /** - * Creates a new MigrationWorkflow instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow instance - */ - MigrationWorkflow.create = function create(properties) { - return new MigrationWorkflow(properties); - }; - - /** - * Encodes the specified MigrationWorkflow message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationWorkflow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.tasks != null && Object.hasOwnProperty.call(message, "tasks")) - for (var keys = Object.keys(message.tasks), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.bigquery.migration.v2.MigrationTask.encode(message.tasks[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - return writer; - }; - - /** - * Encodes the specified MigrationWorkflow message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationWorkflow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MigrationWorkflow message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationWorkflow.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationWorkflow(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 6: { - message.displayName = reader.string(); - break; - } - case 2: { - if (message.tasks === $util.emptyObject) - message.tasks = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.bigquery.migration.v2.MigrationTask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.tasks[key] = value; - break; - } - case 3: { - message.state = reader.int32(); - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MigrationWorkflow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationWorkflow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MigrationWorkflow message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MigrationWorkflow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.tasks != null && message.hasOwnProperty("tasks")) { - if (!$util.isObject(message.tasks)) - return "tasks: object expected"; - var key = Object.keys(message.tasks); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.MigrationTask.verify(message.tasks[key[i]]); - if (error) - return "tasks." + error; - } - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); - if (error) - return "lastUpdateTime." + error; - } - return null; - }; - - /** - * Creates a MigrationWorkflow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow - */ - MigrationWorkflow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationWorkflow) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.MigrationWorkflow(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.tasks) { - if (typeof object.tasks !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.tasks: object expected"); - message.tasks = {}; - for (var keys = Object.keys(object.tasks), i = 0; i < keys.length; ++i) { - if (typeof object.tasks[keys[i]] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.tasks: object expected"); - message.tasks[keys[i]] = $root.google.cloud.bigquery.migration.v2.MigrationTask.fromObject(object.tasks[keys[i]]); - } - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "DRAFT": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "PAUSED": - case 3: - message.state = 3; - break; - case "COMPLETED": - case 4: - message.state = 4; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.lastUpdateTime != null) { - if (typeof object.lastUpdateTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.lastUpdateTime: object expected"); - message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); - } - return message; - }; - - /** - * Creates a plain object from a MigrationWorkflow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @static - * @param {google.cloud.bigquery.migration.v2.MigrationWorkflow} message MigrationWorkflow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MigrationWorkflow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.tasks = {}; - if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.createTime = null; - object.lastUpdateTime = null; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.tasks && (keys2 = Object.keys(message.tasks)).length) { - object.tasks = {}; - for (var j = 0; j < keys2.length; ++j) - object.tasks[keys2[j]] = $root.google.cloud.bigquery.migration.v2.MigrationTask.toObject(message.tasks[keys2[j]], options); - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.State[message.state] : message.state; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) - object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; - - /** - * Converts this MigrationWorkflow to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @instance - * @returns {Object.} JSON object - */ - MigrationWorkflow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MigrationWorkflow - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MigrationWorkflow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationWorkflow"; - }; - - /** - * State enum. - * @name google.cloud.bigquery.migration.v2.MigrationWorkflow.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} DRAFT=1 DRAFT value - * @property {number} RUNNING=2 RUNNING value - * @property {number} PAUSED=3 PAUSED value - * @property {number} COMPLETED=4 COMPLETED value - */ - MigrationWorkflow.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DRAFT"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "PAUSED"] = 3; - values[valuesById[4] = "COMPLETED"] = 4; - return values; - })(); - - return MigrationWorkflow; - })(); - - v2.MigrationTask = (function() { - - /** - * Properties of a MigrationTask. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IMigrationTask - * @property {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null} [assessmentTaskDetails] MigrationTask assessmentTaskDetails - * @property {google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null} [translationConfigDetails] MigrationTask translationConfigDetails - * @property {google.cloud.bigquery.migration.v2.ITranslationDetails|null} [translationDetails] MigrationTask translationDetails - * @property {string|null} [id] MigrationTask id - * @property {string|null} [type] MigrationTask type - * @property {google.cloud.bigquery.migration.v2.MigrationTask.State|null} [state] MigrationTask state - * @property {google.rpc.IErrorInfo|null} [processingError] MigrationTask processingError - * @property {google.protobuf.ITimestamp|null} [createTime] MigrationTask createTime - * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationTask lastUpdateTime - * @property {Array.|null} [resourceErrorDetails] MigrationTask resourceErrorDetails - * @property {number|null} [resourceErrorCount] MigrationTask resourceErrorCount - * @property {Array.|null} [metrics] MigrationTask metrics - * @property {google.cloud.bigquery.migration.v2.IMigrationTaskResult|null} [taskResult] MigrationTask taskResult - * @property {number|null} [totalProcessingErrorCount] MigrationTask totalProcessingErrorCount - * @property {number|null} [totalResourceErrorCount] MigrationTask totalResourceErrorCount - */ - - /** - * Constructs a new MigrationTask. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MigrationTask. - * @implements IMigrationTask - * @constructor - * @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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MigrationTask assessmentTaskDetails. - * @member {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null|undefined} assessmentTaskDetails - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance - */ - MigrationTask.prototype.assessmentTaskDetails = null; - - /** - * MigrationTask translationConfigDetails. - * @member {google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null|undefined} translationConfigDetails - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance - */ - 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 - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance - */ - MigrationTask.prototype.id = ""; - - /** - * MigrationTask type. - * @member {string} type - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance - */ - MigrationTask.prototype.type = ""; - - /** - * MigrationTask state. - * @member {google.cloud.bigquery.migration.v2.MigrationTask.State} state - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance - */ - MigrationTask.prototype.state = 0; - - /** - * MigrationTask processingError. - * @member {google.rpc.IErrorInfo|null|undefined} processingError - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance - */ - MigrationTask.prototype.processingError = null; - - /** - * MigrationTask createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance - */ - MigrationTask.prototype.createTime = null; - - /** - * MigrationTask lastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance - */ - MigrationTask.prototype.lastUpdateTime = null; - - /** - * MigrationTask resourceErrorDetails. - * @member {Array.} resourceErrorDetails - * @memberof google.cloud.bigquery.migration.v2.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 {"assessmentTaskDetails"|"translationConfigDetails"|"translationDetails"|undefined} taskDetails - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance - */ - Object.defineProperty(MigrationTask.prototype, "taskDetails", { - get: $util.oneOfGetter($oneOfFields = ["assessmentTaskDetails", "translationConfigDetails", "translationDetails"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MigrationTask instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTask=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask instance - */ - MigrationTask.create = function create(properties) { - return new MigrationTask(properties); - }; - - /** - * Encodes the specified MigrationTask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTask} message MigrationTask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationTask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.processingError != null && Object.hasOwnProperty.call(message, "processingError")) - $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.assessmentTaskDetails != null && Object.hasOwnProperty.call(message, "assessmentTaskDetails")) - $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.encode(message.assessmentTaskDetails, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.translationConfigDetails != null && Object.hasOwnProperty.call(message, "translationConfigDetails")) - $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.encode(message.translationConfigDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.translationDetails != null && Object.hasOwnProperty.call(message, "translationDetails")) - $root.google.cloud.bigquery.migration.v2.TranslationDetails.encode(message.translationDetails, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.resourceErrorDetails != null && message.resourceErrorDetails.length) - for (var i = 0; i < message.resourceErrorDetails.length; ++i) - $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.encode(message.resourceErrorDetails[i], writer.uint32(/* id 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; - }; - - /** - * Encodes the specified MigrationTask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTask} message MigrationTask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationTask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MigrationTask message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationTask.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationTask(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 12: { - message.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.decode(reader, reader.uint32()); - break; - } - case 14: { - message.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.decode(reader, reader.uint32()); - break; - } - case 16: { - message.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.decode(reader, reader.uint32()); - break; - } - case 1: { - message.id = reader.string(); - break; - } - case 2: { - message.type = reader.string(); - break; - } - case 4: { - message.state = reader.int32(); - break; - } - case 5: { - message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); - break; - } - case 6: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 17: { - if (!(message.resourceErrorDetails && message.resourceErrorDetails.length)) - message.resourceErrorDetails = []; - message.resourceErrorDetails.push($root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.decode(reader, reader.uint32())); - break; - } - case 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; - } - } - return message; - }; - - /** - * Decodes a MigrationTask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationTask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MigrationTask message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MigrationTask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.assessmentTaskDetails != null && message.hasOwnProperty("assessmentTaskDetails")) { - properties.taskDetails = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify(message.assessmentTaskDetails); - if (error) - return "assessmentTaskDetails." + error; - } - } - if (message.translationConfigDetails != null && message.hasOwnProperty("translationConfigDetails")) { - if (properties.taskDetails === 1) - return "taskDetails: multiple values"; - properties.taskDetails = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.verify(message.translationConfigDetails); - if (error) - return "translationConfigDetails." + error; - } - } - if (message.translationDetails != null && message.hasOwnProperty("translationDetails")) { - if (properties.taskDetails === 1) - return "taskDetails: multiple values"; - properties.taskDetails = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.TranslationDetails.verify(message.translationDetails); - if (error) - return "translationDetails." + error; - } - } - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.processingError != null && message.hasOwnProperty("processingError")) { - var error = $root.google.rpc.ErrorInfo.verify(message.processingError); - if (error) - return "processingError." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); - if (error) - return "lastUpdateTime." + error; - } - if (message.resourceErrorDetails != null && message.hasOwnProperty("resourceErrorDetails")) { - if (!Array.isArray(message.resourceErrorDetails)) - return "resourceErrorDetails: array expected"; - for (var i = 0; i < message.resourceErrorDetails.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify(message.resourceErrorDetails[i]); - if (error) - return "resourceErrorDetails." + error; - } - } - if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) - if (!$util.isInteger(message.resourceErrorCount)) - return "resourceErrorCount: integer expected"; - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.TimeSeries.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.taskResult != null && message.hasOwnProperty("taskResult")) { - var error = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.verify(message.taskResult); - if (error) - return "taskResult." + error; - } - if (message.totalProcessingErrorCount != null && message.hasOwnProperty("totalProcessingErrorCount")) - if (!$util.isInteger(message.totalProcessingErrorCount)) - return "totalProcessingErrorCount: integer expected"; - if (message.totalResourceErrorCount != null && message.hasOwnProperty("totalResourceErrorCount")) - if (!$util.isInteger(message.totalResourceErrorCount)) - return "totalResourceErrorCount: integer expected"; - return null; - }; - - /** - * Creates a MigrationTask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask - */ - MigrationTask.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationTask) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.MigrationTask(); - if (object.assessmentTaskDetails != null) { - if (typeof object.assessmentTaskDetails !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.assessmentTaskDetails: object expected"); - message.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.fromObject(object.assessmentTaskDetails); - } - if (object.translationConfigDetails != null) { - if (typeof object.translationConfigDetails !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.translationConfigDetails: object expected"); - message.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.fromObject(object.translationConfigDetails); - } - if (object.translationDetails != null) { - if (typeof object.translationDetails !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.translationDetails: object expected"); - message.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.fromObject(object.translationDetails); - } - if (object.id != null) - message.id = String(object.id); - if (object.type != null) - message.type = String(object.type); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "PENDING": - case 1: - message.state = 1; - break; - case "ORCHESTRATING": - case 2: - message.state = 2; - break; - case "RUNNING": - case 3: - message.state = 3; - break; - case "PAUSED": - case 4: - message.state = 4; - break; - case "SUCCEEDED": - case 5: - message.state = 5; - break; - case "FAILED": - case 6: - message.state = 6; - break; - } - if (object.processingError != null) { - if (typeof object.processingError !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.processingError: object expected"); - message.processingError = $root.google.rpc.ErrorInfo.fromObject(object.processingError); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.lastUpdateTime != null) { - if (typeof object.lastUpdateTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.lastUpdateTime: object expected"); - message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); - } - if (object.resourceErrorDetails) { - if (!Array.isArray(object.resourceErrorDetails)) - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.resourceErrorDetails: array expected"); - message.resourceErrorDetails = []; - for (var i = 0; i < object.resourceErrorDetails.length; ++i) { - if (typeof object.resourceErrorDetails[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.resourceErrorDetails: object expected"); - message.resourceErrorDetails[i] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.fromObject(object.resourceErrorDetails[i]); - } - } - if (object.resourceErrorCount != null) - message.resourceErrorCount = object.resourceErrorCount | 0; - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.metrics: object expected"); - message.metrics[i] = $root.google.cloud.bigquery.migration.v2.TimeSeries.fromObject(object.metrics[i]); - } - } - if (object.taskResult != null) { - if (typeof object.taskResult !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.taskResult: object expected"); - message.taskResult = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.fromObject(object.taskResult); - } - if (object.totalProcessingErrorCount != null) - message.totalProcessingErrorCount = object.totalProcessingErrorCount | 0; - if (object.totalResourceErrorCount != null) - message.totalResourceErrorCount = object.totalResourceErrorCount | 0; - return message; - }; - - /** - * Creates a plain object from a MigrationTask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @static - * @param {google.cloud.bigquery.migration.v2.MigrationTask} message MigrationTask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MigrationTask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.resourceErrorDetails = []; - object.metrics = []; - } - if (options.defaults) { - object.id = ""; - object.type = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.processingError = null; - object.createTime = null; - object.lastUpdateTime = null; - object.resourceErrorCount = 0; - object.taskResult = null; - object.totalProcessingErrorCount = 0; - object.totalResourceErrorCount = 0; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationTask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationTask.State[message.state] : message.state; - if (message.processingError != null && message.hasOwnProperty("processingError")) - object.processingError = $root.google.rpc.ErrorInfo.toObject(message.processingError, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) - object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); - if (message.assessmentTaskDetails != null && message.hasOwnProperty("assessmentTaskDetails")) { - object.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.toObject(message.assessmentTaskDetails, options); - if (options.oneofs) - object.taskDetails = "assessmentTaskDetails"; - } - if (message.translationConfigDetails != null && message.hasOwnProperty("translationConfigDetails")) { - object.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.toObject(message.translationConfigDetails, options); - if (options.oneofs) - object.taskDetails = "translationConfigDetails"; - } - if (message.translationDetails != null && message.hasOwnProperty("translationDetails")) { - object.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.toObject(message.translationDetails, options); - if (options.oneofs) - object.taskDetails = "translationDetails"; - } - if (message.resourceErrorDetails && message.resourceErrorDetails.length) { - object.resourceErrorDetails = []; - 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; - }; - - /** - * Converts this MigrationTask to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance - * @returns {Object.} JSON object - */ - MigrationTask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MigrationTask - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MigrationTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationTask"; - }; - - /** - * State enum. - * @name google.cloud.bigquery.migration.v2.MigrationTask.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} ORCHESTRATING=2 ORCHESTRATING value - * @property {number} RUNNING=3 RUNNING value - * @property {number} PAUSED=4 PAUSED value - * @property {number} SUCCEEDED=5 SUCCEEDED value - * @property {number} FAILED=6 FAILED value - */ - MigrationTask.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "ORCHESTRATING"] = 2; - values[valuesById[3] = "RUNNING"] = 3; - values[valuesById[4] = "PAUSED"] = 4; - values[valuesById[5] = "SUCCEEDED"] = 5; - values[valuesById[6] = "FAILED"] = 6; - return values; - })(); - - return MigrationTask; - })(); - - v2.MigrationSubtask = (function() { - - /** - * Properties of a MigrationSubtask. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IMigrationSubtask - * @property {string|null} [name] MigrationSubtask name - * @property {string|null} [taskId] MigrationSubtask taskId - * @property {string|null} [type] MigrationSubtask type - * @property {google.cloud.bigquery.migration.v2.MigrationSubtask.State|null} [state] MigrationSubtask state - * @property {google.rpc.IErrorInfo|null} [processingError] MigrationSubtask processingError - * @property {Array.|null} [resourceErrorDetails] MigrationSubtask resourceErrorDetails - * @property {number|null} [resourceErrorCount] MigrationSubtask resourceErrorCount - * @property {google.protobuf.ITimestamp|null} [createTime] MigrationSubtask createTime - * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationSubtask lastUpdateTime - * @property {Array.|null} [metrics] MigrationSubtask metrics - */ - - /** - * Constructs a new MigrationSubtask. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MigrationSubtask. - * @implements IMigrationSubtask - * @constructor - * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask=} [properties] Properties to set - */ - function MigrationSubtask(properties) { - this.resourceErrorDetails = []; - this.metrics = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MigrationSubtask name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.name = ""; - - /** - * MigrationSubtask taskId. - * @member {string} taskId - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.taskId = ""; - - /** - * MigrationSubtask type. - * @member {string} type - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.type = ""; - - /** - * MigrationSubtask state. - * @member {google.cloud.bigquery.migration.v2.MigrationSubtask.State} state - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.state = 0; - - /** - * MigrationSubtask processingError. - * @member {google.rpc.IErrorInfo|null|undefined} processingError - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.processingError = null; - - /** - * MigrationSubtask resourceErrorDetails. - * @member {Array.} resourceErrorDetails - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.resourceErrorDetails = $util.emptyArray; - - /** - * MigrationSubtask resourceErrorCount. - * @member {number} resourceErrorCount - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.resourceErrorCount = 0; - - /** - * MigrationSubtask createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.createTime = null; - - /** - * MigrationSubtask lastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.lastUpdateTime = null; - - /** - * MigrationSubtask metrics. - * @member {Array.} metrics - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.metrics = $util.emptyArray; - - /** - * Creates a new MigrationSubtask instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask instance - */ - MigrationSubtask.create = function create(properties) { - return new MigrationSubtask(properties); - }; - - /** - * Encodes the specified MigrationSubtask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask} message MigrationSubtask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationSubtask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.taskId != null && Object.hasOwnProperty.call(message, "taskId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.processingError != null && Object.hasOwnProperty.call(message, "processingError")) - $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.cloud.bigquery.migration.v2.TimeSeries.encode(message.metrics[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.resourceErrorDetails != null && message.resourceErrorDetails.length) - for (var i = 0; i < message.resourceErrorDetails.length; ++i) - $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.encode(message.resourceErrorDetails[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.resourceErrorCount != null && Object.hasOwnProperty.call(message, "resourceErrorCount")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.resourceErrorCount); - return writer; - }; - - /** - * Encodes the specified MigrationSubtask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask} message MigrationSubtask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationSubtask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MigrationSubtask message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationSubtask.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationSubtask(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.taskId = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 6: { - message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - if (!(message.resourceErrorDetails && message.resourceErrorDetails.length)) - message.resourceErrorDetails = []; - message.resourceErrorDetails.push($root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.decode(reader, reader.uint32())); - break; - } - case 13: { - message.resourceErrorCount = reader.int32(); - break; - } - case 7: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.cloud.bigquery.migration.v2.TimeSeries.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MigrationSubtask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationSubtask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MigrationSubtask message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MigrationSubtask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.taskId != null && message.hasOwnProperty("taskId")) - if (!$util.isString(message.taskId)) - return "taskId: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.processingError != null && message.hasOwnProperty("processingError")) { - var error = $root.google.rpc.ErrorInfo.verify(message.processingError); - if (error) - return "processingError." + error; - } - if (message.resourceErrorDetails != null && message.hasOwnProperty("resourceErrorDetails")) { - if (!Array.isArray(message.resourceErrorDetails)) - return "resourceErrorDetails: array expected"; - for (var i = 0; i < message.resourceErrorDetails.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify(message.resourceErrorDetails[i]); - if (error) - return "resourceErrorDetails." + error; - } - } - if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) - if (!$util.isInteger(message.resourceErrorCount)) - return "resourceErrorCount: integer expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); - if (error) - return "lastUpdateTime." + error; - } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.TimeSeries.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - return null; - }; - - /** - * Creates a MigrationSubtask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask - */ - MigrationSubtask.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationSubtask) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.MigrationSubtask(); - if (object.name != null) - message.name = String(object.name); - if (object.taskId != null) - message.taskId = String(object.taskId); - if (object.type != null) - message.type = String(object.type); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "SUCCEEDED": - case 3: - message.state = 3; - break; - case "FAILED": - case 4: - message.state = 4; - break; - case "PAUSED": - case 5: - message.state = 5; - break; - case "PENDING_DEPENDENCY": - case 6: - message.state = 6; - break; - } - if (object.processingError != null) { - if (typeof object.processingError !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.processingError: object expected"); - message.processingError = $root.google.rpc.ErrorInfo.fromObject(object.processingError); - } - if (object.resourceErrorDetails) { - if (!Array.isArray(object.resourceErrorDetails)) - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.resourceErrorDetails: array expected"); - message.resourceErrorDetails = []; - for (var i = 0; i < object.resourceErrorDetails.length; ++i) { - if (typeof object.resourceErrorDetails[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.resourceErrorDetails: object expected"); - message.resourceErrorDetails[i] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.fromObject(object.resourceErrorDetails[i]); - } - } - if (object.resourceErrorCount != null) - message.resourceErrorCount = object.resourceErrorCount | 0; - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.lastUpdateTime != null) { - if (typeof object.lastUpdateTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.lastUpdateTime: object expected"); - message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); - } - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.metrics: object expected"); - message.metrics[i] = $root.google.cloud.bigquery.migration.v2.TimeSeries.fromObject(object.metrics[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MigrationSubtask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @static - * @param {google.cloud.bigquery.migration.v2.MigrationSubtask} message MigrationSubtask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MigrationSubtask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.metrics = []; - object.resourceErrorDetails = []; - } - if (options.defaults) { - object.name = ""; - object.taskId = ""; - object.type = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.processingError = null; - object.createTime = null; - object.lastUpdateTime = null; - object.resourceErrorCount = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.taskId != null && message.hasOwnProperty("taskId")) - object.taskId = message.taskId; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationSubtask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationSubtask.State[message.state] : message.state; - if (message.processingError != null && message.hasOwnProperty("processingError")) - object.processingError = $root.google.rpc.ErrorInfo.toObject(message.processingError, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) - object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.cloud.bigquery.migration.v2.TimeSeries.toObject(message.metrics[j], options); - } - if (message.resourceErrorDetails && message.resourceErrorDetails.length) { - object.resourceErrorDetails = []; - for (var j = 0; j < message.resourceErrorDetails.length; ++j) - object.resourceErrorDetails[j] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.toObject(message.resourceErrorDetails[j], options); - } - if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) - object.resourceErrorCount = message.resourceErrorCount; - return object; - }; - - /** - * Converts this MigrationSubtask to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @instance - * @returns {Object.} JSON object - */ - MigrationSubtask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MigrationSubtask - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MigrationSubtask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationSubtask"; - }; - - /** - * State enum. - * @name google.cloud.bigquery.migration.v2.MigrationSubtask.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} RUNNING=2 RUNNING value - * @property {number} SUCCEEDED=3 SUCCEEDED value - * @property {number} FAILED=4 FAILED value - * @property {number} PAUSED=5 PAUSED value - * @property {number} PENDING_DEPENDENCY=6 PENDING_DEPENDENCY value - */ - MigrationSubtask.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "SUCCEEDED"] = 3; - values[valuesById[4] = "FAILED"] = 4; - values[valuesById[5] = "PAUSED"] = 5; - values[valuesById[6] = "PENDING_DEPENDENCY"] = 6; - return values; - })(); - - return MigrationSubtask; - })(); - - v2.MigrationTaskResult = (function() { - - /** - * Properties of a MigrationTaskResult. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IMigrationTaskResult - * @property {google.cloud.bigquery.migration.v2.ITranslationTaskResult|null} [translationTaskResult] MigrationTaskResult translationTaskResult - */ - - /** - * Constructs a new MigrationTaskResult. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MigrationTaskResult. - * @implements IMigrationTaskResult - * @constructor - * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult=} [properties] Properties to set - */ - function MigrationTaskResult(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]]; - } - - /** - * MigrationTaskResult translationTaskResult. - * @member {google.cloud.bigquery.migration.v2.ITranslationTaskResult|null|undefined} translationTaskResult - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult - * @instance - */ - MigrationTaskResult.prototype.translationTaskResult = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MigrationTaskResult details. - * @member {"translationTaskResult"|undefined} details - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult - * @instance - */ - Object.defineProperty(MigrationTaskResult.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["translationTaskResult"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MigrationTaskResult instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult - * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult instance - */ - MigrationTaskResult.create = function create(properties) { - return new MigrationTaskResult(properties); - }; - - /** - * 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.MigrationTaskResult - * @static - * @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 - */ - MigrationTaskResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.translationTaskResult != null && Object.hasOwnProperty.call(message, "translationTaskResult")) - $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.encode(message.translationTaskResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * 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.MigrationTaskResult - * @static - * @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 - */ - MigrationTaskResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MigrationTaskResult message from the specified reader or buffer. - * @function decode - * @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.MigrationTaskResult} MigrationTaskResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationTaskResult.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationTaskResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MigrationTaskResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationTaskResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MigrationTaskResult message. - * @function verify - * @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 - */ - MigrationTaskResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.translationTaskResult != null && message.hasOwnProperty("translationTaskResult")) { - properties.details = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.verify(message.translationTaskResult); - if (error) - return "translationTaskResult." + error; - } - } - return null; - }; - - /** - * Creates a MigrationTaskResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult - */ - 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.MigrationTaskResult(); - if (object.translationTaskResult != null) { - if (typeof object.translationTaskResult !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTaskResult.translationTaskResult: object expected"); - message.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.fromObject(object.translationTaskResult); - } - return message; - }; - - /** - * Creates a plain object from a MigrationTaskResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult - * @static - * @param {google.cloud.bigquery.migration.v2.MigrationTaskResult} message MigrationTaskResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MigrationTaskResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.translationTaskResult != null && message.hasOwnProperty("translationTaskResult")) { - object.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.toObject(message.translationTaskResult, options); - if (options.oneofs) - object.details = "translationTaskResult"; - } - return object; - }; - - /** - * Converts this MigrationTaskResult to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult - * @instance - * @returns {Object.} JSON object - */ - MigrationTaskResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MigrationTaskResult - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MigrationTaskResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationTaskResult"; - }; - - return MigrationTaskResult; - })(); - - v2.TranslationTaskResult = (function() { - - /** - * Properties of a TranslationTaskResult. - * @memberof google.cloud.bigquery.migration.v2 - * @interface ITranslationTaskResult - * @property {Array.|null} [translatedLiterals] TranslationTaskResult translatedLiterals - * @property {Array.|null} [reportLogMessages] TranslationTaskResult reportLogMessages - * @property {string|null} [consoleUri] TranslationTaskResult consoleUri - */ - - /** - * Constructs a new TranslationTaskResult. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TranslationTaskResult. - * @implements ITranslationTaskResult - * @constructor - * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult=} [properties] Properties to set - */ - 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) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TranslationTaskResult translatedLiterals. - * @member {Array.} translatedLiterals - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult - * @instance - */ - TranslationTaskResult.prototype.translatedLiterals = $util.emptyArray; - - /** - * TranslationTaskResult reportLogMessages. - * @member {Array.} reportLogMessages - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult - * @instance - */ - TranslationTaskResult.prototype.reportLogMessages = $util.emptyArray; - - /** - * TranslationTaskResult consoleUri. - * @member {string} consoleUri - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult - * @instance - */ - TranslationTaskResult.prototype.consoleUri = ""; - - /** - * Creates a new TranslationTaskResult instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult - * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult instance - */ - TranslationTaskResult.create = function create(properties) { - return new TranslationTaskResult(properties); - }; - - /** - * 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.TranslationTaskResult - * @static - * @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 - */ - TranslationTaskResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.translatedLiterals != null && message.translatedLiterals.length) - for (var i = 0; i < message.translatedLiterals.length; ++i) - $root.google.cloud.bigquery.migration.v2.Literal.encode(message.translatedLiterals[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.reportLogMessages != null && message.reportLogMessages.length) - for (var i = 0; i < message.reportLogMessages.length; ++i) - $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.encode(message.reportLogMessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.consoleUri != null && Object.hasOwnProperty.call(message, "consoleUri")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.consoleUri); - return writer; - }; - - /** - * 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.TranslationTaskResult - * @static - * @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 - */ - TranslationTaskResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TranslationTaskResult message from the specified reader or buffer. - * @function decode - * @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.TranslationTaskResult} TranslationTaskResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranslationTaskResult.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationTaskResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.translatedLiterals && message.translatedLiterals.length)) - message.translatedLiterals = []; - message.translatedLiterals.push($root.google.cloud.bigquery.migration.v2.Literal.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.reportLogMessages && message.reportLogMessages.length)) - message.reportLogMessages = []; - message.reportLogMessages.push($root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.decode(reader, reader.uint32())); - break; - } - case 3: { - message.consoleUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TranslationTaskResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.TranslationTaskResult} TranslationTaskResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranslationTaskResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TranslationTaskResult message. - * @function verify - * @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 - */ - TranslationTaskResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.translatedLiterals != null && message.hasOwnProperty("translatedLiterals")) { - if (!Array.isArray(message.translatedLiterals)) - return "translatedLiterals: array expected"; - for (var i = 0; i < message.translatedLiterals.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.Literal.verify(message.translatedLiterals[i]); - if (error) - return "translatedLiterals." + error; - } - } - if (message.reportLogMessages != null && message.hasOwnProperty("reportLogMessages")) { - if (!Array.isArray(message.reportLogMessages)) - return "reportLogMessages: array expected"; - for (var i = 0; i < message.reportLogMessages.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.verify(message.reportLogMessages[i]); - if (error) - return "reportLogMessages." + error; - } - } - if (message.consoleUri != null && message.hasOwnProperty("consoleUri")) - if (!$util.isString(message.consoleUri)) - return "consoleUri: string expected"; - return null; - }; - - /** - * Creates a TranslationTaskResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult - */ - 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.TranslationTaskResult(); - if (object.translatedLiterals) { - if (!Array.isArray(object.translatedLiterals)) - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.translatedLiterals: array expected"); - message.translatedLiterals = []; - for (var i = 0; i < object.translatedLiterals.length; ++i) { - if (typeof object.translatedLiterals[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.translatedLiterals: object expected"); - message.translatedLiterals[i] = $root.google.cloud.bigquery.migration.v2.Literal.fromObject(object.translatedLiterals[i]); - } - } - if (object.reportLogMessages) { - if (!Array.isArray(object.reportLogMessages)) - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.reportLogMessages: array expected"); - message.reportLogMessages = []; - for (var i = 0; i < object.reportLogMessages.length; ++i) { - if (typeof object.reportLogMessages[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.reportLogMessages: object expected"); - message.reportLogMessages[i] = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.fromObject(object.reportLogMessages[i]); - } - } - if (object.consoleUri != null) - message.consoleUri = String(object.consoleUri); - return message; - }; - - /** - * Creates a plain object from a TranslationTaskResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult - * @static - * @param {google.cloud.bigquery.migration.v2.TranslationTaskResult} message TranslationTaskResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TranslationTaskResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.translatedLiterals = []; - object.reportLogMessages = []; - } - if (options.defaults) - object.consoleUri = ""; - if (message.translatedLiterals && message.translatedLiterals.length) { - object.translatedLiterals = []; - for (var j = 0; j < message.translatedLiterals.length; ++j) - object.translatedLiterals[j] = $root.google.cloud.bigquery.migration.v2.Literal.toObject(message.translatedLiterals[j], options); - } - if (message.reportLogMessages && message.reportLogMessages.length) { - object.reportLogMessages = []; - for (var j = 0; j < message.reportLogMessages.length; ++j) - object.reportLogMessages[j] = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.toObject(message.reportLogMessages[j], options); - } - if (message.consoleUri != null && message.hasOwnProperty("consoleUri")) - object.consoleUri = message.consoleUri; - return object; - }; - - /** - * Converts this TranslationTaskResult to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult - * @instance - * @returns {Object.} JSON object - */ - TranslationTaskResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TranslationTaskResult - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TranslationTaskResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TranslationTaskResult"; - }; - - return TranslationTaskResult; - })(); - - v2.ResourceErrorDetail = (function() { - - /** - * Properties of a ResourceErrorDetail. - * @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 - */ - - /** - * Constructs a new ResourceErrorDetail. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a ResourceErrorDetail. - * @implements IResourceErrorDetail - * @constructor - * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail=} [properties] Properties to set - */ - function ResourceErrorDetail(properties) { - this.errorDetails = []; - 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]]; - } - - /** - * ResourceErrorDetail resourceInfo. - * @member {google.rpc.IResourceInfo|null|undefined} resourceInfo - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail - * @instance - */ - ResourceErrorDetail.prototype.resourceInfo = null; - - /** - * ResourceErrorDetail errorDetails. - * @member {Array.} errorDetails - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail - * @instance - */ - ResourceErrorDetail.prototype.errorDetails = $util.emptyArray; - - /** - * 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.ResourceErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail instance - */ - ResourceErrorDetail.create = function create(properties) { - return new ResourceErrorDetail(properties); - }; - - /** - * 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.ResourceErrorDetail - * @static - * @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 - */ - ResourceErrorDetail.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); - return writer; - }; - - /** - * 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.ResourceErrorDetail - * @static - * @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 - */ - ResourceErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceErrorDetail message from the specified reader or buffer. - * @function decode - * @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.ResourceErrorDetail} ResourceErrorDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceErrorDetail.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.resourceInfo = $root.google.rpc.ResourceInfo.decode(reader, reader.uint32()); - 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(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceErrorDetail message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.ResourceErrorDetail} ResourceErrorDetail - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceErrorDetail message. - * @function verify - * @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 - */ - ResourceErrorDetail.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]); - 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.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 a ResourceErrorDetail message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2.ResourceErrorDetail} message ResourceErrorDetail - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceErrorDetail.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.errorCount != null && message.hasOwnProperty("errorCount")) - object.errorCount = message.errorCount; - return object; - }; - - /** - * Converts this ResourceErrorDetail to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail - * @instance - * @returns {Object.} JSON object - */ - ResourceErrorDetail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceErrorDetail - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ResourceErrorDetail"; - }; - - return ResourceErrorDetail; - })(); - - v2.ErrorDetail = (function() { - - /** - * Properties of an ErrorDetail. - * @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 - */ - - /** - * Constructs a new ErrorDetail. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an ErrorDetail. - * @implements IErrorDetail - * @constructor - * @param {google.cloud.bigquery.migration.v2.IErrorDetail=} [properties] Properties to set - */ - function ErrorDetail(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ErrorDetail location. - * @member {google.cloud.bigquery.migration.v2.IErrorLocation|null|undefined} location - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail - * @instance - */ - ErrorDetail.prototype.location = null; - - /** - * ErrorDetail errorInfo. - * @member {google.rpc.IErrorInfo|null|undefined} errorInfo - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail - * @instance - */ - ErrorDetail.prototype.errorInfo = null; - - /** - * Creates a new ErrorDetail instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2.IErrorDetail=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail instance - */ - ErrorDetail.create = function create(properties) { - return new ErrorDetail(properties); - }; - - /** - * Encodes the specified ErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2.IErrorDetail} message ErrorDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ErrorDetail.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - $root.google.cloud.bigquery.migration.v2.ErrorLocation.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.errorInfo != null && Object.hasOwnProperty.call(message, "errorInfo")) - $root.google.rpc.ErrorInfo.encode(message.errorInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2.IErrorDetail} message ErrorDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ErrorDetail message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ErrorDetail.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ErrorDetail(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.decode(reader, reader.uint32()); - break; - } - case 2: { - message.errorInfo = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ErrorDetail message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ErrorDetail.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ErrorDetail message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ErrorDetail.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - var error = $root.google.cloud.bigquery.migration.v2.ErrorLocation.verify(message.location); - if (error) - return "location." + error; - } - if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) { - var error = $root.google.rpc.ErrorInfo.verify(message.errorInfo); - if (error) - return "errorInfo." + error; - } - return null; - }; - - /** - * Creates an ErrorDetail message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail - */ - ErrorDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ErrorDetail) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.ErrorDetail(); - if (object.location != null) { - if (typeof object.location !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ErrorDetail.location: object expected"); - message.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.fromObject(object.location); - } - if (object.errorInfo != null) { - if (typeof object.errorInfo !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ErrorDetail.errorInfo: object expected"); - message.errorInfo = $root.google.rpc.ErrorInfo.fromObject(object.errorInfo); - } - return message; - }; - - /** - * Creates a plain object from an ErrorDetail message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2.ErrorDetail} message ErrorDetail - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ErrorDetail.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.location = null; - object.errorInfo = null; - } - if (message.location != null && message.hasOwnProperty("location")) - object.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.toObject(message.location, options); - if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) - object.errorInfo = $root.google.rpc.ErrorInfo.toObject(message.errorInfo, options); - return object; - }; - - /** - * Converts this ErrorDetail to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail - * @instance - * @returns {Object.} JSON object - */ - ErrorDetail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ErrorDetail - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ErrorDetail"; - }; - - return ErrorDetail; - })(); - - v2.ErrorLocation = (function() { - - /** - * Properties of an ErrorLocation. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IErrorLocation - * @property {number|null} [line] ErrorLocation line - * @property {number|null} [column] ErrorLocation column - */ - - /** - * Constructs a new ErrorLocation. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an ErrorLocation. - * @implements IErrorLocation - * @constructor - * @param {google.cloud.bigquery.migration.v2.IErrorLocation=} [properties] Properties to set - */ - function ErrorLocation(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]]; - } - - /** - * ErrorLocation line. - * @member {number} line - * @memberof google.cloud.bigquery.migration.v2.ErrorLocation - * @instance - */ - ErrorLocation.prototype.line = 0; - - /** - * ErrorLocation column. - * @member {number} column - * @memberof google.cloud.bigquery.migration.v2.ErrorLocation - * @instance - */ - ErrorLocation.prototype.column = 0; - - /** - * Creates a new ErrorLocation instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.ErrorLocation - * @static - * @param {google.cloud.bigquery.migration.v2.IErrorLocation=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ErrorLocation} ErrorLocation instance - */ - ErrorLocation.create = function create(properties) { - return new ErrorLocation(properties); - }; - - /** - * 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.ErrorLocation - * @static - * @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 - */ - ErrorLocation.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); - return writer; - }; - - /** - * 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.ErrorLocation - * @static - * @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 - */ - ErrorLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ErrorLocation message from the specified reader or buffer. - * @function decode - * @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.ErrorLocation} ErrorLocation - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ErrorLocation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.line = reader.int32(); - break; - } - case 2: { - message.column = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ErrorLocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.ErrorLocation} ErrorLocation - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ErrorLocation message. - * @function verify - * @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 - */ - ErrorLocation.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) - 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; - return message; - }; - - /** - * Creates a plain object from an ErrorLocation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ErrorLocation - * @static - * @param {google.cloud.bigquery.migration.v2.ErrorLocation} message ErrorLocation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ErrorLocation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.line = 0; - object.column = 0; - } - 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 ErrorLocation to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ErrorLocation - * @instance - * @returns {Object.} JSON object - */ - ErrorLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ErrorLocation - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ErrorLocation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ErrorLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ErrorLocation"; - }; - - return ErrorLocation; - })(); - - v2.TimeSeries = (function() { - - /** - * Properties of a TimeSeries. - * @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 - */ - - /** - * Constructs a new TimeSeries. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TimeSeries. - * @implements ITimeSeries - * @constructor - * @param {google.cloud.bigquery.migration.v2.ITimeSeries=} [properties] Properties to set - */ - function TimeSeries(properties) { - this.points = []; - 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]]; - } - - /** - * 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 - * @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.TimeSeries - * @static - * @param {google.cloud.bigquery.migration.v2.ITimeSeries=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.TimeSeries} TimeSeries instance - */ - TimeSeries.create = function create(properties) { - return new TimeSeries(properties); - }; - - /** - * 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.TimeSeries - * @static - * @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 - */ - TimeSeries.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(); - return writer; - }; - - /** - * 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.TimeSeries - * @static - * @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 - */ - TimeSeries.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TimeSeries message from the specified reader or buffer. - * @function decode - * @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.TimeSeries} TimeSeries - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TimeSeries(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.metric = reader.string(); - 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())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TimeSeries message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.TimeSeries} TimeSeries - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TimeSeries message. - * @function verify - * @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 - */ - TimeSeries.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; - } - } - return null; - }; - - /** - * Creates a TimeSeries message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.TimeSeries - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TimeSeries} TimeSeries - */ - 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.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; - } - 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 TimeSeries message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.TimeSeries - * @static - * @param {google.cloud.bigquery.migration.v2.TimeSeries} message TimeSeries - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimeSeries.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); - } - return object; - }; - - /** - * Converts this TimeSeries to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TimeSeries - * @instance - * @returns {Object.} JSON object - */ - TimeSeries.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TimeSeries - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TimeSeries - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TimeSeries.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TimeSeries"; - }; - - return TimeSeries; - })(); - - v2.Point = (function() { - - /** - * Properties of a Point. - * @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 - */ - - /** - * Constructs a new Point. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a Point. - * @implements IPoint - * @constructor - * @param {google.cloud.bigquery.migration.v2.IPoint=} [properties] Properties to set - */ - function Point(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]]; - } - - /** - * Point interval. - * @member {google.cloud.bigquery.migration.v2.ITimeInterval|null|undefined} interval - * @memberof google.cloud.bigquery.migration.v2.Point - * @instance - */ - Point.prototype.interval = null; - - /** - * Point value. - * @member {google.cloud.bigquery.migration.v2.ITypedValue|null|undefined} value - * @memberof google.cloud.bigquery.migration.v2.Point - * @instance - */ - Point.prototype.value = null; - - /** - * Creates a new Point instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.Point - * @static - * @param {google.cloud.bigquery.migration.v2.IPoint=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.Point} Point instance - */ - Point.create = function create(properties) { - return new Point(properties); - }; - - /** - * 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.Point - * @static - * @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 - */ - Point.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(); - return writer; - }; - - /** - * 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.Point - * @static - * @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 - */ - Point.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Point message from the specified reader or buffer. - * @function decode - * @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.Point} Point - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.Point(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.interval = $root.google.cloud.bigquery.migration.v2.TimeInterval.decode(reader, reader.uint32()); - break; - } - case 2: { - message.value = $root.google.cloud.bigquery.migration.v2.TypedValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Point message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.Point} Point - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Point message. - * @function verify - * @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 - */ - Point.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; - } - return null; - }; - - /** - * Creates a Point message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.Point - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.Point} Point - */ - 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.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 Point message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.Point - * @static - * @param {google.cloud.bigquery.migration.v2.Point} message Point - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Point.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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 Point to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.Point - * @instance - * @returns {Object.} JSON object - */ - Point.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Point - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.Point - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Point.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.Point"; - }; - - return Point; - })(); - - v2.TimeInterval = (function() { - - /** - * Properties of a TimeInterval. - * @memberof google.cloud.bigquery.migration.v2 - * @interface ITimeInterval - * @property {google.protobuf.ITimestamp|null} [startTime] TimeInterval startTime - * @property {google.protobuf.ITimestamp|null} [endTime] TimeInterval endTime - */ - - /** - * Constructs a new TimeInterval. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TimeInterval. - * @implements ITimeInterval - * @constructor - * @param {google.cloud.bigquery.migration.v2.ITimeInterval=} [properties] Properties to set - */ - function TimeInterval(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]]; - } - - /** - * TimeInterval startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.bigquery.migration.v2.TimeInterval - * @instance - */ - TimeInterval.prototype.startTime = null; - - /** - * TimeInterval endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.bigquery.migration.v2.TimeInterval - * @instance - */ - TimeInterval.prototype.endTime = null; - - /** - * 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 - */ - TimeInterval.create = function create(properties) { - return new TimeInterval(properties); - }; - - /** - * 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 - */ - 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; - }; - - /** - * 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.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 - */ - TimeInterval.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TimeInterval message from the specified reader or buffer. - * @function decode - * @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.TimeInterval} TimeInterval - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TimeInterval(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TimeInterval message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.TimeInterval} TimeInterval - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TimeInterval message. - * @function verify - * @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 - */ - TimeInterval.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; - } - return null; - }; - - /** - * Creates a TimeInterval message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.TimeInterval - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TimeInterval} TimeInterval - */ - 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.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.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); - } - return message; - }; - - /** - * Creates a plain object from a TimeInterval message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.TimeInterval - * @static - * @param {google.cloud.bigquery.migration.v2.TimeInterval} message TimeInterval - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimeInterval.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startTime = null; - object.endTime = null; - } - 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. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TimeInterval - * @instance - * @returns {Object.} JSON object - */ - TimeInterval.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TimeInterval - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TimeInterval - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TimeInterval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TimeInterval"; - }; - - return TimeInterval; - })(); - - v2.TypedValue = (function() { - - /** - * Properties of a TypedValue. - * @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 - */ - - /** - * Constructs a new TypedValue. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TypedValue. - * @implements ITypedValue - * @constructor - * @param {google.cloud.bigquery.migration.v2.ITypedValue=} [properties] Properties to set - */ - function TypedValue(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]]; - } - - /** - * 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 - * @instance - */ - TypedValue.prototype.distributionValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TypedValue value. - * @member {"boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"|undefined} value - * @memberof google.cloud.bigquery.migration.v2.TypedValue - * @instance - */ - Object.defineProperty(TypedValue.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["boolValue", "int64Value", "doubleValue", "stringValue", "distributionValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TypedValue instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.TypedValue - * @static - * @param {google.cloud.bigquery.migration.v2.ITypedValue=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.TypedValue} TypedValue instance - */ - TypedValue.create = function create(properties) { - return new TypedValue(properties); - }; - - /** - * 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.TypedValue - * @static - * @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 - */ - TypedValue.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(); - return writer; - }; - - /** - * 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.TypedValue - * @static - * @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 - */ - TypedValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TypedValue message from the specified reader or buffer. - * @function decode - * @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.TypedValue} TypedValue - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TypedValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.boolValue = reader.bool(); - 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()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TypedValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.TypedValue} TypedValue - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TypedValue message. - * @function verify - * @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 - */ - TypedValue.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.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; - } - } - 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); - } - 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.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"; - } - 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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.Dialect(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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; - { - var error = $root.google.cloud.bigquery.migration.v2.SQLServerDialect.verify(message.sqlServerDialect); - if (error) - 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.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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.BigQueryDialect(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BigQueryDialect message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BigQueryDialect.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BigQueryDialect message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BigQueryDialect.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a BigQueryDialect message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect - */ - BigQueryDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.BigQueryDialect) - return object; - return new $root.google.cloud.bigquery.migration.v2.BigQueryDialect(); - }; - - /** - * Creates a plain object from a BigQueryDialect message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect - * @static - * @param {google.cloud.bigquery.migration.v2.BigQueryDialect} message BigQueryDialect - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BigQueryDialect.toObject = function toObject() { - return {}; - }; - - /** - * Converts this BigQueryDialect to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect - * @instance - * @returns {Object.} JSON object - */ - BigQueryDialect.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BigQueryDialect - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BigQueryDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.BigQueryDialect"; - }; - - return BigQueryDialect; - })(); - - v2.HiveQLDialect = (function() { - - /** - * Properties of a HiveQLDialect. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IHiveQLDialect - */ - - /** - * Constructs a new HiveQLDialect. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a HiveQLDialect. - * @implements IHiveQLDialect - * @constructor - * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect=} [properties] Properties to set - */ - function HiveQLDialect(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new HiveQLDialect instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect - * @static - * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect instance - */ - HiveQLDialect.create = function create(properties) { - return new HiveQLDialect(properties); - }; - - /** - * Encodes the specified HiveQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect - * @static - * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect} message HiveQLDialect message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HiveQLDialect.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified HiveQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect - * @static - * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect} message HiveQLDialect message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HiveQLDialect.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HiveQLDialect message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HiveQLDialect.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.HiveQLDialect(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HiveQLDialect message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HiveQLDialect.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HiveQLDialect message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HiveQLDialect.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a HiveQLDialect message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect - */ - HiveQLDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.HiveQLDialect) - return object; - return new $root.google.cloud.bigquery.migration.v2.HiveQLDialect(); - }; - - /** - * Creates a plain object from a HiveQLDialect message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.RedshiftDialect(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a 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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TeradataDialect(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.mode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - 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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.OracleDialect(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SparkSQLDialect(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a 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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SnowflakeDialect(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a 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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.NetezzaDialect(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a 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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - 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"; - } - 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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.VerticaDialect(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a 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 VerticaDialect message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect - */ - VerticaDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.VerticaDialect) - return object; - return new $root.google.cloud.bigquery.migration.v2.VerticaDialect(); - }; - - /** - * Creates a plain object from a VerticaDialect message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect - * @static - * @param {google.cloud.bigquery.migration.v2.VerticaDialect} message VerticaDialect - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VerticaDialect.toObject = function toObject() { - return {}; - }; - - /** - * Converts this VerticaDialect to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect - * @instance - * @returns {Object.} JSON object - */ - VerticaDialect.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VerticaDialect - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VerticaDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.VerticaDialect"; - }; - - return VerticaDialect; - })(); - - v2.SQLServerDialect = (function() { - - /** - * Properties of a SQLServerDialect. - * @memberof google.cloud.bigquery.migration.v2 - * @interface ISQLServerDialect - */ - - /** - * Constructs a new SQLServerDialect. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SQLServerDialect. - * @implements ISQLServerDialect - * @constructor - * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect=} [properties] Properties to set - */ - function SQLServerDialect(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 SQLServerDialect instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect - * @static - * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect instance - */ - SQLServerDialect.create = function create(properties) { - return new SQLServerDialect(properties); - }; - - /** - * 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.SQLServerDialect - * @static - * @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 - */ - SQLServerDialect.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified SQLServerDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLServerDialect.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect - * @static - * @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 - */ - SQLServerDialect.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SQLServerDialect message from the specified reader or buffer. - * @function decode - * @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.SQLServerDialect} SQLServerDialect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SQLServerDialect.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SQLServerDialect message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.SQLServerDialect} SQLServerDialect - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SQLServerDialect message. - * @function verify - * @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 - */ - SQLServerDialect.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SQLServerDialect message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect - */ - 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.SQLServerDialect(); - }; - - /** - * Creates a plain object from a SQLServerDialect message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect - * @static - * @param {google.cloud.bigquery.migration.v2.SQLServerDialect} message SQLServerDialect - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SQLServerDialect.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SQLServerDialect to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect - * @instance - * @returns {Object.} JSON object - */ - SQLServerDialect.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SQLServerDialect - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SQLServerDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SQLServerDialect"; - }; - - return SQLServerDialect; - })(); - - v2.PostgresqlDialect = (function() { - - /** - * Properties of a PostgresqlDialect. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IPostgresqlDialect - */ - - /** - * Constructs a new PostgresqlDialect. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a PostgresqlDialect. - * @implements IPostgresqlDialect - * @constructor - * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect=} [properties] Properties to set - */ - function PostgresqlDialect(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 PostgresqlDialect instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect - * @static - * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect instance - */ - PostgresqlDialect.create = function create(properties) { - return new PostgresqlDialect(properties); - }; - - /** - * 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.PostgresqlDialect - * @static - * @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 - */ - PostgresqlDialect.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified PostgresqlDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PostgresqlDialect.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect - * @static - * @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 - */ - PostgresqlDialect.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PostgresqlDialect message from the specified reader or buffer. - * @function decode - * @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.PostgresqlDialect} PostgresqlDialect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PostgresqlDialect.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PostgresqlDialect message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.PostgresqlDialect} PostgresqlDialect - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PostgresqlDialect message. - * @function verify - * @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 - */ - PostgresqlDialect.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a PostgresqlDialect message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect - */ - 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.PostgresqlDialect(); - }; - - /** - * Creates a plain object from a PostgresqlDialect message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect - * @static - * @param {google.cloud.bigquery.migration.v2.PostgresqlDialect} message PostgresqlDialect - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PostgresqlDialect.toObject = function toObject() { - return {}; - }; - - /** - * Converts this PostgresqlDialect to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect - * @instance - * @returns {Object.} JSON object - */ - PostgresqlDialect.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PostgresqlDialect - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PostgresqlDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.PostgresqlDialect"; - }; - - return PostgresqlDialect; - })(); - - v2.PrestoDialect = (function() { - - /** - * Properties of a PrestoDialect. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IPrestoDialect - */ - - /** - * Constructs a new PrestoDialect. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a PrestoDialect. - * @implements IPrestoDialect - * @constructor - * @param {google.cloud.bigquery.migration.v2.IPrestoDialect=} [properties] Properties to set - */ - function PrestoDialect(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 PrestoDialect instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect - * @static - * @param {google.cloud.bigquery.migration.v2.IPrestoDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect instance - */ - PrestoDialect.create = function create(properties) { - return new PrestoDialect(properties); - }; - - /** - * 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.PrestoDialect - * @static - * @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 - */ - PrestoDialect.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified PrestoDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PrestoDialect.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect - * @static - * @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 - */ - PrestoDialect.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PrestoDialect message from the specified reader or buffer. - * @function decode - * @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.PrestoDialect} PrestoDialect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PrestoDialect.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PrestoDialect message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.PrestoDialect} PrestoDialect - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PrestoDialect message. - * @function verify - * @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 - */ - PrestoDialect.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a PrestoDialect message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect - */ - 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.PrestoDialect(); - }; - - /** - * Creates a plain object from a PrestoDialect message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect - * @static - * @param {google.cloud.bigquery.migration.v2.PrestoDialect} message PrestoDialect - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PrestoDialect.toObject = function toObject() { - return {}; - }; - - /** - * Converts this PrestoDialect to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect - * @instance - * @returns {Object.} JSON object - */ - PrestoDialect.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PrestoDialect - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PrestoDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.PrestoDialect"; - }; - - return PrestoDialect; - })(); - - v2.MySQLDialect = (function() { - - /** - * Properties of a MySQLDialect. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IMySQLDialect - */ - - /** - * Constructs a new MySQLDialect. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MySQLDialect. - * @implements IMySQLDialect - * @constructor - * @param {google.cloud.bigquery.migration.v2.IMySQLDialect=} [properties] Properties to set - */ - function MySQLDialect(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 MySQLDialect instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect - * @static - * @param {google.cloud.bigquery.migration.v2.IMySQLDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect instance - */ - MySQLDialect.create = function create(properties) { - return new MySQLDialect(properties); - }; - - /** - * 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.MySQLDialect - * @static - * @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 - */ - MySQLDialect.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified MySQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MySQLDialect.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect - * @static - * @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 - */ - MySQLDialect.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MySQLDialect message from the specified reader or buffer. - * @function decode - * @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.MySQLDialect} MySQLDialect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MySQLDialect.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MySQLDialect message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.MySQLDialect} MySQLDialect - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MySQLDialect message. - * @function verify - * @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 - */ - MySQLDialect.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a MySQLDialect message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect - */ - MySQLDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.MySQLDialect) - return object; - return new $root.google.cloud.bigquery.migration.v2.MySQLDialect(); - }; - - /** - * Creates a plain object from a MySQLDialect message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect - * @static - * @param {google.cloud.bigquery.migration.v2.MySQLDialect} message MySQLDialect - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MySQLDialect.toObject = function toObject() { - return {}; - }; - - /** - * Converts this MySQLDialect to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect - * @instance - * @returns {Object.} JSON object - */ - MySQLDialect.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MySQLDialect - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MySQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MySQLDialect"; - }; - - return MySQLDialect; - })(); - - v2.DB2Dialect = (function() { - - /** - * Properties of a DB2Dialect. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IDB2Dialect - */ - - /** - * Constructs a new DB2Dialect. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a DB2Dialect. - * @implements IDB2Dialect - * @constructor - * @param {google.cloud.bigquery.migration.v2.IDB2Dialect=} [properties] Properties to set - */ - function DB2Dialect(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 DB2Dialect instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect - * @static - * @param {google.cloud.bigquery.migration.v2.IDB2Dialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect instance - */ - DB2Dialect.create = function create(properties) { - return new DB2Dialect(properties); - }; - - /** - * 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.DB2Dialect - * @static - * @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 - */ - DB2Dialect.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified DB2Dialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.DB2Dialect.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect - * @static - * @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 - */ - DB2Dialect.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DB2Dialect message from the specified reader or buffer. - * @function decode - * @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.DB2Dialect} DB2Dialect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DB2Dialect.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.DB2Dialect(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DB2Dialect message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.DB2Dialect} DB2Dialect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DB2Dialect.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DB2Dialect message. - * @function verify - * @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 - */ - DB2Dialect.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a DB2Dialect message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect - */ - 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.DB2Dialect(); - }; - - /** - * Creates a plain object from a DB2Dialect message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect - * @static - * @param {google.cloud.bigquery.migration.v2.DB2Dialect} message DB2Dialect - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DB2Dialect.toObject = function toObject() { - return {}; - }; - - /** - * Converts this DB2Dialect to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect - * @instance - * @returns {Object.} JSON object - */ - DB2Dialect.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DB2Dialect - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DB2Dialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.DB2Dialect"; - }; - - return DB2Dialect; - })(); - - v2.SQLiteDialect = (function() { - - /** - * Properties of a SQLiteDialect. - * @memberof google.cloud.bigquery.migration.v2 - * @interface ISQLiteDialect - */ - - /** - * Constructs a new SQLiteDialect. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SQLiteDialect. - * @implements ISQLiteDialect - * @constructor - * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect=} [properties] Properties to set - */ - function SQLiteDialect(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 SQLiteDialect instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect - * @static - * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect instance - */ - SQLiteDialect.create = function create(properties) { - return new SQLiteDialect(properties); - }; - - /** - * 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.SQLiteDialect - * @static - * @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 - */ - SQLiteDialect.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * 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.SQLiteDialect - * @static - * @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 - */ - SQLiteDialect.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SQLiteDialect message from the specified reader or buffer. - * @function decode - * @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.SQLiteDialect} SQLiteDialect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SQLiteDialect.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SQLiteDialect(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SQLiteDialect message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.SQLiteDialect} SQLiteDialect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SQLiteDialect.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SQLiteDialect message. - * @function verify - * @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 - */ - SQLiteDialect.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a SQLiteDialect message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect - */ - 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.SQLiteDialect(); - }; - - /** - * Creates a plain object from a SQLiteDialect message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect - * @static - * @param {google.cloud.bigquery.migration.v2.SQLiteDialect} message SQLiteDialect - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SQLiteDialect.toObject = function toObject() { - return {}; - }; - - /** - * Converts this SQLiteDialect to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect - * @instance - * @returns {Object.} JSON object - */ - SQLiteDialect.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SQLiteDialect - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SQLiteDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SQLiteDialect"; - }; - - return SQLiteDialect; - })(); - - v2.GreenplumDialect = (function() { - - /** - * Properties of a GreenplumDialect. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IGreenplumDialect - */ - - /** - * Constructs a new GreenplumDialect. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a GreenplumDialect. - * @implements IGreenplumDialect - * @constructor - * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect=} [properties] Properties to set - */ - function GreenplumDialect(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Creates a new GreenplumDialect instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect - * @static - * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect instance - */ - GreenplumDialect.create = function create(properties) { - return new GreenplumDialect(properties); - }; - - /** - * 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.GreenplumDialect - * @static - * @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 - */ - GreenplumDialect.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * 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.GreenplumDialect - * @static - * @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 - */ - GreenplumDialect.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GreenplumDialect message from the specified reader or buffer. - * @function decode - * @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.GreenplumDialect} GreenplumDialect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GreenplumDialect.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.GreenplumDialect(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GreenplumDialect message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.GreenplumDialect} GreenplumDialect - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GreenplumDialect.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GreenplumDialect message. - * @function verify - * @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 - */ - GreenplumDialect.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a GreenplumDialect message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect - */ - 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.GreenplumDialect(); - }; - - /** - * Creates a plain object from a GreenplumDialect message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect - * @static - * @param {google.cloud.bigquery.migration.v2.GreenplumDialect} message GreenplumDialect - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GreenplumDialect.toObject = function toObject() { - return {}; - }; - - /** - * Converts this GreenplumDialect to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect - * @instance - * @returns {Object.} JSON object - */ - GreenplumDialect.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GreenplumDialect - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GreenplumDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.GreenplumDialect"; - }; - - return GreenplumDialect; - })(); - - v2.ObjectNameMappingList = (function() { - - /** - * Properties of an ObjectNameMappingList. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IObjectNameMappingList - * @property {Array.|null} [nameMap] ObjectNameMappingList nameMap - */ - - /** - * Constructs a new ObjectNameMappingList. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an ObjectNameMappingList. - * @implements IObjectNameMappingList - * @constructor - * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList=} [properties] Properties to set - */ - function ObjectNameMappingList(properties) { - this.nameMap = []; - 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]]; - } - - /** - * 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.ObjectNameMappingList - * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList instance - */ - ObjectNameMappingList.create = function create(properties) { - return new ObjectNameMappingList(properties); - }; - - /** - * 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.ObjectNameMappingList - * @static - * @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 - */ - 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 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.ObjectNameMappingList - * @static - * @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 - */ - ObjectNameMappingList.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ObjectNameMappingList message from the specified reader or buffer. - * @function decode - * @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.ObjectNameMappingList} ObjectNameMappingList - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ObjectNameMappingList.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.nameMap && message.nameMap.length)) - message.nameMap = []; - message.nameMap.push($root.google.cloud.bigquery.migration.v2.ObjectNameMapping.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ObjectNameMappingList message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.ObjectNameMappingList} ObjectNameMappingList - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ObjectNameMappingList message. - * @function verify - * @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 - */ - 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 an ObjectNameMappingList message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList - */ - ObjectNameMappingList.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList) - 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]); - } - } - return message; - }; - - /** - * Creates a plain object from an ObjectNameMappingList message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList - * @static - * @param {google.cloud.bigquery.migration.v2.ObjectNameMappingList} message ObjectNameMappingList - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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 ObjectNameMappingList to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList - * @instance - * @returns {Object.} JSON object - */ - ObjectNameMappingList.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ObjectNameMappingList - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ObjectNameMappingList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ObjectNameMappingList"; - }; - - return ObjectNameMappingList; - })(); - - v2.ObjectNameMapping = (function() { - - /** - * Properties of an ObjectNameMapping. - * @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 - */ - - /** - * Constructs a new ObjectNameMapping. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an ObjectNameMapping. - * @implements IObjectNameMapping - * @constructor - * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping=} [properties] Properties to set - */ - function ObjectNameMapping(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ObjectNameMapping source. - * @member {google.cloud.bigquery.migration.v2.INameMappingKey|null|undefined} source - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping - * @instance - */ - ObjectNameMapping.prototype.source = null; - - /** - * ObjectNameMapping target. - * @member {google.cloud.bigquery.migration.v2.INameMappingValue|null|undefined} target - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping - * @instance - */ - ObjectNameMapping.prototype.target = null; - - /** - * Creates a new ObjectNameMapping instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping - * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping instance - */ - ObjectNameMapping.create = function create(properties) { - return new ObjectNameMapping(properties); - }; - - /** - * 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.ObjectNameMapping - * @static - * @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 - */ - 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 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.ObjectNameMapping - * @static - * @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 - */ - ObjectNameMapping.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ObjectNameMapping message from the specified reader or buffer. - * @function decode - * @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.ObjectNameMapping} ObjectNameMapping - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ObjectNameMapping.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.source = $root.google.cloud.bigquery.migration.v2.NameMappingKey.decode(reader, reader.uint32()); - break; - } - case 2: { - message.target = $root.google.cloud.bigquery.migration.v2.NameMappingValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ObjectNameMapping message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.ObjectNameMapping} ObjectNameMapping - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ObjectNameMapping message. - * @function verify - * @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 - */ - 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 ObjectNameMapping message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping - */ - ObjectNameMapping.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ObjectNameMapping) - 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); - } - return message; - }; - - /** - * Creates a plain object from an ObjectNameMapping message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping - * @static - * @param {google.cloud.bigquery.migration.v2.ObjectNameMapping} message ObjectNameMapping - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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 ObjectNameMapping to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping - * @instance - * @returns {Object.} JSON object - */ - ObjectNameMapping.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ObjectNameMapping - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ObjectNameMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ObjectNameMapping"; - }; - - return ObjectNameMapping; - })(); - - v2.NameMappingKey = (function() { - - /** - * Properties of a NameMappingKey. - * @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 - */ - - /** - * Constructs a new NameMappingKey. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a NameMappingKey. - * @implements INameMappingKey - * @constructor - * @param {google.cloud.bigquery.migration.v2.INameMappingKey=} [properties] Properties to set - */ - function NameMappingKey(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]]; - } - - /** - * 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.NameMappingKey - * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingKey=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey instance - */ - NameMappingKey.create = function create(properties) { - return new NameMappingKey(properties); - }; - - /** - * 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.NameMappingKey - * @static - * @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 - */ - 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 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.NameMappingKey - * @static - * @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 - */ - NameMappingKey.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NameMappingKey message from the specified reader or buffer. - * @function decode - * @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.NameMappingKey} NameMappingKey - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NameMappingKey.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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; - } - } - return message; - }; - - /** - * Decodes a NameMappingKey message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.NameMappingKey} NameMappingKey - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NameMappingKey message. - * @function verify - * @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 - */ - 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 NameMappingKey message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey - */ - NameMappingKey.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingKey) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.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 NameMappingKey message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey - * @static - * @param {google.cloud.bigquery.migration.v2.NameMappingKey} message NameMappingKey - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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 NameMappingKey to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey - * @instance - * @returns {Object.} JSON object - */ - NameMappingKey.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NameMappingKey - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NameMappingKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NameMappingKey"; - }; - - /** - * Type enum. - * @name google.cloud.bigquery.migration.v2.NameMappingKey.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} DATABASE=1 DATABASE value - * @property {number} SCHEMA=2 SCHEMA value - * @property {number} RELATION=3 RELATION value - * @property {number} ATTRIBUTE=4 ATTRIBUTE value - * @property {number} RELATION_ALIAS=5 RELATION_ALIAS value - * @property {number} ATTRIBUTE_ALIAS=6 ATTRIBUTE_ALIAS value - * @property {number} FUNCTION=7 FUNCTION value - */ - NameMappingKey.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATABASE"] = 1; - values[valuesById[2] = "SCHEMA"] = 2; - values[valuesById[3] = "RELATION"] = 3; - values[valuesById[4] = "ATTRIBUTE"] = 4; - values[valuesById[5] = "RELATION_ALIAS"] = 5; - values[valuesById[6] = "ATTRIBUTE_ALIAS"] = 6; - values[valuesById[7] = "FUNCTION"] = 7; - return values; - })(); - - return NameMappingKey; - })(); - - v2.NameMappingValue = (function() { - - /** - * Properties of a NameMappingValue. - * @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 - */ - - /** - * Constructs a new NameMappingValue. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a NameMappingValue. - * @implements INameMappingValue - * @constructor - * @param {google.cloud.bigquery.migration.v2.INameMappingValue=} [properties] Properties to set - */ - function NameMappingValue(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]]; - } - - /** - * 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.NameMappingValue - * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingValue=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue instance - */ - NameMappingValue.create = function create(properties) { - return new NameMappingValue(properties); - }; - - /** - * 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.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); - return writer; - }; - - /** - * 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.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.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NameMappingValue message from the specified reader or buffer. - * @function decode - * @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.NameMappingValue} NameMappingValue - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NameMappingValue.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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; - } - } - return message; - }; - - /** - * Decodes a NameMappingValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.NameMappingValue} NameMappingValue - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NameMappingValue message. - * @function verify - * @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 - */ - 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 NameMappingValue message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue - */ - NameMappingValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingValue) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.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 NameMappingValue message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue - * @static - * @param {google.cloud.bigquery.migration.v2.NameMappingValue} message NameMappingValue - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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 NameMappingValue to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue - * @instance - * @returns {Object.} JSON object - */ - NameMappingValue.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NameMappingValue - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NameMappingValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NameMappingValue"; - }; - - return NameMappingValue; - })(); - - v2.SourceEnv = (function() { - - /** - * Properties of a SourceEnv. - * @memberof google.cloud.bigquery.migration.v2 - * @interface ISourceEnv - * @property {string|null} [defaultDatabase] SourceEnv defaultDatabase - * @property {Array.|null} [schemaSearchPath] SourceEnv schemaSearchPath - * @property {string|null} [metadataStoreDataset] SourceEnv metadataStoreDataset - */ - - /** - * Constructs a new SourceEnv. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SourceEnv. - * @implements ISourceEnv - * @constructor - * @param {google.cloud.bigquery.migration.v2.ISourceEnv=} [properties] Properties to set - */ - function SourceEnv(properties) { - this.schemaSearchPath = []; - 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]]; - } - - /** - * 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.SourceEnv - * @static - * @param {google.cloud.bigquery.migration.v2.ISourceEnv=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv instance - */ - SourceEnv.create = function create(properties) { - return new SourceEnv(properties); - }; - - /** - * 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.SourceEnv - * @static - * @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 - */ - 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 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.SourceEnv - * @static - * @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 - */ - SourceEnv.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceEnv message from the specified reader or buffer. - * @function decode - * @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.SourceEnv} SourceEnv - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceEnv.decode = function decode(reader, length, error) { - 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(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.defaultDatabase = reader.string(); - break; - } - case 2: { - if (!(message.schemaSearchPath && message.schemaSearchPath.length)) - message.schemaSearchPath = []; - message.schemaSearchPath.push(reader.string()); - break; - } - case 3: { - message.metadataStoreDataset = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceEnv message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.SourceEnv} SourceEnv - * @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) { - 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"; - } - if (message.metadataStoreDataset != null && message.hasOwnProperty("metadataStoreDataset")) - if (!$util.isString(message.metadataStoreDataset)) - return "metadataStoreDataset: string expected"; - return null; - }; - - /** - * Creates a SourceEnv message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SourceEnv - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv - */ - SourceEnv.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SourceEnv) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.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 SourceEnv message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SourceEnv - * @static - * @param {google.cloud.bigquery.migration.v2.SourceEnv} message SourceEnv - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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 SourceEnv to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SourceEnv - * @instance - * @returns {Object.} JSON object - */ - SourceEnv.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceEnv - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SourceEnv - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceEnv.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SourceEnv"; - }; - - return SourceEnv; - })(); - - v2.TranslationDetails = (function() { - - /** - * Properties of a TranslationDetails. - * @memberof google.cloud.bigquery.migration.v2 - * @interface ITranslationDetails - * @property {Array.|null} [sourceTargetMapping] TranslationDetails sourceTargetMapping - * @property {string|null} [targetBaseUri] TranslationDetails targetBaseUri - * @property {google.cloud.bigquery.migration.v2.ISourceEnvironment|null} [sourceEnvironment] TranslationDetails sourceEnvironment - * @property {Array.|null} [targetReturnLiterals] TranslationDetails targetReturnLiterals - * @property {Array.|null} [targetTypes] TranslationDetails targetTypes - * @property {google.cloud.bigquery.migration.v2.ISuggestionConfig|null} [suggestionConfig] TranslationDetails suggestionConfig - */ - - /** - * Constructs a new TranslationDetails. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TranslationDetails. - * @implements ITranslationDetails - * @constructor - * @param {google.cloud.bigquery.migration.v2.ITranslationDetails=} [properties] Properties to set - */ - function TranslationDetails(properties) { - this.sourceTargetMapping = []; - this.targetReturnLiterals = []; - this.targetTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TranslationDetails sourceTargetMapping. - * @member {Array.} sourceTargetMapping - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails - * @instance - */ - 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; - - /** - * TranslationDetails suggestionConfig. - * @member {google.cloud.bigquery.migration.v2.ISuggestionConfig|null|undefined} suggestionConfig - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails - * @instance - */ - TranslationDetails.prototype.suggestionConfig = null; - - /** - * Creates a new TranslationDetails instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails - * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationDetails=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails instance - */ - TranslationDetails.create = function create(properties) { - return new TranslationDetails(properties); - }; - - /** - * 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.TranslationDetails - * @static - * @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 - */ - 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]); - if (message.suggestionConfig != null && Object.hasOwnProperty.call(message, "suggestionConfig")) - $root.google.cloud.bigquery.migration.v2.SuggestionConfig.encode(message.suggestionConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified 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.TranslationDetails - * @static - * @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 - */ - TranslationDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TranslationDetails message from the specified reader or buffer. - * @function decode - * @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.TranslationDetails} TranslationDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranslationDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.sourceTargetMapping && message.sourceTargetMapping.length)) - message.sourceTargetMapping = []; - message.sourceTargetMapping.push($root.google.cloud.bigquery.migration.v2.SourceTargetMapping.decode(reader, reader.uint32())); - 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; - } - case 6: { - message.suggestionConfig = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TranslationDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.TranslationDetails} TranslationDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranslationDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TranslationDetails message. - * @function verify - * @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 - */ - 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"; - } - if (message.suggestionConfig != null && message.hasOwnProperty("suggestionConfig")) { - var error = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.verify(message.suggestionConfig); - if (error) - return "suggestionConfig." + error; - } - return null; - }; - - /** - * Creates a TranslationDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails - */ - TranslationDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.TranslationDetails) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.TranslationDetails(); - if (object.sourceTargetMapping) { - if (!Array.isArray(object.sourceTargetMapping)) - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceTargetMapping: array expected"); - message.sourceTargetMapping = []; - for (var i = 0; i < object.sourceTargetMapping.length; ++i) { - if (typeof object.sourceTargetMapping[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceTargetMapping: object expected"); - message.sourceTargetMapping[i] = $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.fromObject(object.sourceTargetMapping[i]); - } - } - if (object.targetBaseUri != null) - message.targetBaseUri = String(object.targetBaseUri); - if (object.sourceEnvironment != null) { - if (typeof object.sourceEnvironment !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceEnvironment: object expected"); - message.sourceEnvironment = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.fromObject(object.sourceEnvironment); - } - if (object.targetReturnLiterals) { - if (!Array.isArray(object.targetReturnLiterals)) - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.targetReturnLiterals: array expected"); - message.targetReturnLiterals = []; - for (var i = 0; i < object.targetReturnLiterals.length; ++i) - message.targetReturnLiterals[i] = String(object.targetReturnLiterals[i]); - } - if (object.targetTypes) { - if (!Array.isArray(object.targetTypes)) - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.targetTypes: array expected"); - message.targetTypes = []; - for (var i = 0; i < object.targetTypes.length; ++i) - message.targetTypes[i] = String(object.targetTypes[i]); - } - if (object.suggestionConfig != null) { - if (typeof object.suggestionConfig !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.suggestionConfig: object expected"); - message.suggestionConfig = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.fromObject(object.suggestionConfig); - } - return message; - }; - - /** - * Creates a plain object from a TranslationDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails - * @static - * @param {google.cloud.bigquery.migration.v2.TranslationDetails} message TranslationDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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; - object.suggestionConfig = 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]; - } - if (message.suggestionConfig != null && message.hasOwnProperty("suggestionConfig")) - object.suggestionConfig = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.toObject(message.suggestionConfig, options); - return object; - }; - - /** - * Converts this TranslationDetails to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails - * @instance - * @returns {Object.} JSON object - */ - TranslationDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TranslationDetails - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TranslationDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TranslationDetails"; - }; - - return TranslationDetails; - })(); - - v2.SuggestionConfig = (function() { - - /** - * Properties of a SuggestionConfig. - * @memberof google.cloud.bigquery.migration.v2 - * @interface ISuggestionConfig - * @property {Array.|null} [skipSuggestionSteps] SuggestionConfig skipSuggestionSteps - */ - - /** - * Constructs a new SuggestionConfig. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SuggestionConfig. - * @implements ISuggestionConfig - * @constructor - * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig=} [properties] Properties to set - */ - function SuggestionConfig(properties) { - this.skipSuggestionSteps = []; - 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]]; - } - - /** - * SuggestionConfig skipSuggestionSteps. - * @member {Array.} skipSuggestionSteps - * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig - * @instance - */ - SuggestionConfig.prototype.skipSuggestionSteps = $util.emptyArray; - - /** - * Creates a new SuggestionConfig instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig - * @static - * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig instance - */ - SuggestionConfig.create = function create(properties) { - return new SuggestionConfig(properties); - }; - - /** - * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig - * @static - * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig} message SuggestionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionConfig.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.skipSuggestionSteps != null && message.skipSuggestionSteps.length) - for (var i = 0; i < message.skipSuggestionSteps.length; ++i) - $root.google.cloud.bigquery.migration.v2.SuggestionStep.encode(message.skipSuggestionSteps[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig - * @static - * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig} message SuggestionConfig message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionConfig.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SuggestionConfig message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionConfig.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SuggestionConfig(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.skipSuggestionSteps && message.skipSuggestionSteps.length)) - message.skipSuggestionSteps = []; - message.skipSuggestionSteps.push($root.google.cloud.bigquery.migration.v2.SuggestionStep.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionConfig.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SuggestionConfig message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SuggestionConfig.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.skipSuggestionSteps != null && message.hasOwnProperty("skipSuggestionSteps")) { - if (!Array.isArray(message.skipSuggestionSteps)) - return "skipSuggestionSteps: array expected"; - for (var i = 0; i < message.skipSuggestionSteps.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.SuggestionStep.verify(message.skipSuggestionSteps[i]); - if (error) - return "skipSuggestionSteps." + error; - } - } - return null; - }; - - /** - * Creates a SuggestionConfig message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig - */ - SuggestionConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SuggestionConfig) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.SuggestionConfig(); - if (object.skipSuggestionSteps) { - if (!Array.isArray(object.skipSuggestionSteps)) - throw TypeError(".google.cloud.bigquery.migration.v2.SuggestionConfig.skipSuggestionSteps: array expected"); - message.skipSuggestionSteps = []; - for (var i = 0; i < object.skipSuggestionSteps.length; ++i) { - if (typeof object.skipSuggestionSteps[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.SuggestionConfig.skipSuggestionSteps: object expected"); - message.skipSuggestionSteps[i] = $root.google.cloud.bigquery.migration.v2.SuggestionStep.fromObject(object.skipSuggestionSteps[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig - * @static - * @param {google.cloud.bigquery.migration.v2.SuggestionConfig} message SuggestionConfig - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SuggestionConfig.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.skipSuggestionSteps = []; - if (message.skipSuggestionSteps && message.skipSuggestionSteps.length) { - object.skipSuggestionSteps = []; - for (var j = 0; j < message.skipSuggestionSteps.length; ++j) - object.skipSuggestionSteps[j] = $root.google.cloud.bigquery.migration.v2.SuggestionStep.toObject(message.skipSuggestionSteps[j], options); - } - return object; - }; - - /** - * Converts this SuggestionConfig to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig - * @instance - * @returns {Object.} JSON object - */ - SuggestionConfig.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SuggestionConfig - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SuggestionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SuggestionConfig"; - }; - - return SuggestionConfig; - })(); - - v2.SuggestionStep = (function() { - - /** - * Properties of a SuggestionStep. - * @memberof google.cloud.bigquery.migration.v2 - * @interface ISuggestionStep - * @property {google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|null} [suggestionType] SuggestionStep suggestionType - * @property {google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|null} [rewriteTarget] SuggestionStep rewriteTarget - */ - - /** - * Constructs a new SuggestionStep. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SuggestionStep. - * @implements ISuggestionStep - * @constructor - * @param {google.cloud.bigquery.migration.v2.ISuggestionStep=} [properties] Properties to set - */ - function SuggestionStep(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * SuggestionStep suggestionType. - * @member {google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType} suggestionType - * @memberof google.cloud.bigquery.migration.v2.SuggestionStep - * @instance - */ - SuggestionStep.prototype.suggestionType = 0; - - /** - * SuggestionStep rewriteTarget. - * @member {google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget} rewriteTarget - * @memberof google.cloud.bigquery.migration.v2.SuggestionStep - * @instance - */ - SuggestionStep.prototype.rewriteTarget = 0; - - /** - * Creates a new SuggestionStep instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.SuggestionStep - * @static - * @param {google.cloud.bigquery.migration.v2.ISuggestionStep=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep instance - */ - SuggestionStep.create = function create(properties) { - return new SuggestionStep(properties); - }; - - /** - * Encodes the specified SuggestionStep message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.SuggestionStep - * @static - * @param {google.cloud.bigquery.migration.v2.ISuggestionStep} message SuggestionStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionStep.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.suggestionType != null && Object.hasOwnProperty.call(message, "suggestionType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.suggestionType); - if (message.rewriteTarget != null && Object.hasOwnProperty.call(message, "rewriteTarget")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rewriteTarget); - return writer; - }; - - /** - * Encodes the specified SuggestionStep message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SuggestionStep - * @static - * @param {google.cloud.bigquery.migration.v2.ISuggestionStep} message SuggestionStep message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SuggestionStep.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SuggestionStep message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.SuggestionStep - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionStep.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SuggestionStep(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.suggestionType = reader.int32(); - break; - } - case 2: { - message.rewriteTarget = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SuggestionStep message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SuggestionStep - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SuggestionStep.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SuggestionStep message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.SuggestionStep - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SuggestionStep.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.suggestionType != null && message.hasOwnProperty("suggestionType")) - switch (message.suggestionType) { - default: - return "suggestionType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.rewriteTarget != null && message.hasOwnProperty("rewriteTarget")) - switch (message.rewriteTarget) { - default: - return "rewriteTarget: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a SuggestionStep message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SuggestionStep - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep - */ - SuggestionStep.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SuggestionStep) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.SuggestionStep(); - switch (object.suggestionType) { - default: - if (typeof object.suggestionType === "number") { - message.suggestionType = object.suggestionType; - break; - } - break; - case "SUGGESTION_TYPE_UNSPECIFIED": - case 0: - message.suggestionType = 0; - break; - case "QUERY_CUSTOMIZATION": - case 1: - message.suggestionType = 1; - break; - case "TRANSLATION_EXPLANATION": - case 2: - message.suggestionType = 2; - break; - } - switch (object.rewriteTarget) { - default: - if (typeof object.rewriteTarget === "number") { - message.rewriteTarget = object.rewriteTarget; - break; - } - break; - case "REWRITE_TARGET_UNSPECIFIED": - case 0: - message.rewriteTarget = 0; - break; - case "SOURCE_SQL": - case 1: - message.rewriteTarget = 1; - break; - case "TARGET_SQL": - case 2: - message.rewriteTarget = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a SuggestionStep message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SuggestionStep - * @static - * @param {google.cloud.bigquery.migration.v2.SuggestionStep} message SuggestionStep - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SuggestionStep.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.suggestionType = options.enums === String ? "SUGGESTION_TYPE_UNSPECIFIED" : 0; - object.rewriteTarget = options.enums === String ? "REWRITE_TARGET_UNSPECIFIED" : 0; - } - if (message.suggestionType != null && message.hasOwnProperty("suggestionType")) - object.suggestionType = options.enums === String ? $root.google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType[message.suggestionType] === undefined ? message.suggestionType : $root.google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType[message.suggestionType] : message.suggestionType; - if (message.rewriteTarget != null && message.hasOwnProperty("rewriteTarget")) - object.rewriteTarget = options.enums === String ? $root.google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget[message.rewriteTarget] === undefined ? message.rewriteTarget : $root.google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget[message.rewriteTarget] : message.rewriteTarget; - return object; - }; - - /** - * Converts this SuggestionStep to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SuggestionStep - * @instance - * @returns {Object.} JSON object - */ - SuggestionStep.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SuggestionStep - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SuggestionStep - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SuggestionStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SuggestionStep"; - }; - - /** - * SuggestionType enum. - * @name google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType - * @enum {number} - * @property {number} SUGGESTION_TYPE_UNSPECIFIED=0 SUGGESTION_TYPE_UNSPECIFIED value - * @property {number} QUERY_CUSTOMIZATION=1 QUERY_CUSTOMIZATION value - * @property {number} TRANSLATION_EXPLANATION=2 TRANSLATION_EXPLANATION value - */ - SuggestionStep.SuggestionType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SUGGESTION_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "QUERY_CUSTOMIZATION"] = 1; - values[valuesById[2] = "TRANSLATION_EXPLANATION"] = 2; - return values; - })(); - - /** - * RewriteTarget enum. - * @name google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget - * @enum {number} - * @property {number} REWRITE_TARGET_UNSPECIFIED=0 REWRITE_TARGET_UNSPECIFIED value - * @property {number} SOURCE_SQL=1 SOURCE_SQL value - * @property {number} TARGET_SQL=2 TARGET_SQL value - */ - SuggestionStep.RewriteTarget = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REWRITE_TARGET_UNSPECIFIED"] = 0; - values[valuesById[1] = "SOURCE_SQL"] = 1; - values[valuesById[2] = "TARGET_SQL"] = 2; - return values; - })(); - - return SuggestionStep; - })(); - - v2.SourceTargetMapping = (function() { - - /** - * Properties of a SourceTargetMapping. - * @memberof google.cloud.bigquery.migration.v2 - * @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 SourceTargetMapping. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SourceTargetMapping. - * @implements ISourceTargetMapping - * @constructor - * @param {google.cloud.bigquery.migration.v2.ISourceTargetMapping=} [properties] Properties to set - */ - function SourceTargetMapping(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]]; - } - - /** - * 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.SourceTargetMapping - * @static - * @param {google.cloud.bigquery.migration.v2.ISourceTargetMapping=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SourceTargetMapping} SourceTargetMapping instance - */ - SourceTargetMapping.create = function create(properties) { - return new SourceTargetMapping(properties); - }; - - /** - * 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.SourceTargetMapping - * @static - * @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 - */ - 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 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.SourceTargetMapping - * @static - * @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 - */ - SourceTargetMapping.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceTargetMapping message from the specified reader or buffer. - * @function decode - * @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.SourceTargetMapping} SourceTargetMapping - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceTargetMapping.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SourceTargetMapping(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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; - } - } - return message; - }; - - /** - * Decodes a SourceTargetMapping message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.SourceTargetMapping} SourceTargetMapping - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceTargetMapping.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceTargetMapping message. - * @function verify - * @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 - */ - 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 SourceTargetMapping message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SourceTargetMapping} SourceTargetMapping - */ - SourceTargetMapping.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SourceTargetMapping) - return object; - 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 SourceTargetMapping message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping - * @static - * @param {google.cloud.bigquery.migration.v2.SourceTargetMapping} message SourceTargetMapping - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - 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 SourceTargetMapping to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping - * @instance - * @returns {Object.} JSON object - */ - SourceTargetMapping.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceTargetMapping - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SourceTargetMapping - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceTargetMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SourceTargetMapping"; - }; - - return SourceTargetMapping; - })(); - - v2.SourceSpec = (function() { - - /** - * Properties of a SourceSpec. - * @memberof google.cloud.bigquery.migration.v2 - * @interface ISourceSpec - * @property {string|null} [baseUri] SourceSpec baseUri - * @property {google.cloud.bigquery.migration.v2.ILiteral|null} [literal] SourceSpec literal - * @property {string|null} [gcsFilePath] SourceSpec gcsFilePath - * @property {string|null} [encoding] SourceSpec encoding - */ - - /** - * Constructs a new SourceSpec. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SourceSpec. - * @implements ISourceSpec - * @constructor - * @param {google.cloud.bigquery.migration.v2.ISourceSpec=} [properties] Properties to set - */ - function SourceSpec(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]]; - } - - /** - * SourceSpec baseUri. - * @member {string|null|undefined} baseUri - * @memberof google.cloud.bigquery.migration.v2.SourceSpec - * @instance - */ - SourceSpec.prototype.baseUri = null; - - /** - * 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 gcsFilePath. - * @member {string|null|undefined} gcsFilePath - * @memberof google.cloud.bigquery.migration.v2.SourceSpec - * @instance - */ - SourceSpec.prototype.gcsFilePath = 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"|"gcsFilePath"|undefined} source - * @memberof google.cloud.bigquery.migration.v2.SourceSpec - * @instance - */ - Object.defineProperty(SourceSpec.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["baseUri", "literal", "gcsFilePath"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new SourceSpec instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.SourceSpec - * @static - * @param {google.cloud.bigquery.migration.v2.ISourceSpec=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SourceSpec} SourceSpec instance - */ - SourceSpec.create = function create(properties) { - return new SourceSpec(properties); - }; - - /** - * 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.SourceSpec - * @static - * @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 - */ - SourceSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - 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); - if (message.gcsFilePath != null && Object.hasOwnProperty.call(message, "gcsFilePath")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcsFilePath); - return writer; - }; - - /** - * 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.SourceSpec - * @static - * @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 - */ - SourceSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceSpec message from the specified reader or buffer. - * @function decode - * @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.SourceSpec} SourceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceSpec.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SourceSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.baseUri = reader.string(); - break; - } - case 2: { - message.literal = $root.google.cloud.bigquery.migration.v2.Literal.decode(reader, reader.uint32()); - break; - } - case 4: { - message.gcsFilePath = reader.string(); - break; - } - case 3: { - message.encoding = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.SourceSpec} SourceSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceSpec message. - * @function verify - * @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 - */ - SourceSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - 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 "literal." + error; - } - } - if (message.gcsFilePath != null && message.hasOwnProperty("gcsFilePath")) { - if (properties.source === 1) - return "source: multiple values"; - properties.source = 1; - if (!$util.isString(message.gcsFilePath)) - return "gcsFilePath: string expected"; - } - if (message.encoding != null && message.hasOwnProperty("encoding")) - if (!$util.isString(message.encoding)) - return "encoding: string expected"; - return null; - }; - - /** - * Creates a SourceSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SourceSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SourceSpec} SourceSpec - */ - 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.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.gcsFilePath != null) - message.gcsFilePath = String(object.gcsFilePath); - if (object.encoding != null) - message.encoding = String(object.encoding); - return message; - }; - - /** - * Creates a plain object from a SourceSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SourceSpec - * @static - * @param {google.cloud.bigquery.migration.v2.SourceSpec} message SourceSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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; - if (message.gcsFilePath != null && message.hasOwnProperty("gcsFilePath")) { - object.gcsFilePath = message.gcsFilePath; - if (options.oneofs) - object.source = "gcsFilePath"; - } - return object; - }; - - /** - * Converts this SourceSpec to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SourceSpec - * @instance - * @returns {Object.} JSON object - */ - SourceSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceSpec - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SourceSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SourceSpec"; - }; - - return SourceSpec; - })(); - - v2.TargetSpec = (function() { - - /** - * Properties of a TargetSpec. - * @memberof google.cloud.bigquery.migration.v2 - * @interface ITargetSpec - * @property {string|null} [relativePath] TargetSpec relativePath - */ - - /** - * Constructs a new TargetSpec. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TargetSpec. - * @implements ITargetSpec - * @constructor - * @param {google.cloud.bigquery.migration.v2.ITargetSpec=} [properties] Properties to set - */ - function TargetSpec(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]]; - } - - /** - * TargetSpec relativePath. - * @member {string} relativePath - * @memberof google.cloud.bigquery.migration.v2.TargetSpec - * @instance - */ - TargetSpec.prototype.relativePath = ""; - - /** - * Creates a new TargetSpec instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.TargetSpec - * @static - * @param {google.cloud.bigquery.migration.v2.ITargetSpec=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.TargetSpec} TargetSpec instance - */ - TargetSpec.create = function create(properties) { - return new TargetSpec(properties); - }; - - /** - * 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.TargetSpec - * @static - * @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 - */ - TargetSpec.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.relativePath != null && Object.hasOwnProperty.call(message, "relativePath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.relativePath); - return writer; - }; - - /** - * 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.TargetSpec - * @static - * @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 - */ - TargetSpec.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TargetSpec message from the specified reader or buffer. - * @function decode - * @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.TargetSpec} TargetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetSpec.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TargetSpec(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.relativePath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TargetSpec message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.TargetSpec} TargetSpec - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TargetSpec.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TargetSpec message. - * @function verify - * @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 - */ - TargetSpec.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.relativePath != null && message.hasOwnProperty("relativePath")) - if (!$util.isString(message.relativePath)) - return "relativePath: string expected"; - return null; - }; - - /** - * Creates a TargetSpec message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.TargetSpec - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TargetSpec} TargetSpec - */ - 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.TargetSpec(); - if (object.relativePath != null) - message.relativePath = String(object.relativePath); - return message; - }; - - /** - * Creates a plain object from a TargetSpec message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.TargetSpec - * @static - * @param {google.cloud.bigquery.migration.v2.TargetSpec} message TargetSpec - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TargetSpec.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.relativePath = ""; - if (message.relativePath != null && message.hasOwnProperty("relativePath")) - object.relativePath = message.relativePath; - return object; - }; - - /** - * Converts this TargetSpec to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TargetSpec - * @instance - * @returns {Object.} JSON object - */ - TargetSpec.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TargetSpec - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TargetSpec - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TargetSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TargetSpec"; - }; - - return TargetSpec; - })(); - - v2.Literal = (function() { - - /** - * Properties of a Literal. - * @memberof google.cloud.bigquery.migration.v2 - * @interface ILiteral - * @property {string|null} [literalString] Literal literalString - * @property {Uint8Array|null} [literalBytes] Literal literalBytes - * @property {string|null} [relativePath] Literal relativePath - */ - - /** - * Constructs a new Literal. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a Literal. - * @implements ILiteral - * @constructor - * @param {google.cloud.bigquery.migration.v2.ILiteral=} [properties] Properties to set - */ - function Literal(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]]; - } - - /** - * Literal literalString. - * @member {string|null|undefined} literalString - * @memberof google.cloud.bigquery.migration.v2.Literal - * @instance - */ - Literal.prototype.literalString = null; - - /** - * Literal literalBytes. - * @member {Uint8Array|null|undefined} literalBytes - * @memberof google.cloud.bigquery.migration.v2.Literal - * @instance - */ - Literal.prototype.literalBytes = null; - - /** - * Literal relativePath. - * @member {string} relativePath - * @memberof google.cloud.bigquery.migration.v2.Literal - * @instance - */ - Literal.prototype.relativePath = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * Literal literalData. - * @member {"literalString"|"literalBytes"|undefined} literalData - * @memberof google.cloud.bigquery.migration.v2.Literal - * @instance - */ - Object.defineProperty(Literal.prototype, "literalData", { - get: $util.oneOfGetter($oneOfFields = ["literalString", "literalBytes"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Literal instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.Literal - * @static - * @param {google.cloud.bigquery.migration.v2.ILiteral=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.Literal} Literal instance - */ - Literal.create = function create(properties) { - return new Literal(properties); - }; - - /** - * 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.Literal - * @static - * @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 - */ - Literal.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - 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 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.Literal - * @static - * @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 - */ - Literal.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Literal message from the specified reader or buffer. - * @function decode - * @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.Literal} Literal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Literal.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.Literal(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.literalString = reader.string(); - break; - } - case 3: { - message.literalBytes = reader.bytes(); - break; - } - case 1: { - message.relativePath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Literal message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.Literal} Literal - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Literal.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Literal message. - * @function verify - * @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 - */ - Literal.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object 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 Literal message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.Literal - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.Literal} Literal - */ - 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.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 Literal message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.Literal - * @static - * @param {google.cloud.bigquery.migration.v2.Literal} message Literal - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Literal.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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"; - } - return object; - }; - - /** - * Converts this Literal to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.Literal - * @instance - * @returns {Object.} JSON object - */ - Literal.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Literal - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.Literal - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Literal.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.Literal"; - }; - - return Literal; - })(); - - v2.SourceEnvironment = (function() { - - /** - * Properties of a SourceEnvironment. - * @memberof google.cloud.bigquery.migration.v2 - * @interface ISourceEnvironment - * @property {string|null} [defaultDatabase] SourceEnvironment defaultDatabase - * @property {Array.|null} [schemaSearchPath] SourceEnvironment schemaSearchPath - * @property {string|null} [metadataStoreDataset] SourceEnvironment metadataStoreDataset - */ - - /** - * Constructs a new SourceEnvironment. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SourceEnvironment. - * @implements ISourceEnvironment - * @constructor - * @param {google.cloud.bigquery.migration.v2.ISourceEnvironment=} [properties] Properties to set - */ - function SourceEnvironment(properties) { - this.schemaSearchPath = []; - 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]]; - } - - /** - * SourceEnvironment defaultDatabase. - * @member {string} defaultDatabase - * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment - * @instance - */ - SourceEnvironment.prototype.defaultDatabase = ""; - - /** - * SourceEnvironment schemaSearchPath. - * @member {Array.} schemaSearchPath - * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment - * @instance - */ - SourceEnvironment.prototype.schemaSearchPath = $util.emptyArray; - - /** - * SourceEnvironment metadataStoreDataset. - * @member {string} metadataStoreDataset - * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment - * @instance - */ - SourceEnvironment.prototype.metadataStoreDataset = ""; - - /** - * Creates a new SourceEnvironment instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment - * @static - * @param {google.cloud.bigquery.migration.v2.ISourceEnvironment=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SourceEnvironment} SourceEnvironment instance - */ - SourceEnvironment.create = function create(properties) { - return new SourceEnvironment(properties); - }; - - /** - * 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.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 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.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.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceEnvironment message from the specified reader or buffer. - * @function decode - * @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.SourceEnvironment} SourceEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceEnvironment.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SourceEnvironment(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.defaultDatabase = reader.string(); - break; - } - case 2: { - if (!(message.schemaSearchPath && message.schemaSearchPath.length)) - message.schemaSearchPath = []; - message.schemaSearchPath.push(reader.string()); - break; - } - case 3: { - message.metadataStoreDataset = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceEnvironment message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.SourceEnvironment} SourceEnvironment - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceEnvironment.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceEnvironment message. - * @function verify - * @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 - */ - SourceEnvironment.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 SourceEnvironment message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SourceEnvironment} SourceEnvironment - */ - 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.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 SourceEnvironment message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment - * @static - * @param {google.cloud.bigquery.migration.v2.SourceEnvironment} message SourceEnvironment - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceEnvironment.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 SourceEnvironment to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment - * @instance - * @returns {Object.} JSON object - */ - SourceEnvironment.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceEnvironment - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SourceEnvironment - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceEnvironment.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SourceEnvironment"; - }; - - return SourceEnvironment; - })(); - - v2.GcsReportLogMessage = (function() { - - /** - * Properties of a GcsReportLogMessage. - * @memberof google.cloud.bigquery.migration.v2 - * @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 GcsReportLogMessage. - * @implements IGcsReportLogMessage - * @constructor - * @param {google.cloud.bigquery.migration.v2.IGcsReportLogMessage=} [properties] Properties to set - */ - function GcsReportLogMessage(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]]; - } - - /** - * GcsReportLogMessage severity. - * @member {string} severity - * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage - * @instance - */ - GcsReportLogMessage.prototype.severity = ""; - - /** - * GcsReportLogMessage category. - * @member {string} category - * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage - * @instance - */ - GcsReportLogMessage.prototype.category = ""; - - /** - * 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.GcsReportLogMessage - * @static - * @param {google.cloud.bigquery.migration.v2.IGcsReportLogMessage=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.GcsReportLogMessage} GcsReportLogMessage instance - */ - GcsReportLogMessage.create = function create(properties) { - return new GcsReportLogMessage(properties); - }; - - /** - * 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.GcsReportLogMessage - * @static - * @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 - */ - GcsReportLogMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - 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 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.GcsReportLogMessage - * @static - * @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 - */ - GcsReportLogMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GcsReportLogMessage message from the specified reader or buffer. - * @function decode - * @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.GcsReportLogMessage} GcsReportLogMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsReportLogMessage.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.severity = reader.string(); - break; - } - case 2: { - 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: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GcsReportLogMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @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.GcsReportLogMessage} GcsReportLogMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GcsReportLogMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * 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 GcsReportLogMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.GcsReportLogMessage} GcsReportLogMessage - */ - 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.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 GcsReportLogMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage - * @static - * @param {google.cloud.bigquery.migration.v2.GcsReportLogMessage} message GcsReportLogMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GcsReportLogMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - 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 GcsReportLogMessage to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage - * @instance - * @returns {Object.} JSON object - */ - GcsReportLogMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GcsReportLogMessage - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.GcsReportLogMessage - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GcsReportLogMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.GcsReportLogMessage"; - }; - - return GcsReportLogMessage; - })(); - - v2.MigrationService = (function() { - - /** - * Constructs a new MigrationService service. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MigrationService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function MigrationService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (MigrationService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MigrationService; - - /** - * Creates new MigrationService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {MigrationService} RPC service. Useful where requests and/or responses are streamed. - */ - MigrationService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|createMigrationWorkflow}. - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @typedef CreateMigrationWorkflowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.bigquery.migration.v2.MigrationWorkflow} [response] MigrationWorkflow - */ - - /** - * Calls CreateMigrationWorkflow. - * @function createMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest} request CreateMigrationWorkflowRequest message or plain object - * @param {google.cloud.bigquery.migration.v2.MigrationService.CreateMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and MigrationWorkflow - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.createMigrationWorkflow = function createMigrationWorkflow(request, callback) { - return this.rpcCall(createMigrationWorkflow, $root.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest, $root.google.cloud.bigquery.migration.v2.MigrationWorkflow, request, callback); - }, "name", { value: "CreateMigrationWorkflow" }); - - /** - * Calls CreateMigrationWorkflow. - * @function createMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest} request CreateMigrationWorkflowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|getMigrationWorkflow}. - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @typedef GetMigrationWorkflowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.bigquery.migration.v2.MigrationWorkflow} [response] MigrationWorkflow - */ - - /** - * Calls GetMigrationWorkflow. - * @function getMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest} request GetMigrationWorkflowRequest message or plain object - * @param {google.cloud.bigquery.migration.v2.MigrationService.GetMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and MigrationWorkflow - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.getMigrationWorkflow = function getMigrationWorkflow(request, callback) { - return this.rpcCall(getMigrationWorkflow, $root.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest, $root.google.cloud.bigquery.migration.v2.MigrationWorkflow, request, callback); - }, "name", { value: "GetMigrationWorkflow" }); - - /** - * Calls GetMigrationWorkflow. - * @function getMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest} request GetMigrationWorkflowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|listMigrationWorkflows}. - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @typedef ListMigrationWorkflowsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse} [response] ListMigrationWorkflowsResponse - */ - - /** - * Calls ListMigrationWorkflows. - * @function listMigrationWorkflows - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest} request ListMigrationWorkflowsRequest message or plain object - * @param {google.cloud.bigquery.migration.v2.MigrationService.ListMigrationWorkflowsCallback} callback Node-style callback called with the error, if any, and ListMigrationWorkflowsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.listMigrationWorkflows = function listMigrationWorkflows(request, callback) { - return this.rpcCall(listMigrationWorkflows, $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest, $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse, request, callback); - }, "name", { value: "ListMigrationWorkflows" }); - - /** - * Calls ListMigrationWorkflows. - * @function listMigrationWorkflows - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest} request ListMigrationWorkflowsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|deleteMigrationWorkflow}. - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @typedef DeleteMigrationWorkflowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteMigrationWorkflow. - * @function deleteMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest} request DeleteMigrationWorkflowRequest message or plain object - * @param {google.cloud.bigquery.migration.v2.MigrationService.DeleteMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.deleteMigrationWorkflow = function deleteMigrationWorkflow(request, callback) { - return this.rpcCall(deleteMigrationWorkflow, $root.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteMigrationWorkflow" }); - - /** - * Calls DeleteMigrationWorkflow. - * @function deleteMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest} request DeleteMigrationWorkflowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|startMigrationWorkflow}. - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @typedef StartMigrationWorkflowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls StartMigrationWorkflow. - * @function startMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest} request StartMigrationWorkflowRequest message or plain object - * @param {google.cloud.bigquery.migration.v2.MigrationService.StartMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.startMigrationWorkflow = function startMigrationWorkflow(request, callback) { - return this.rpcCall(startMigrationWorkflow, $root.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "StartMigrationWorkflow" }); - - /** - * Calls StartMigrationWorkflow. - * @function startMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest} request StartMigrationWorkflowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|getMigrationSubtask}. - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @typedef GetMigrationSubtaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.bigquery.migration.v2.MigrationSubtask} [response] MigrationSubtask - */ - - /** - * Calls GetMigrationSubtask. - * @function getMigrationSubtask - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest} request GetMigrationSubtaskRequest message or plain object - * @param {google.cloud.bigquery.migration.v2.MigrationService.GetMigrationSubtaskCallback} callback Node-style callback called with the error, if any, and MigrationSubtask - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.getMigrationSubtask = function getMigrationSubtask(request, callback) { - return this.rpcCall(getMigrationSubtask, $root.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest, $root.google.cloud.bigquery.migration.v2.MigrationSubtask, request, callback); - }, "name", { value: "GetMigrationSubtask" }); - - /** - * Calls GetMigrationSubtask. - * @function getMigrationSubtask - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest} request GetMigrationSubtaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2.MigrationService|listMigrationSubtasks}. - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @typedef ListMigrationSubtasksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse} [response] ListMigrationSubtasksResponse - */ - - /** - * Calls ListMigrationSubtasks. - * @function listMigrationSubtasks - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest} request ListMigrationSubtasksRequest message or plain object - * @param {google.cloud.bigquery.migration.v2.MigrationService.ListMigrationSubtasksCallback} callback Node-style callback called with the error, if any, and ListMigrationSubtasksResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.listMigrationSubtasks = function listMigrationSubtasks(request, callback) { - return this.rpcCall(listMigrationSubtasks, $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest, $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse, request, callback); - }, "name", { value: "ListMigrationSubtasks" }); - - /** - * Calls ListMigrationSubtasks. - * @function listMigrationSubtasks - * @memberof google.cloud.bigquery.migration.v2.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest} request ListMigrationSubtasksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return MigrationService; - })(); - - v2.CreateMigrationWorkflowRequest = (function() { - - /** - * Properties of a CreateMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2 - * @interface ICreateMigrationWorkflowRequest - * @property {string|null} [parent] CreateMigrationWorkflowRequest parent - * @property {google.cloud.bigquery.migration.v2.IMigrationWorkflow|null} [migrationWorkflow] CreateMigrationWorkflowRequest migrationWorkflow - */ - - /** - * Constructs a new CreateMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a CreateMigrationWorkflowRequest. - * @implements ICreateMigrationWorkflowRequest - * @constructor - * @param {google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest=} [properties] Properties to set - */ - function CreateMigrationWorkflowRequest(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]]; - } - - /** - * CreateMigrationWorkflowRequest parent. - * @member {string} parent - * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest - * @instance - */ - CreateMigrationWorkflowRequest.prototype.parent = ""; - - /** - * CreateMigrationWorkflowRequest migrationWorkflow. - * @member {google.cloud.bigquery.migration.v2.IMigrationWorkflow|null|undefined} migrationWorkflow - * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest - * @instance - */ - CreateMigrationWorkflowRequest.prototype.migrationWorkflow = null; - - /** - * Creates a new CreateMigrationWorkflowRequest instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest instance - */ - CreateMigrationWorkflowRequest.create = function create(properties) { - return new CreateMigrationWorkflowRequest(properties); - }; - - /** - * Encodes the specified CreateMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest} message CreateMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateMigrationWorkflowRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.migrationWorkflow != null && Object.hasOwnProperty.call(message, "migrationWorkflow")) - $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.encode(message.migrationWorkflow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest} message CreateMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest - * @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.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateMigrationWorkflowRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.migrationWorkflow = $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateMigrationWorkflowRequest message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateMigrationWorkflowRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.migrationWorkflow != null && message.hasOwnProperty("migrationWorkflow")) { - var error = $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.verify(message.migrationWorkflow); - if (error) - return "migrationWorkflow." + error; - } - return null; - }; - - /** - * Creates a CreateMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest - */ - CreateMigrationWorkflowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.migrationWorkflow != null) { - if (typeof object.migrationWorkflow !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest.migrationWorkflow: object expected"); - message.migrationWorkflow = $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.fromObject(object.migrationWorkflow); - } - return message; - }; - - /** - * Creates a plain object from a CreateMigrationWorkflowRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest} message CreateMigrationWorkflowRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateMigrationWorkflowRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.migrationWorkflow = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.migrationWorkflow != null && message.hasOwnProperty("migrationWorkflow")) - object.migrationWorkflow = $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.toObject(message.migrationWorkflow, options); - return object; - }; - - /** - * Converts this CreateMigrationWorkflowRequest to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest - * @instance - * @returns {Object.} JSON object - */ - CreateMigrationWorkflowRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateMigrationWorkflowRequest - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest"; - }; - - return CreateMigrationWorkflowRequest; - })(); - - v2.GetMigrationWorkflowRequest = (function() { - - /** - * Properties of a GetMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IGetMigrationWorkflowRequest - * @property {string|null} [name] GetMigrationWorkflowRequest name - * @property {google.protobuf.IFieldMask|null} [readMask] GetMigrationWorkflowRequest readMask - */ - - /** - * Constructs a new GetMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a GetMigrationWorkflowRequest. - * @implements IGetMigrationWorkflowRequest - * @constructor - * @param {google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest=} [properties] Properties to set - */ - function GetMigrationWorkflowRequest(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]]; - } - - /** - * GetMigrationWorkflowRequest name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest - * @instance - */ - GetMigrationWorkflowRequest.prototype.name = ""; - - /** - * GetMigrationWorkflowRequest readMask. - * @member {google.protobuf.IFieldMask|null|undefined} readMask - * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest - * @instance - */ - GetMigrationWorkflowRequest.prototype.readMask = null; - - /** - * Creates a new GetMigrationWorkflowRequest instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest instance - */ - GetMigrationWorkflowRequest.create = function create(properties) { - return new GetMigrationWorkflowRequest(properties); - }; - - /** - * Encodes the specified GetMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest} message GetMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMigrationWorkflowRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) - $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest} message GetMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest - * @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.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMigrationWorkflowRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetMigrationWorkflowRequest message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetMigrationWorkflowRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.readMask != null && message.hasOwnProperty("readMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.readMask); - if (error) - return "readMask." + error; - } - return null; - }; - - /** - * Creates a GetMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest - */ - GetMigrationWorkflowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.readMask != null) { - if (typeof object.readMask !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest.readMask: object expected"); - message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); - } - return message; - }; - - /** - * Creates a plain object from a GetMigrationWorkflowRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest} message GetMigrationWorkflowRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetMigrationWorkflowRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.readMask = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.readMask != null && message.hasOwnProperty("readMask")) - object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); - return object; - }; - - /** - * Converts this GetMigrationWorkflowRequest to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest - * @instance - * @returns {Object.} JSON object - */ - GetMigrationWorkflowRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetMigrationWorkflowRequest - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest"; - }; - - return GetMigrationWorkflowRequest; - })(); - - v2.ListMigrationWorkflowsRequest = (function() { - - /** - * Properties of a ListMigrationWorkflowsRequest. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IListMigrationWorkflowsRequest - * @property {string|null} [parent] ListMigrationWorkflowsRequest parent - * @property {google.protobuf.IFieldMask|null} [readMask] ListMigrationWorkflowsRequest readMask - * @property {number|null} [pageSize] ListMigrationWorkflowsRequest pageSize - * @property {string|null} [pageToken] ListMigrationWorkflowsRequest pageToken - */ - - /** - * Constructs a new ListMigrationWorkflowsRequest. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a ListMigrationWorkflowsRequest. - * @implements IListMigrationWorkflowsRequest - * @constructor - * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest=} [properties] Properties to set - */ - function ListMigrationWorkflowsRequest(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]]; - } - - /** - * ListMigrationWorkflowsRequest parent. - * @member {string} parent - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest - * @instance - */ - ListMigrationWorkflowsRequest.prototype.parent = ""; - - /** - * ListMigrationWorkflowsRequest readMask. - * @member {google.protobuf.IFieldMask|null|undefined} readMask - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest - * @instance - */ - ListMigrationWorkflowsRequest.prototype.readMask = null; - - /** - * ListMigrationWorkflowsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest - * @instance - */ - ListMigrationWorkflowsRequest.prototype.pageSize = 0; - - /** - * ListMigrationWorkflowsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest - * @instance - */ - ListMigrationWorkflowsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListMigrationWorkflowsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest instance - */ - ListMigrationWorkflowsRequest.create = function create(properties) { - return new ListMigrationWorkflowsRequest(properties); - }; - - /** - * Encodes the specified ListMigrationWorkflowsRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest} message ListMigrationWorkflowsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationWorkflowsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) - $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListMigrationWorkflowsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest} message ListMigrationWorkflowsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationWorkflowsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest - * @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.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationWorkflowsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationWorkflowsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListMigrationWorkflowsRequest message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMigrationWorkflowsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.readMask != null && message.hasOwnProperty("readMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.readMask); - if (error) - return "readMask." + error; - } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListMigrationWorkflowsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest - */ - ListMigrationWorkflowsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.readMask != null) { - if (typeof object.readMask !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest.readMask: object expected"); - message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); - } - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListMigrationWorkflowsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest - * @static - * @param {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest} message ListMigrationWorkflowsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMigrationWorkflowsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.readMask = null; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.readMask != null && message.hasOwnProperty("readMask")) - object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListMigrationWorkflowsRequest to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest - * @instance - * @returns {Object.} JSON object - */ - ListMigrationWorkflowsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListMigrationWorkflowsRequest - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListMigrationWorkflowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest"; - }; - - return ListMigrationWorkflowsRequest; - })(); - - v2.ListMigrationWorkflowsResponse = (function() { - - /** - * Properties of a ListMigrationWorkflowsResponse. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IListMigrationWorkflowsResponse - * @property {Array.|null} [migrationWorkflows] ListMigrationWorkflowsResponse migrationWorkflows - * @property {string|null} [nextPageToken] ListMigrationWorkflowsResponse nextPageToken - */ - - /** - * Constructs a new ListMigrationWorkflowsResponse. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a ListMigrationWorkflowsResponse. - * @implements IListMigrationWorkflowsResponse - * @constructor - * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse=} [properties] Properties to set - */ - function ListMigrationWorkflowsResponse(properties) { - this.migrationWorkflows = []; - 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]]; - } - - /** - * ListMigrationWorkflowsResponse migrationWorkflows. - * @member {Array.} migrationWorkflows - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse - * @instance - */ - ListMigrationWorkflowsResponse.prototype.migrationWorkflows = $util.emptyArray; - - /** - * ListMigrationWorkflowsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse - * @instance - */ - ListMigrationWorkflowsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListMigrationWorkflowsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse - * @static - * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse instance - */ - ListMigrationWorkflowsResponse.create = function create(properties) { - return new ListMigrationWorkflowsResponse(properties); - }; - - /** - * Encodes the specified ListMigrationWorkflowsResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse - * @static - * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse} message ListMigrationWorkflowsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationWorkflowsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.migrationWorkflows != null && message.migrationWorkflows.length) - for (var i = 0; i < message.migrationWorkflows.length; ++i) - $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.encode(message.migrationWorkflows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListMigrationWorkflowsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse - * @static - * @param {google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse} message ListMigrationWorkflowsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationWorkflowsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse - * @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.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationWorkflowsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.migrationWorkflows && message.migrationWorkflows.length)) - message.migrationWorkflows = []; - message.migrationWorkflows.push($root.google.cloud.bigquery.migration.v2.MigrationWorkflow.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationWorkflowsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListMigrationWorkflowsResponse message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMigrationWorkflowsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.migrationWorkflows != null && message.hasOwnProperty("migrationWorkflows")) { - if (!Array.isArray(message.migrationWorkflows)) - return "migrationWorkflows: array expected"; - for (var i = 0; i < message.migrationWorkflows.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.verify(message.migrationWorkflows[i]); - if (error) - return "migrationWorkflows." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListMigrationWorkflowsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse - */ - ListMigrationWorkflowsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse(); - if (object.migrationWorkflows) { - if (!Array.isArray(object.migrationWorkflows)) - throw TypeError(".google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse.migrationWorkflows: array expected"); - message.migrationWorkflows = []; - for (var i = 0; i < object.migrationWorkflows.length; ++i) { - if (typeof object.migrationWorkflows[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse.migrationWorkflows: object expected"); - message.migrationWorkflows[i] = $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.fromObject(object.migrationWorkflows[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListMigrationWorkflowsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse - * @static - * @param {google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse} message ListMigrationWorkflowsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMigrationWorkflowsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.migrationWorkflows = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.migrationWorkflows && message.migrationWorkflows.length) { - object.migrationWorkflows = []; - for (var j = 0; j < message.migrationWorkflows.length; ++j) - object.migrationWorkflows[j] = $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.toObject(message.migrationWorkflows[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListMigrationWorkflowsResponse to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse - * @instance - * @returns {Object.} JSON object - */ - ListMigrationWorkflowsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListMigrationWorkflowsResponse - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListMigrationWorkflowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse"; - }; - - return ListMigrationWorkflowsResponse; - })(); - - v2.DeleteMigrationWorkflowRequest = (function() { - - /** - * Properties of a DeleteMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IDeleteMigrationWorkflowRequest - * @property {string|null} [name] DeleteMigrationWorkflowRequest name - */ - - /** - * Constructs a new DeleteMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a DeleteMigrationWorkflowRequest. - * @implements IDeleteMigrationWorkflowRequest - * @constructor - * @param {google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest=} [properties] Properties to set - */ - function DeleteMigrationWorkflowRequest(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]]; - } - - /** - * DeleteMigrationWorkflowRequest name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest - * @instance - */ - DeleteMigrationWorkflowRequest.prototype.name = ""; - - /** - * Creates a new DeleteMigrationWorkflowRequest instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest instance - */ - DeleteMigrationWorkflowRequest.create = function create(properties) { - return new DeleteMigrationWorkflowRequest(properties); - }; - - /** - * Encodes the specified DeleteMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest} message DeleteMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteMigrationWorkflowRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest} message DeleteMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest - * @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.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteMigrationWorkflowRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteMigrationWorkflowRequest message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteMigrationWorkflowRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest - */ - DeleteMigrationWorkflowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteMigrationWorkflowRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest} message DeleteMigrationWorkflowRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteMigrationWorkflowRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteMigrationWorkflowRequest to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteMigrationWorkflowRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteMigrationWorkflowRequest - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest"; - }; - - return DeleteMigrationWorkflowRequest; - })(); - - v2.StartMigrationWorkflowRequest = (function() { - - /** - * Properties of a StartMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IStartMigrationWorkflowRequest - * @property {string|null} [name] StartMigrationWorkflowRequest name - */ - - /** - * Constructs a new StartMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a StartMigrationWorkflowRequest. - * @implements IStartMigrationWorkflowRequest - * @constructor - * @param {google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest=} [properties] Properties to set - */ - function StartMigrationWorkflowRequest(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]]; - } - - /** - * StartMigrationWorkflowRequest name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest - * @instance - */ - StartMigrationWorkflowRequest.prototype.name = ""; - - /** - * Creates a new StartMigrationWorkflowRequest instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest instance - */ - StartMigrationWorkflowRequest.create = function create(properties) { - return new StartMigrationWorkflowRequest(properties); - }; - - /** - * Encodes the specified StartMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest} message StartMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartMigrationWorkflowRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified StartMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest} message StartMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest - * @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.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartMigrationWorkflowRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StartMigrationWorkflowRequest message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StartMigrationWorkflowRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a StartMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest - */ - StartMigrationWorkflowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a StartMigrationWorkflowRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest} message StartMigrationWorkflowRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StartMigrationWorkflowRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this StartMigrationWorkflowRequest to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest - * @instance - * @returns {Object.} JSON object - */ - StartMigrationWorkflowRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StartMigrationWorkflowRequest - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StartMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest"; - }; - - return StartMigrationWorkflowRequest; - })(); - - v2.GetMigrationSubtaskRequest = (function() { - - /** - * Properties of a GetMigrationSubtaskRequest. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IGetMigrationSubtaskRequest - * @property {string|null} [name] GetMigrationSubtaskRequest name - * @property {google.protobuf.IFieldMask|null} [readMask] GetMigrationSubtaskRequest readMask - */ - - /** - * Constructs a new GetMigrationSubtaskRequest. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a GetMigrationSubtaskRequest. - * @implements IGetMigrationSubtaskRequest - * @constructor - * @param {google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest=} [properties] Properties to set - */ - function GetMigrationSubtaskRequest(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]]; - } - - /** - * GetMigrationSubtaskRequest name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest - * @instance - */ - GetMigrationSubtaskRequest.prototype.name = ""; - - /** - * GetMigrationSubtaskRequest readMask. - * @member {google.protobuf.IFieldMask|null|undefined} readMask - * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest - * @instance - */ - GetMigrationSubtaskRequest.prototype.readMask = null; - - /** - * Creates a new GetMigrationSubtaskRequest instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest instance - */ - GetMigrationSubtaskRequest.create = function create(properties) { - return new GetMigrationSubtaskRequest(properties); - }; - - /** - * Encodes the specified GetMigrationSubtaskRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest} message GetMigrationSubtaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMigrationSubtaskRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) - $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetMigrationSubtaskRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest} message GetMigrationSubtaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMigrationSubtaskRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest - * @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.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMigrationSubtaskRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMigrationSubtaskRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetMigrationSubtaskRequest message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetMigrationSubtaskRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.readMask != null && message.hasOwnProperty("readMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.readMask); - if (error) - return "readMask." + error; - } - return null; - }; - - /** - * Creates a GetMigrationSubtaskRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest - */ - GetMigrationSubtaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.readMask != null) { - if (typeof object.readMask !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest.readMask: object expected"); - message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); - } - return message; - }; - - /** - * Creates a plain object from a GetMigrationSubtaskRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest - * @static - * @param {google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest} message GetMigrationSubtaskRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetMigrationSubtaskRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.readMask = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.readMask != null && message.hasOwnProperty("readMask")) - object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); - return object; - }; - - /** - * Converts this GetMigrationSubtaskRequest to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest - * @instance - * @returns {Object.} JSON object - */ - GetMigrationSubtaskRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetMigrationSubtaskRequest - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetMigrationSubtaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest"; - }; - - return GetMigrationSubtaskRequest; - })(); - - v2.ListMigrationSubtasksRequest = (function() { - - /** - * Properties of a ListMigrationSubtasksRequest. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IListMigrationSubtasksRequest - * @property {string|null} [parent] ListMigrationSubtasksRequest parent - * @property {google.protobuf.IFieldMask|null} [readMask] ListMigrationSubtasksRequest readMask - * @property {number|null} [pageSize] ListMigrationSubtasksRequest pageSize - * @property {string|null} [pageToken] ListMigrationSubtasksRequest pageToken - * @property {string|null} [filter] ListMigrationSubtasksRequest filter - */ - - /** - * Constructs a new ListMigrationSubtasksRequest. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a ListMigrationSubtasksRequest. - * @implements IListMigrationSubtasksRequest - * @constructor - * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest=} [properties] Properties to set - */ - function ListMigrationSubtasksRequest(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]]; - } - - /** - * ListMigrationSubtasksRequest parent. - * @member {string} parent - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - * @instance - */ - ListMigrationSubtasksRequest.prototype.parent = ""; - - /** - * ListMigrationSubtasksRequest readMask. - * @member {google.protobuf.IFieldMask|null|undefined} readMask - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - * @instance - */ - ListMigrationSubtasksRequest.prototype.readMask = null; - - /** - * ListMigrationSubtasksRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - * @instance - */ - ListMigrationSubtasksRequest.prototype.pageSize = 0; - - /** - * ListMigrationSubtasksRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - * @instance - */ - ListMigrationSubtasksRequest.prototype.pageToken = ""; - - /** - * ListMigrationSubtasksRequest filter. - * @member {string} filter - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - * @instance - */ - ListMigrationSubtasksRequest.prototype.filter = ""; - - /** - * Creates a new ListMigrationSubtasksRequest instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest instance - */ - ListMigrationSubtasksRequest.create = function create(properties) { - return new ListMigrationSubtasksRequest(properties); - }; - - /** - * Encodes the specified ListMigrationSubtasksRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest} message ListMigrationSubtasksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationSubtasksRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) - $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - return writer; - }; - - /** - * Encodes the specified ListMigrationSubtasksRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - * @static - * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest} message ListMigrationSubtasksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationSubtasksRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - * @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.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationSubtasksRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - case 5: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationSubtasksRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListMigrationSubtasksRequest message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMigrationSubtasksRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.readMask != null && message.hasOwnProperty("readMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.readMask); - if (error) - return "readMask." + error; - } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a ListMigrationSubtasksRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest - */ - ListMigrationSubtasksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.readMask != null) { - if (typeof object.readMask !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest.readMask: object expected"); - message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); - } - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a ListMigrationSubtasksRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - * @static - * @param {google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest} message ListMigrationSubtasksRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMigrationSubtasksRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.readMask = null; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.readMask != null && message.hasOwnProperty("readMask")) - object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this ListMigrationSubtasksRequest to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - * @instance - * @returns {Object.} JSON object - */ - ListMigrationSubtasksRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListMigrationSubtasksRequest - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListMigrationSubtasksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest"; - }; - - return ListMigrationSubtasksRequest; - })(); - - v2.ListMigrationSubtasksResponse = (function() { - - /** - * Properties of a ListMigrationSubtasksResponse. - * @memberof google.cloud.bigquery.migration.v2 - * @interface IListMigrationSubtasksResponse - * @property {Array.|null} [migrationSubtasks] ListMigrationSubtasksResponse migrationSubtasks - * @property {string|null} [nextPageToken] ListMigrationSubtasksResponse nextPageToken - */ - - /** - * Constructs a new ListMigrationSubtasksResponse. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a ListMigrationSubtasksResponse. - * @implements IListMigrationSubtasksResponse - * @constructor - * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse=} [properties] Properties to set - */ - function ListMigrationSubtasksResponse(properties) { - this.migrationSubtasks = []; - 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]]; - } - - /** - * ListMigrationSubtasksResponse migrationSubtasks. - * @member {Array.} migrationSubtasks - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse - * @instance - */ - ListMigrationSubtasksResponse.prototype.migrationSubtasks = $util.emptyArray; - - /** - * ListMigrationSubtasksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse - * @instance - */ - ListMigrationSubtasksResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListMigrationSubtasksResponse instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse - * @static - * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse instance - */ - ListMigrationSubtasksResponse.create = function create(properties) { - return new ListMigrationSubtasksResponse(properties); - }; - - /** - * Encodes the specified ListMigrationSubtasksResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse - * @static - * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse} message ListMigrationSubtasksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationSubtasksResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.migrationSubtasks != null && message.migrationSubtasks.length) - for (var i = 0; i < message.migrationSubtasks.length; ++i) - $root.google.cloud.bigquery.migration.v2.MigrationSubtask.encode(message.migrationSubtasks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListMigrationSubtasksResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse - * @static - * @param {google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse} message ListMigrationSubtasksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationSubtasksResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse - * @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.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationSubtasksResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.migrationSubtasks && message.migrationSubtasks.length)) - message.migrationSubtasks = []; - message.migrationSubtasks.push($root.google.cloud.bigquery.migration.v2.MigrationSubtask.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationSubtasksResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListMigrationSubtasksResponse message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMigrationSubtasksResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.migrationSubtasks != null && message.hasOwnProperty("migrationSubtasks")) { - if (!Array.isArray(message.migrationSubtasks)) - return "migrationSubtasks: array expected"; - for (var i = 0; i < message.migrationSubtasks.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.MigrationSubtask.verify(message.migrationSubtasks[i]); - if (error) - return "migrationSubtasks." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListMigrationSubtasksResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse - */ - ListMigrationSubtasksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse) - return object; - var message = new $root.google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse(); - if (object.migrationSubtasks) { - if (!Array.isArray(object.migrationSubtasks)) - throw TypeError(".google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse.migrationSubtasks: array expected"); - message.migrationSubtasks = []; - for (var i = 0; i < object.migrationSubtasks.length; ++i) { - if (typeof object.migrationSubtasks[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse.migrationSubtasks: object expected"); - message.migrationSubtasks[i] = $root.google.cloud.bigquery.migration.v2.MigrationSubtask.fromObject(object.migrationSubtasks[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListMigrationSubtasksResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse - * @static - * @param {google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse} message ListMigrationSubtasksResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMigrationSubtasksResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.migrationSubtasks = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.migrationSubtasks && message.migrationSubtasks.length) { - object.migrationSubtasks = []; - for (var j = 0; j < message.migrationSubtasks.length; ++j) - object.migrationSubtasks[j] = $root.google.cloud.bigquery.migration.v2.MigrationSubtask.toObject(message.migrationSubtasks[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListMigrationSubtasksResponse to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse - * @instance - * @returns {Object.} JSON object - */ - ListMigrationSubtasksResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListMigrationSubtasksResponse - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListMigrationSubtasksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse"; - }; - - 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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationReportRecord(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - 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; - })(); - - migration.v2alpha = (function() { - - /** - * Namespace v2alpha. - * @memberof google.cloud.bigquery.migration - * @namespace - */ - var v2alpha = {}; - - v2alpha.AssessmentTaskDetails = (function() { - - /** - * Properties of an AssessmentTaskDetails. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IAssessmentTaskDetails - * @property {string|null} [inputPath] AssessmentTaskDetails inputPath - * @property {string|null} [outputDataset] AssessmentTaskDetails outputDataset - * @property {string|null} [querylogsPath] AssessmentTaskDetails querylogsPath - * @property {string|null} [dataSource] AssessmentTaskDetails dataSource - */ - - /** - * Constructs a new AssessmentTaskDetails. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents an AssessmentTaskDetails. - * @implements IAssessmentTaskDetails - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails=} [properties] Properties to set - */ - function AssessmentTaskDetails(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]]; - } - - /** - * AssessmentTaskDetails inputPath. - * @member {string} inputPath - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails - * @instance - */ - AssessmentTaskDetails.prototype.inputPath = ""; - - /** - * AssessmentTaskDetails outputDataset. - * @member {string} outputDataset - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails - * @instance - */ - AssessmentTaskDetails.prototype.outputDataset = ""; - - /** - * AssessmentTaskDetails querylogsPath. - * @member {string} querylogsPath - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails - * @instance - */ - AssessmentTaskDetails.prototype.querylogsPath = ""; - - /** - * AssessmentTaskDetails dataSource. - * @member {string} dataSource - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails - * @instance - */ - AssessmentTaskDetails.prototype.dataSource = ""; - - /** - * Creates a new AssessmentTaskDetails instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails} AssessmentTaskDetails instance - */ - AssessmentTaskDetails.create = function create(properties) { - return new AssessmentTaskDetails(properties); - }; - - /** - * Encodes the specified AssessmentTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails} message AssessmentTaskDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssessmentTaskDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inputPath != null && Object.hasOwnProperty.call(message, "inputPath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputPath); - if (message.outputDataset != null && Object.hasOwnProperty.call(message, "outputDataset")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.outputDataset); - if (message.querylogsPath != null && Object.hasOwnProperty.call(message, "querylogsPath")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.querylogsPath); - if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.dataSource); - return writer; - }; - - /** - * Encodes the specified AssessmentTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails} message AssessmentTaskDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssessmentTaskDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AssessmentTaskDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails} AssessmentTaskDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssessmentTaskDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.inputPath = reader.string(); - break; - } - case 2: { - message.outputDataset = reader.string(); - break; - } - case 3: { - message.querylogsPath = reader.string(); - break; - } - case 4: { - message.dataSource = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AssessmentTaskDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails} AssessmentTaskDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssessmentTaskDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AssessmentTaskDetails message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AssessmentTaskDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inputPath != null && message.hasOwnProperty("inputPath")) - if (!$util.isString(message.inputPath)) - return "inputPath: string expected"; - if (message.outputDataset != null && message.hasOwnProperty("outputDataset")) - if (!$util.isString(message.outputDataset)) - return "outputDataset: string expected"; - if (message.querylogsPath != null && message.hasOwnProperty("querylogsPath")) - if (!$util.isString(message.querylogsPath)) - return "querylogsPath: string expected"; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - if (!$util.isString(message.dataSource)) - return "dataSource: string expected"; - return null; - }; - - /** - * Creates an AssessmentTaskDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails} AssessmentTaskDetails - */ - AssessmentTaskDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails(); - if (object.inputPath != null) - message.inputPath = String(object.inputPath); - if (object.outputDataset != null) - message.outputDataset = String(object.outputDataset); - if (object.querylogsPath != null) - message.querylogsPath = String(object.querylogsPath); - if (object.dataSource != null) - message.dataSource = String(object.dataSource); - return message; - }; - - /** - * Creates a plain object from an AssessmentTaskDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails - * @static - * @param {google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails} message AssessmentTaskDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AssessmentTaskDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.inputPath = ""; - object.outputDataset = ""; - object.querylogsPath = ""; - object.dataSource = ""; - } - if (message.inputPath != null && message.hasOwnProperty("inputPath")) - object.inputPath = message.inputPath; - if (message.outputDataset != null && message.hasOwnProperty("outputDataset")) - object.outputDataset = message.outputDataset; - if (message.querylogsPath != null && message.hasOwnProperty("querylogsPath")) - object.querylogsPath = message.querylogsPath; - if (message.dataSource != null && message.hasOwnProperty("dataSource")) - object.dataSource = message.dataSource; - return object; - }; - - /** - * Converts this AssessmentTaskDetails to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails - * @instance - * @returns {Object.} JSON object - */ - AssessmentTaskDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AssessmentTaskDetails - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AssessmentTaskDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails"; - }; - - return AssessmentTaskDetails; - })(); - - v2alpha.AssessmentOrchestrationResultDetails = (function() { - - /** - * Properties of an AssessmentOrchestrationResultDetails. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IAssessmentOrchestrationResultDetails - * @property {string|null} [outputTablesSchemaVersion] AssessmentOrchestrationResultDetails outputTablesSchemaVersion - */ - - /** - * Constructs a new AssessmentOrchestrationResultDetails. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents an AssessmentOrchestrationResultDetails. - * @implements IAssessmentOrchestrationResultDetails - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails=} [properties] Properties to set - */ - function AssessmentOrchestrationResultDetails(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]]; - } - - /** - * AssessmentOrchestrationResultDetails outputTablesSchemaVersion. - * @member {string} outputTablesSchemaVersion - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails - * @instance - */ - AssessmentOrchestrationResultDetails.prototype.outputTablesSchemaVersion = ""; - - /** - * Creates a new AssessmentOrchestrationResultDetails instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails} AssessmentOrchestrationResultDetails instance - */ - AssessmentOrchestrationResultDetails.create = function create(properties) { - return new AssessmentOrchestrationResultDetails(properties); - }; - - /** - * Encodes the specified AssessmentOrchestrationResultDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails} message AssessmentOrchestrationResultDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssessmentOrchestrationResultDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.outputTablesSchemaVersion != null && Object.hasOwnProperty.call(message, "outputTablesSchemaVersion")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.outputTablesSchemaVersion); - return writer; - }; - - /** - * Encodes the specified AssessmentOrchestrationResultDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails} message AssessmentOrchestrationResultDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - AssessmentOrchestrationResultDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an AssessmentOrchestrationResultDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails - * @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.v2alpha.AssessmentOrchestrationResultDetails} AssessmentOrchestrationResultDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssessmentOrchestrationResultDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.outputTablesSchemaVersion = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an AssessmentOrchestrationResultDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails} AssessmentOrchestrationResultDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - AssessmentOrchestrationResultDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an AssessmentOrchestrationResultDetails message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - AssessmentOrchestrationResultDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.outputTablesSchemaVersion != null && message.hasOwnProperty("outputTablesSchemaVersion")) - if (!$util.isString(message.outputTablesSchemaVersion)) - return "outputTablesSchemaVersion: string expected"; - return null; - }; - - /** - * Creates an AssessmentOrchestrationResultDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails} AssessmentOrchestrationResultDetails - */ - AssessmentOrchestrationResultDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails(); - if (object.outputTablesSchemaVersion != null) - message.outputTablesSchemaVersion = String(object.outputTablesSchemaVersion); - return message; - }; - - /** - * Creates a plain object from an AssessmentOrchestrationResultDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails - * @static - * @param {google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails} message AssessmentOrchestrationResultDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - AssessmentOrchestrationResultDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.outputTablesSchemaVersion = ""; - if (message.outputTablesSchemaVersion != null && message.hasOwnProperty("outputTablesSchemaVersion")) - object.outputTablesSchemaVersion = message.outputTablesSchemaVersion; - return object; - }; - - /** - * Converts this AssessmentOrchestrationResultDetails to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails - * @instance - * @returns {Object.} JSON object - */ - AssessmentOrchestrationResultDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for AssessmentOrchestrationResultDetails - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - AssessmentOrchestrationResultDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails"; - }; - - return AssessmentOrchestrationResultDetails; - })(); - - v2alpha.MigrationWorkflow = (function() { - - /** - * Properties of a MigrationWorkflow. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IMigrationWorkflow - * @property {string|null} [name] MigrationWorkflow name - * @property {string|null} [displayName] MigrationWorkflow displayName - * @property {Object.|null} [tasks] MigrationWorkflow tasks - * @property {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State|null} [state] MigrationWorkflow state - * @property {google.protobuf.ITimestamp|null} [createTime] MigrationWorkflow createTime - * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationWorkflow lastUpdateTime - */ - - /** - * Constructs a new MigrationWorkflow. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a MigrationWorkflow. - * @implements IMigrationWorkflow - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow=} [properties] Properties to set - */ - function MigrationWorkflow(properties) { - this.tasks = {}; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MigrationWorkflow name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @instance - */ - MigrationWorkflow.prototype.name = ""; - - /** - * MigrationWorkflow displayName. - * @member {string} displayName - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @instance - */ - MigrationWorkflow.prototype.displayName = ""; - - /** - * MigrationWorkflow tasks. - * @member {Object.} tasks - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @instance - */ - MigrationWorkflow.prototype.tasks = $util.emptyObject; - - /** - * MigrationWorkflow state. - * @member {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State} state - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @instance - */ - MigrationWorkflow.prototype.state = 0; - - /** - * MigrationWorkflow createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @instance - */ - MigrationWorkflow.prototype.createTime = null; - - /** - * MigrationWorkflow lastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @instance - */ - MigrationWorkflow.prototype.lastUpdateTime = null; - - /** - * Creates a new MigrationWorkflow instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} MigrationWorkflow instance - */ - MigrationWorkflow.create = function create(properties) { - return new MigrationWorkflow(properties); - }; - - /** - * Encodes the specified MigrationWorkflow message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationWorkflow.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.tasks != null && Object.hasOwnProperty.call(message, "tasks")) - for (var keys = Object.keys(message.tasks), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.bigquery.migration.v2alpha.MigrationTask.encode(message.tasks[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - return writer; - }; - - /** - * Encodes the specified MigrationWorkflow message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationWorkflow.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MigrationWorkflow message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} MigrationWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationWorkflow.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 6: { - message.displayName = reader.string(); - break; - } - case 2: { - if (message.tasks === $util.emptyObject) - message.tasks = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.bigquery.migration.v2alpha.MigrationTask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.tasks[key] = value; - break; - } - case 3: { - message.state = reader.int32(); - break; - } - case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MigrationWorkflow message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} MigrationWorkflow - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationWorkflow.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MigrationWorkflow message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MigrationWorkflow.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.tasks != null && message.hasOwnProperty("tasks")) { - if (!$util.isObject(message.tasks)) - return "tasks: object expected"; - var key = Object.keys(message.tasks); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2alpha.MigrationTask.verify(message.tasks[key[i]]); - if (error) - return "tasks." + error; - } - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); - if (error) - return "lastUpdateTime." + error; - } - return null; - }; - - /** - * Creates a MigrationWorkflow message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} MigrationWorkflow - */ - MigrationWorkflow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.tasks) { - if (typeof object.tasks !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.tasks: object expected"); - message.tasks = {}; - for (var keys = Object.keys(object.tasks), i = 0; i < keys.length; ++i) { - if (typeof object.tasks[keys[i]] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.tasks: object expected"); - message.tasks[keys[i]] = $root.google.cloud.bigquery.migration.v2alpha.MigrationTask.fromObject(object.tasks[keys[i]]); - } - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "DRAFT": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "PAUSED": - case 3: - message.state = 3; - break; - case "COMPLETED": - case 4: - message.state = 4; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.lastUpdateTime != null) { - if (typeof object.lastUpdateTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.lastUpdateTime: object expected"); - message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); - } - return message; - }; - - /** - * Creates a plain object from a MigrationWorkflow message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @static - * @param {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} message MigrationWorkflow - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MigrationWorkflow.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.tasks = {}; - if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.createTime = null; - object.lastUpdateTime = null; - object.displayName = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.tasks && (keys2 = Object.keys(message.tasks)).length) { - object.tasks = {}; - for (var j = 0; j < keys2.length; ++j) - object.tasks[keys2[j]] = $root.google.cloud.bigquery.migration.v2alpha.MigrationTask.toObject(message.tasks[keys2[j]], options); - } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State[message.state] : message.state; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) - object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - return object; - }; - - /** - * Converts this MigrationWorkflow to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @instance - * @returns {Object.} JSON object - */ - MigrationWorkflow.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MigrationWorkflow - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationWorkflow - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MigrationWorkflow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.MigrationWorkflow"; - }; - - /** - * State enum. - * @name google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} DRAFT=1 DRAFT value - * @property {number} RUNNING=2 RUNNING value - * @property {number} PAUSED=3 PAUSED value - * @property {number} COMPLETED=4 COMPLETED value - */ - MigrationWorkflow.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DRAFT"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "PAUSED"] = 3; - values[valuesById[4] = "COMPLETED"] = 4; - return values; - })(); - - return MigrationWorkflow; - })(); - - v2alpha.MigrationTask = (function() { - - /** - * Properties of a MigrationTask. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IMigrationTask - * @property {google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails|null} [assessmentTaskDetails] MigrationTask assessmentTaskDetails - * @property {google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails|null} [translationTaskDetails] MigrationTask translationTaskDetails - * @property {string|null} [id] MigrationTask id - * @property {string|null} [type] MigrationTask type - * @property {google.protobuf.IAny|null} [details] MigrationTask details - * @property {google.cloud.bigquery.migration.v2alpha.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 {google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult|null} [orchestrationResult] MigrationTask orchestrationResult - */ - - /** - * Constructs a new MigrationTask. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a MigrationTask. - * @implements IMigrationTask - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTask=} [properties] Properties to set - */ - function MigrationTask(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]]; - } - - /** - * MigrationTask assessmentTaskDetails. - * @member {google.cloud.bigquery.migration.v2alpha.IAssessmentTaskDetails|null|undefined} assessmentTaskDetails - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @instance - */ - MigrationTask.prototype.assessmentTaskDetails = null; - - /** - * MigrationTask translationTaskDetails. - * @member {google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails|null|undefined} translationTaskDetails - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @instance - */ - MigrationTask.prototype.translationTaskDetails = null; - - /** - * MigrationTask id. - * @member {string} id - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @instance - */ - MigrationTask.prototype.id = ""; - - /** - * MigrationTask type. - * @member {string} type - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @instance - */ - MigrationTask.prototype.type = ""; - - /** - * MigrationTask details. - * @member {google.protobuf.IAny|null|undefined} details - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @instance - */ - MigrationTask.prototype.details = null; - - /** - * MigrationTask state. - * @member {google.cloud.bigquery.migration.v2alpha.MigrationTask.State} state - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @instance - */ - MigrationTask.prototype.state = 0; - - /** - * MigrationTask processingError. - * @member {google.rpc.IErrorInfo|null|undefined} processingError - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @instance - */ - MigrationTask.prototype.processingError = null; - - /** - * MigrationTask createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @instance - */ - MigrationTask.prototype.createTime = null; - - /** - * MigrationTask lastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @instance - */ - MigrationTask.prototype.lastUpdateTime = null; - - /** - * MigrationTask orchestrationResult. - * @member {google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult|null|undefined} orchestrationResult - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @instance - */ - MigrationTask.prototype.orchestrationResult = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MigrationTask taskDetails. - * @member {"assessmentTaskDetails"|"translationTaskDetails"|undefined} taskDetails - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @instance - */ - Object.defineProperty(MigrationTask.prototype, "taskDetails", { - get: $util.oneOfGetter($oneOfFields = ["assessmentTaskDetails", "translationTaskDetails"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MigrationTask instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTask=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.MigrationTask} MigrationTask instance - */ - MigrationTask.create = function create(properties) { - return new MigrationTask(properties); - }; - - /** - * Encodes the specified MigrationTask message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTask.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTask} message MigrationTask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationTask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); - if (message.details != null && Object.hasOwnProperty.call(message, "details")) - $root.google.protobuf.Any.encode(message.details, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.processingError != null && Object.hasOwnProperty.call(message, "processingError")) - $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.orchestrationResult != null && Object.hasOwnProperty.call(message, "orchestrationResult")) - $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.encode(message.orchestrationResult, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.assessmentTaskDetails != null && Object.hasOwnProperty.call(message, "assessmentTaskDetails")) - $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.encode(message.assessmentTaskDetails, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.translationTaskDetails != null && Object.hasOwnProperty.call(message, "translationTaskDetails")) - $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.encode(message.translationTaskDetails, writer.uint32(/* id 13, wireType 2 =*/106).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MigrationTask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTask} message MigrationTask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationTask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MigrationTask message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2alpha.MigrationTask} MigrationTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationTask.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationTask(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 12: { - message.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.decode(reader, reader.uint32()); - break; - } - case 13: { - message.translationTaskDetails = $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.decode(reader, reader.uint32()); - break; - } - case 1: { - message.id = reader.string(); - break; - } - case 2: { - message.type = reader.string(); - break; - } - case 3: { - message.details = $root.google.protobuf.Any.decode(reader, reader.uint32()); - break; - } - case 4: { - message.state = reader.int32(); - break; - } - case 5: { - message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); - break; - } - case 6: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 7: { - message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 10: { - message.orchestrationResult = $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MigrationTask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.MigrationTask} MigrationTask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationTask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MigrationTask message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MigrationTask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.assessmentTaskDetails != null && message.hasOwnProperty("assessmentTaskDetails")) { - properties.taskDetails = 1; - { - var error = $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.verify(message.assessmentTaskDetails); - if (error) - return "assessmentTaskDetails." + error; - } - } - if (message.translationTaskDetails != null && message.hasOwnProperty("translationTaskDetails")) { - if (properties.taskDetails === 1) - return "taskDetails: multiple values"; - properties.taskDetails = 1; - { - var error = $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.verify(message.translationTaskDetails); - if (error) - return "translationTaskDetails." + error; - } - } - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.details != null && message.hasOwnProperty("details")) { - var error = $root.google.protobuf.Any.verify(message.details); - if (error) - return "details." + error; - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.processingError != null && message.hasOwnProperty("processingError")) { - var error = $root.google.rpc.ErrorInfo.verify(message.processingError); - if (error) - return "processingError." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); - if (error) - return "lastUpdateTime." + error; - } - if (message.orchestrationResult != null && message.hasOwnProperty("orchestrationResult")) { - var error = $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.verify(message.orchestrationResult); - if (error) - return "orchestrationResult." + error; - } - return null; - }; - - /** - * Creates a MigrationTask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.MigrationTask} MigrationTask - */ - MigrationTask.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.MigrationTask) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationTask(); - if (object.assessmentTaskDetails != null) { - if (typeof object.assessmentTaskDetails !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTask.assessmentTaskDetails: object expected"); - message.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.fromObject(object.assessmentTaskDetails); - } - if (object.translationTaskDetails != null) { - if (typeof object.translationTaskDetails !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTask.translationTaskDetails: object expected"); - message.translationTaskDetails = $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.fromObject(object.translationTaskDetails); - } - if (object.id != null) - message.id = String(object.id); - if (object.type != null) - message.type = String(object.type); - if (object.details != null) { - if (typeof object.details !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTask.details: object expected"); - message.details = $root.google.protobuf.Any.fromObject(object.details); - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "PENDING": - case 1: - message.state = 1; - break; - case "ORCHESTRATING": - case 2: - message.state = 2; - break; - case "RUNNING": - case 3: - message.state = 3; - break; - case "PAUSED": - case 4: - message.state = 4; - break; - case "SUCCEEDED": - case 5: - message.state = 5; - break; - case "FAILED": - case 6: - message.state = 6; - break; - } - if (object.processingError != null) { - if (typeof object.processingError !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTask.processingError: object expected"); - message.processingError = $root.google.rpc.ErrorInfo.fromObject(object.processingError); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTask.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.lastUpdateTime != null) { - if (typeof object.lastUpdateTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTask.lastUpdateTime: object expected"); - message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); - } - if (object.orchestrationResult != null) { - if (typeof object.orchestrationResult !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTask.orchestrationResult: object expected"); - message.orchestrationResult = $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.fromObject(object.orchestrationResult); - } - return message; - }; - - /** - * Creates a plain object from a MigrationTask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @static - * @param {google.cloud.bigquery.migration.v2alpha.MigrationTask} message MigrationTask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MigrationTask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.id = ""; - object.type = ""; - object.details = null; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.processingError = null; - object.createTime = null; - object.lastUpdateTime = null; - object.orchestrationResult = null; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.details != null && message.hasOwnProperty("details")) - object.details = $root.google.protobuf.Any.toObject(message.details, options); - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.MigrationTask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2alpha.MigrationTask.State[message.state] : message.state; - if (message.processingError != null && message.hasOwnProperty("processingError")) - object.processingError = $root.google.rpc.ErrorInfo.toObject(message.processingError, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) - object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); - if (message.orchestrationResult != null && message.hasOwnProperty("orchestrationResult")) - object.orchestrationResult = $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.toObject(message.orchestrationResult, options); - if (message.assessmentTaskDetails != null && message.hasOwnProperty("assessmentTaskDetails")) { - object.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2alpha.AssessmentTaskDetails.toObject(message.assessmentTaskDetails, options); - if (options.oneofs) - object.taskDetails = "assessmentTaskDetails"; - } - if (message.translationTaskDetails != null && message.hasOwnProperty("translationTaskDetails")) { - object.translationTaskDetails = $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.toObject(message.translationTaskDetails, options); - if (options.oneofs) - object.taskDetails = "translationTaskDetails"; - } - return object; - }; - - /** - * Converts this MigrationTask to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @instance - * @returns {Object.} JSON object - */ - MigrationTask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MigrationTask - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MigrationTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.MigrationTask"; - }; - - /** - * State enum. - * @name google.cloud.bigquery.migration.v2alpha.MigrationTask.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} ORCHESTRATING=2 ORCHESTRATING value - * @property {number} RUNNING=3 RUNNING value - * @property {number} PAUSED=4 PAUSED value - * @property {number} SUCCEEDED=5 SUCCEEDED value - * @property {number} FAILED=6 FAILED value - */ - MigrationTask.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "ORCHESTRATING"] = 2; - values[valuesById[3] = "RUNNING"] = 3; - values[valuesById[4] = "PAUSED"] = 4; - values[valuesById[5] = "SUCCEEDED"] = 5; - values[valuesById[6] = "FAILED"] = 6; - return values; - })(); - - return MigrationTask; - })(); - - v2alpha.MigrationSubtask = (function() { - - /** - * Properties of a MigrationSubtask. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IMigrationSubtask - * @property {string|null} [name] MigrationSubtask name - * @property {string|null} [taskId] MigrationSubtask taskId - * @property {string|null} [type] MigrationSubtask type - * @property {google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State|null} [state] MigrationSubtask state - * @property {google.rpc.IErrorInfo|null} [processingError] MigrationSubtask processingError - * @property {Array.|null} [resourceErrorDetails] MigrationSubtask resourceErrorDetails - * @property {number|null} [resourceErrorCount] MigrationSubtask resourceErrorCount - * @property {google.protobuf.ITimestamp|null} [createTime] MigrationSubtask createTime - * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationSubtask lastUpdateTime - * @property {Array.|null} [metrics] MigrationSubtask metrics - */ - - /** - * Constructs a new MigrationSubtask. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a MigrationSubtask. - * @implements IMigrationSubtask - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationSubtask=} [properties] Properties to set - */ - function MigrationSubtask(properties) { - this.resourceErrorDetails = []; - this.metrics = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * MigrationSubtask name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.name = ""; - - /** - * MigrationSubtask taskId. - * @member {string} taskId - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.taskId = ""; - - /** - * MigrationSubtask type. - * @member {string} type - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.type = ""; - - /** - * MigrationSubtask state. - * @member {google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State} state - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.state = 0; - - /** - * MigrationSubtask processingError. - * @member {google.rpc.IErrorInfo|null|undefined} processingError - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.processingError = null; - - /** - * MigrationSubtask resourceErrorDetails. - * @member {Array.} resourceErrorDetails - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.resourceErrorDetails = $util.emptyArray; - - /** - * MigrationSubtask resourceErrorCount. - * @member {number} resourceErrorCount - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.resourceErrorCount = 0; - - /** - * MigrationSubtask createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.createTime = null; - - /** - * MigrationSubtask lastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.lastUpdateTime = null; - - /** - * MigrationSubtask metrics. - * @member {Array.} metrics - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @instance - */ - MigrationSubtask.prototype.metrics = $util.emptyArray; - - /** - * Creates a new MigrationSubtask instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationSubtask=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.MigrationSubtask} MigrationSubtask instance - */ - MigrationSubtask.create = function create(properties) { - return new MigrationSubtask(properties); - }; - - /** - * Encodes the specified MigrationSubtask message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationSubtask.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationSubtask} message MigrationSubtask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationSubtask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.taskId != null && Object.hasOwnProperty.call(message, "taskId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); - if (message.processingError != null && Object.hasOwnProperty.call(message, "processingError")) - $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.cloud.bigquery.migration.v2alpha.TimeSeries.encode(message.metrics[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.resourceErrorDetails != null && message.resourceErrorDetails.length) - for (var i = 0; i < message.resourceErrorDetails.length; ++i) - $root.google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.encode(message.resourceErrorDetails[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.resourceErrorCount != null && Object.hasOwnProperty.call(message, "resourceErrorCount")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.resourceErrorCount); - return writer; - }; - - /** - * Encodes the specified MigrationSubtask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationSubtask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationSubtask} message MigrationSubtask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationSubtask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MigrationSubtask message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2alpha.MigrationSubtask} MigrationSubtask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationSubtask.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.taskId = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.state = reader.int32(); - break; - } - case 6: { - message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - if (!(message.resourceErrorDetails && message.resourceErrorDetails.length)) - message.resourceErrorDetails = []; - message.resourceErrorDetails.push($root.google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.decode(reader, reader.uint32())); - break; - } - case 13: { - message.resourceErrorCount = reader.int32(); - break; - } - case 7: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.cloud.bigquery.migration.v2alpha.TimeSeries.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MigrationSubtask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.MigrationSubtask} MigrationSubtask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationSubtask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MigrationSubtask message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MigrationSubtask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.taskId != null && message.hasOwnProperty("taskId")) - if (!$util.isString(message.taskId)) - return "taskId: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.processingError != null && message.hasOwnProperty("processingError")) { - var error = $root.google.rpc.ErrorInfo.verify(message.processingError); - if (error) - return "processingError." + error; - } - if (message.resourceErrorDetails != null && message.hasOwnProperty("resourceErrorDetails")) { - if (!Array.isArray(message.resourceErrorDetails)) - return "resourceErrorDetails: array expected"; - for (var i = 0; i < message.resourceErrorDetails.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2alpha.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.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); - if (error) - return "lastUpdateTime." + error; - } - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2alpha.TimeSeries.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - return null; - }; - - /** - * Creates a MigrationSubtask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.MigrationSubtask} MigrationSubtask - */ - MigrationSubtask.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(); - if (object.name != null) - message.name = String(object.name); - if (object.taskId != null) - message.taskId = String(object.taskId); - if (object.type != null) - message.type = String(object.type); - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "ACTIVE": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "SUCCEEDED": - case 3: - message.state = 3; - break; - case "FAILED": - case 4: - message.state = 4; - break; - case "PAUSED": - case 5: - message.state = 5; - break; - } - if (object.processingError != null) { - if (typeof object.processingError !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationSubtask.processingError: object expected"); - message.processingError = $root.google.rpc.ErrorInfo.fromObject(object.processingError); - } - if (object.resourceErrorDetails) { - if (!Array.isArray(object.resourceErrorDetails)) - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationSubtask.resourceErrorDetails: array expected"); - message.resourceErrorDetails = []; - for (var i = 0; i < object.resourceErrorDetails.length; ++i) { - if (typeof object.resourceErrorDetails[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationSubtask.resourceErrorDetails: object expected"); - message.resourceErrorDetails[i] = $root.google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.fromObject(object.resourceErrorDetails[i]); - } - } - if (object.resourceErrorCount != null) - message.resourceErrorCount = object.resourceErrorCount | 0; - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationSubtask.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.lastUpdateTime != null) { - if (typeof object.lastUpdateTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationSubtask.lastUpdateTime: object expected"); - message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); - } - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationSubtask.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationSubtask.metrics: object expected"); - message.metrics[i] = $root.google.cloud.bigquery.migration.v2alpha.TimeSeries.fromObject(object.metrics[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a MigrationSubtask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @static - * @param {google.cloud.bigquery.migration.v2alpha.MigrationSubtask} message MigrationSubtask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MigrationSubtask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.metrics = []; - object.resourceErrorDetails = []; - } - if (options.defaults) { - object.name = ""; - object.taskId = ""; - object.type = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.processingError = null; - object.createTime = null; - object.lastUpdateTime = null; - object.resourceErrorCount = 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.taskId != null && message.hasOwnProperty("taskId")) - object.taskId = message.taskId; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State[message.state] : message.state; - if (message.processingError != null && message.hasOwnProperty("processingError")) - object.processingError = $root.google.rpc.ErrorInfo.toObject(message.processingError, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) - object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.cloud.bigquery.migration.v2alpha.TimeSeries.toObject(message.metrics[j], options); - } - if (message.resourceErrorDetails && message.resourceErrorDetails.length) { - object.resourceErrorDetails = []; - for (var j = 0; j < message.resourceErrorDetails.length; ++j) - object.resourceErrorDetails[j] = $root.google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.toObject(message.resourceErrorDetails[j], options); - } - if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) - object.resourceErrorCount = message.resourceErrorCount; - return object; - }; - - /** - * Converts this MigrationSubtask to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @instance - * @returns {Object.} JSON object - */ - MigrationSubtask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MigrationSubtask - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationSubtask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MigrationSubtask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.MigrationSubtask"; - }; - - /** - * State enum. - * @name google.cloud.bigquery.migration.v2alpha.MigrationSubtask.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} RUNNING=2 RUNNING value - * @property {number} SUCCEEDED=3 SUCCEEDED value - * @property {number} FAILED=4 FAILED value - * @property {number} PAUSED=5 PAUSED value - */ - MigrationSubtask.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "SUCCEEDED"] = 3; - values[valuesById[4] = "FAILED"] = 4; - values[valuesById[5] = "PAUSED"] = 5; - return values; - })(); - - return MigrationSubtask; - })(); - - v2alpha.MigrationTaskOrchestrationResult = (function() { - - /** - * Properties of a MigrationTaskOrchestrationResult. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IMigrationTaskOrchestrationResult - * @property {google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails|null} [assessmentDetails] MigrationTaskOrchestrationResult assessmentDetails - */ - - /** - * Constructs a new MigrationTaskOrchestrationResult. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a MigrationTaskOrchestrationResult. - * @implements IMigrationTaskOrchestrationResult - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult=} [properties] Properties to set - */ - function MigrationTaskOrchestrationResult(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]]; - } - - /** - * MigrationTaskOrchestrationResult assessmentDetails. - * @member {google.cloud.bigquery.migration.v2alpha.IAssessmentOrchestrationResultDetails|null|undefined} assessmentDetails - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult - * @instance - */ - MigrationTaskOrchestrationResult.prototype.assessmentDetails = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * MigrationTaskOrchestrationResult details. - * @member {"assessmentDetails"|undefined} details - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult - * @instance - */ - Object.defineProperty(MigrationTaskOrchestrationResult.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["assessmentDetails"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new MigrationTaskOrchestrationResult instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult} MigrationTaskOrchestrationResult instance - */ - MigrationTaskOrchestrationResult.create = function create(properties) { - return new MigrationTaskOrchestrationResult(properties); - }; - - /** - * Encodes the specified MigrationTaskOrchestrationResult message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult} message MigrationTaskOrchestrationResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationTaskOrchestrationResult.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.assessmentDetails != null && Object.hasOwnProperty.call(message, "assessmentDetails")) - $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.encode(message.assessmentDetails, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MigrationTaskOrchestrationResult message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IMigrationTaskOrchestrationResult} message MigrationTaskOrchestrationResult message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MigrationTaskOrchestrationResult.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MigrationTaskOrchestrationResult message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult - * @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.v2alpha.MigrationTaskOrchestrationResult} MigrationTaskOrchestrationResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationTaskOrchestrationResult.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.assessmentDetails = $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MigrationTaskOrchestrationResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult} MigrationTaskOrchestrationResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationTaskOrchestrationResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MigrationTaskOrchestrationResult message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MigrationTaskOrchestrationResult.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.assessmentDetails != null && message.hasOwnProperty("assessmentDetails")) { - properties.details = 1; - { - var error = $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.verify(message.assessmentDetails); - if (error) - return "assessmentDetails." + error; - } - } - return null; - }; - - /** - * Creates a MigrationTaskOrchestrationResult message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult} MigrationTaskOrchestrationResult - */ - MigrationTaskOrchestrationResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult(); - if (object.assessmentDetails != null) { - if (typeof object.assessmentDetails !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult.assessmentDetails: object expected"); - message.assessmentDetails = $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.fromObject(object.assessmentDetails); - } - return message; - }; - - /** - * Creates a plain object from a MigrationTaskOrchestrationResult message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult - * @static - * @param {google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult} message MigrationTaskOrchestrationResult - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MigrationTaskOrchestrationResult.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.assessmentDetails != null && message.hasOwnProperty("assessmentDetails")) { - object.assessmentDetails = $root.google.cloud.bigquery.migration.v2alpha.AssessmentOrchestrationResultDetails.toObject(message.assessmentDetails, options); - if (options.oneofs) - object.details = "assessmentDetails"; - } - return object; - }; - - /** - * Converts this MigrationTaskOrchestrationResult to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult - * @instance - * @returns {Object.} JSON object - */ - MigrationTaskOrchestrationResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MigrationTaskOrchestrationResult - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MigrationTaskOrchestrationResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.MigrationTaskOrchestrationResult"; - }; - - return MigrationTaskOrchestrationResult; - })(); - - v2alpha.ResourceErrorDetail = (function() { - - /** - * Properties of a ResourceErrorDetail. - * @memberof google.cloud.bigquery.migration.v2alpha - * @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 ResourceErrorDetail. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a ResourceErrorDetail. - * @implements IResourceErrorDetail - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail=} [properties] Properties to set - */ - function ResourceErrorDetail(properties) { - this.errorDetails = []; - 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]]; - } - - /** - * ResourceErrorDetail resourceInfo. - * @member {google.rpc.IResourceInfo|null|undefined} resourceInfo - * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail - * @instance - */ - ResourceErrorDetail.prototype.resourceInfo = null; - - /** - * ResourceErrorDetail errorDetails. - * @member {Array.} errorDetails - * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail - * @instance - */ - ResourceErrorDetail.prototype.errorDetails = $util.emptyArray; - - /** - * ResourceErrorDetail errorCount. - * @member {number} errorCount - * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail - * @instance - */ - ResourceErrorDetail.prototype.errorCount = 0; - - /** - * Creates a new ResourceErrorDetail instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail} ResourceErrorDetail instance - */ - ResourceErrorDetail.create = function create(properties) { - return new ResourceErrorDetail(properties); - }; - - /** - * Encodes the specified ResourceErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail} message ResourceErrorDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceErrorDetail.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.v2alpha.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 ResourceErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IResourceErrorDetail} message ResourceErrorDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceErrorDetail message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.ResourceErrorDetail} ResourceErrorDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceErrorDetail.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.resourceInfo = $root.google.rpc.ResourceInfo.decode(reader, reader.uint32()); - break; - } - case 2: { - if (!(message.errorDetails && message.errorDetails.length)) - message.errorDetails = []; - message.errorDetails.push($root.google.cloud.bigquery.migration.v2alpha.ErrorDetail.decode(reader, reader.uint32())); - break; - } - case 3: { - message.errorCount = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceErrorDetail message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail} ResourceErrorDetail - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceErrorDetail message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail - * @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) { - 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.v2alpha.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.v2alpha.ResourceErrorDetail - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail} ResourceErrorDetail - */ - ResourceErrorDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail(); - if (object.resourceInfo != null) { - if (typeof object.resourceInfo !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.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.v2alpha.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.v2alpha.ResourceErrorDetail.errorDetails: object expected"); - message.errorDetails[i] = $root.google.cloud.bigquery.migration.v2alpha.ErrorDetail.fromObject(object.errorDetails[i]); - } - } - 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. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail} message ResourceErrorDetail - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceErrorDetail.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.v2alpha.ErrorDetail.toObject(message.errorDetails[j], options); - } - if (message.errorCount != null && message.hasOwnProperty("errorCount")) - object.errorCount = message.errorCount; - return object; - }; - - /** - * Converts this ResourceErrorDetail to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail - * @instance - * @returns {Object.} JSON object - */ - ResourceErrorDetail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceErrorDetail - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.ResourceErrorDetail"; - }; - - return ResourceErrorDetail; - })(); - - v2alpha.ErrorDetail = (function() { - - /** - * Properties of an ErrorDetail. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IErrorDetail - * @property {google.cloud.bigquery.migration.v2alpha.IErrorLocation|null} [location] ErrorDetail location - * @property {google.rpc.IErrorInfo|null} [errorInfo] ErrorDetail errorInfo - */ - - /** - * Constructs a new ErrorDetail. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents an ErrorDetail. - * @implements IErrorDetail - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IErrorDetail=} [properties] Properties to set - */ - function ErrorDetail(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ErrorDetail location. - * @member {google.cloud.bigquery.migration.v2alpha.IErrorLocation|null|undefined} location - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail - * @instance - */ - ErrorDetail.prototype.location = null; - - /** - * ErrorDetail errorInfo. - * @member {google.rpc.IErrorInfo|null|undefined} errorInfo - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail - * @instance - */ - ErrorDetail.prototype.errorInfo = null; - - /** - * Creates a new ErrorDetail instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IErrorDetail=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.ErrorDetail} ErrorDetail instance - */ - ErrorDetail.create = function create(properties) { - return new ErrorDetail(properties); - }; - - /** - * Encodes the specified ErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorDetail.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IErrorDetail} message ErrorDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ErrorDetail.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - $root.google.cloud.bigquery.migration.v2alpha.ErrorLocation.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.errorInfo != null && Object.hasOwnProperty.call(message, "errorInfo")) - $root.google.rpc.ErrorInfo.encode(message.errorInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorDetail.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IErrorDetail} message ErrorDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ErrorDetail message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.ErrorDetail} ErrorDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ErrorDetail.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.ErrorDetail(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.location = $root.google.cloud.bigquery.migration.v2alpha.ErrorLocation.decode(reader, reader.uint32()); - break; - } - case 2: { - message.errorInfo = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ErrorDetail message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.ErrorDetail} ErrorDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ErrorDetail.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ErrorDetail message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ErrorDetail.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - var error = $root.google.cloud.bigquery.migration.v2alpha.ErrorLocation.verify(message.location); - if (error) - return "location." + error; - } - if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) { - var error = $root.google.rpc.ErrorInfo.verify(message.errorInfo); - if (error) - return "errorInfo." + error; - } - return null; - }; - - /** - * Creates an ErrorDetail message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.ErrorDetail} ErrorDetail - */ - ErrorDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.ErrorDetail) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.ErrorDetail(); - if (object.location != null) { - if (typeof object.location !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.ErrorDetail.location: object expected"); - message.location = $root.google.cloud.bigquery.migration.v2alpha.ErrorLocation.fromObject(object.location); - } - if (object.errorInfo != null) { - if (typeof object.errorInfo !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.ErrorDetail.errorInfo: object expected"); - message.errorInfo = $root.google.rpc.ErrorInfo.fromObject(object.errorInfo); - } - return message; - }; - - /** - * Creates a plain object from an ErrorDetail message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ErrorDetail} message ErrorDetail - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ErrorDetail.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.location = null; - object.errorInfo = null; - } - if (message.location != null && message.hasOwnProperty("location")) - object.location = $root.google.cloud.bigquery.migration.v2alpha.ErrorLocation.toObject(message.location, options); - if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) - object.errorInfo = $root.google.rpc.ErrorInfo.toObject(message.errorInfo, options); - return object; - }; - - /** - * Converts this ErrorDetail to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail - * @instance - * @returns {Object.} JSON object - */ - ErrorDetail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ErrorDetail - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorDetail - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.ErrorDetail"; - }; - - return ErrorDetail; - })(); - - v2alpha.ErrorLocation = (function() { - - /** - * Properties of an ErrorLocation. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IErrorLocation - * @property {number|null} [line] ErrorLocation line - * @property {number|null} [column] ErrorLocation column - */ - - /** - * Constructs a new ErrorLocation. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents an ErrorLocation. - * @implements IErrorLocation - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IErrorLocation=} [properties] Properties to set - */ - function ErrorLocation(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]]; - } - - /** - * ErrorLocation line. - * @member {number} line - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation - * @instance - */ - ErrorLocation.prototype.line = 0; - - /** - * ErrorLocation column. - * @member {number} column - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation - * @instance - */ - ErrorLocation.prototype.column = 0; - - /** - * Creates a new ErrorLocation instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IErrorLocation=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.ErrorLocation} ErrorLocation instance - */ - ErrorLocation.create = function create(properties) { - return new ErrorLocation(properties); - }; - - /** - * Encodes the specified ErrorLocation message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorLocation.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IErrorLocation} message ErrorLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ErrorLocation.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); - return writer; - }; - - /** - * Encodes the specified ErrorLocation message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ErrorLocation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IErrorLocation} message ErrorLocation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ErrorLocation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ErrorLocation message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.ErrorLocation} ErrorLocation - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.ErrorLocation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.line = reader.int32(); - break; - } - case 2: { - message.column = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ErrorLocation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.ErrorLocation} ErrorLocation - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ErrorLocation message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation - * @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) { - 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.v2alpha.ErrorLocation - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.ErrorLocation} ErrorLocation - */ - ErrorLocation.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.ErrorLocation) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.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 an ErrorLocation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ErrorLocation} message ErrorLocation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ErrorLocation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.line = 0; - object.column = 0; - } - 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 ErrorLocation to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation - * @instance - * @returns {Object.} JSON object - */ - ErrorLocation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ErrorLocation - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.ErrorLocation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ErrorLocation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.ErrorLocation"; - }; - - return ErrorLocation; - })(); - - v2alpha.TimeSeries = (function() { - - /** - * Properties of a TimeSeries. - * @memberof google.cloud.bigquery.migration.v2alpha - * @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 TimeSeries. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a TimeSeries. - * @implements ITimeSeries - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.ITimeSeries=} [properties] Properties to set - */ - function TimeSeries(properties) { - this.points = []; - 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]]; - } - - /** - * TimeSeries metric. - * @member {string} metric - * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries - * @instance - */ - TimeSeries.prototype.metric = ""; - - /** - * TimeSeries valueType. - * @member {google.api.MetricDescriptor.ValueType} valueType - * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries - * @instance - */ - TimeSeries.prototype.valueType = 0; - - /** - * TimeSeries metricKind. - * @member {google.api.MetricDescriptor.MetricKind} metricKind - * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries - * @instance - */ - TimeSeries.prototype.metricKind = 0; - - /** - * TimeSeries points. - * @member {Array.} points - * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries - * @instance - */ - TimeSeries.prototype.points = $util.emptyArray; - - /** - * Creates a new TimeSeries instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITimeSeries=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.TimeSeries} TimeSeries instance - */ - TimeSeries.create = function create(properties) { - return new TimeSeries(properties); - }; - - /** - * Encodes the specified TimeSeries message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeSeries.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITimeSeries} message TimeSeries message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeSeries.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.v2alpha.Point.encode(message.points[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified TimeSeries message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeSeries.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITimeSeries} message TimeSeries message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeSeries.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TimeSeries message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.TimeSeries} TimeSeries - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TimeSeries(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.metric = reader.string(); - 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.v2alpha.Point.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TimeSeries message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.TimeSeries} TimeSeries - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TimeSeries message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries - * @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) { - 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.v2alpha.Point.verify(message.points[i]); - if (error) - return "points." + error; - } - } - return null; - }; - - /** - * Creates a TimeSeries message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.TimeSeries} TimeSeries - */ - TimeSeries.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TimeSeries) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.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; - } - if (object.points) { - if (!Array.isArray(object.points)) - throw TypeError(".google.cloud.bigquery.migration.v2alpha.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.v2alpha.TimeSeries.points: object expected"); - message.points[i] = $root.google.cloud.bigquery.migration.v2alpha.Point.fromObject(object.points[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a TimeSeries message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries - * @static - * @param {google.cloud.bigquery.migration.v2alpha.TimeSeries} message TimeSeries - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimeSeries.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.v2alpha.Point.toObject(message.points[j], options); - } - return object; - }; - - /** - * Converts this TimeSeries to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries - * @instance - * @returns {Object.} JSON object - */ - TimeSeries.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TimeSeries - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.TimeSeries - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TimeSeries.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.TimeSeries"; - }; - - return TimeSeries; - })(); - - v2alpha.Point = (function() { - - /** - * Properties of a Point. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IPoint - * @property {google.cloud.bigquery.migration.v2alpha.ITimeInterval|null} [interval] Point interval - * @property {google.cloud.bigquery.migration.v2alpha.ITypedValue|null} [value] Point value - */ - - /** - * Constructs a new Point. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a Point. - * @implements IPoint - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IPoint=} [properties] Properties to set - */ - function Point(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]]; - } - - /** - * Point interval. - * @member {google.cloud.bigquery.migration.v2alpha.ITimeInterval|null|undefined} interval - * @memberof google.cloud.bigquery.migration.v2alpha.Point - * @instance - */ - Point.prototype.interval = null; - - /** - * Point value. - * @member {google.cloud.bigquery.migration.v2alpha.ITypedValue|null|undefined} value - * @memberof google.cloud.bigquery.migration.v2alpha.Point - * @instance - */ - Point.prototype.value = null; - - /** - * Creates a new Point instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.Point - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IPoint=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.Point} Point instance - */ - Point.create = function create(properties) { - return new Point(properties); - }; - - /** - * Encodes the specified Point message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Point.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.Point - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IPoint} message Point message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Point.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.interval != null && Object.hasOwnProperty.call(message, "interval")) - $root.google.cloud.bigquery.migration.v2alpha.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.v2alpha.TypedValue.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Point message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Point.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.Point - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IPoint} message Point message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Point.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Point message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.Point} Point - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.Point(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.interval = $root.google.cloud.bigquery.migration.v2alpha.TimeInterval.decode(reader, reader.uint32()); - break; - } - case 2: { - message.value = $root.google.cloud.bigquery.migration.v2alpha.TypedValue.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Point message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.Point - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.Point} Point - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Point message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.Point - * @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) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.interval != null && message.hasOwnProperty("interval")) { - var error = $root.google.cloud.bigquery.migration.v2alpha.TimeInterval.verify(message.interval); - if (error) - return "interval." + error; - } - if (message.value != null && message.hasOwnProperty("value")) { - var error = $root.google.cloud.bigquery.migration.v2alpha.TypedValue.verify(message.value); - if (error) - return "value." + error; - } - return null; - }; - - /** - * Creates a Point message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.Point - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.Point} Point - */ - Point.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.Point) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.Point(); - if (object.interval != null) { - if (typeof object.interval !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.Point.interval: object expected"); - message.interval = $root.google.cloud.bigquery.migration.v2alpha.TimeInterval.fromObject(object.interval); - } - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.Point.value: object expected"); - message.value = $root.google.cloud.bigquery.migration.v2alpha.TypedValue.fromObject(object.value); - } - return message; - }; - - /** - * Creates a plain object from a Point message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.Point - * @static - * @param {google.cloud.bigquery.migration.v2alpha.Point} message Point - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Point.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.interval = null; - object.value = null; - } - if (message.interval != null && message.hasOwnProperty("interval")) - object.interval = $root.google.cloud.bigquery.migration.v2alpha.TimeInterval.toObject(message.interval, options); - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.cloud.bigquery.migration.v2alpha.TypedValue.toObject(message.value, options); - return object; - }; - - /** - * Converts this Point to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.Point - * @instance - * @returns {Object.} JSON object - */ - Point.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Point - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.Point - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Point.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.Point"; - }; - - return Point; - })(); - - v2alpha.TimeInterval = (function() { - - /** - * Properties of a TimeInterval. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface ITimeInterval - * @property {google.protobuf.ITimestamp|null} [startTime] TimeInterval startTime - * @property {google.protobuf.ITimestamp|null} [endTime] TimeInterval endTime - */ - - /** - * Constructs a new TimeInterval. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a TimeInterval. - * @implements ITimeInterval - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.ITimeInterval=} [properties] Properties to set - */ - function TimeInterval(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]]; - } - - /** - * TimeInterval startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval - * @instance - */ - TimeInterval.prototype.startTime = null; - - /** - * TimeInterval endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval - * @instance - */ - TimeInterval.prototype.endTime = null; - - /** - * Creates a new TimeInterval instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITimeInterval=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.TimeInterval} TimeInterval instance - */ - TimeInterval.create = function create(properties) { - return new TimeInterval(properties); - }; - - /** - * Encodes the specified TimeInterval message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeInterval.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITimeInterval} message TimeInterval message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - 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; - }; - - /** - * Encodes the specified TimeInterval message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TimeInterval.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITimeInterval} message TimeInterval message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TimeInterval.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TimeInterval message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.TimeInterval} TimeInterval - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TimeInterval(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 2: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TimeInterval message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.TimeInterval} TimeInterval - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TimeInterval message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval - * @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) { - 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; - } - return null; - }; - - /** - * Creates a TimeInterval message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.TimeInterval} TimeInterval - */ - TimeInterval.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TimeInterval) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.TimeInterval(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.TimeInterval.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.TimeInterval.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); - } - return message; - }; - - /** - * Creates a plain object from a TimeInterval message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval - * @static - * @param {google.cloud.bigquery.migration.v2alpha.TimeInterval} message TimeInterval - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TimeInterval.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.startTime = null; - object.endTime = null; - } - 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. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval - * @instance - * @returns {Object.} JSON object - */ - TimeInterval.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TimeInterval - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.TimeInterval - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TimeInterval.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.TimeInterval"; - }; - - return TimeInterval; - })(); - - v2alpha.TypedValue = (function() { - - /** - * Properties of a TypedValue. - * @memberof google.cloud.bigquery.migration.v2alpha - * @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 TypedValue. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a TypedValue. - * @implements ITypedValue - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.ITypedValue=} [properties] Properties to set - */ - function TypedValue(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]]; - } - - /** - * TypedValue boolValue. - * @member {boolean|null|undefined} boolValue - * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue - * @instance - */ - TypedValue.prototype.boolValue = null; - - /** - * TypedValue int64Value. - * @member {number|Long|null|undefined} int64Value - * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue - * @instance - */ - TypedValue.prototype.int64Value = null; - - /** - * TypedValue doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue - * @instance - */ - TypedValue.prototype.doubleValue = null; - - /** - * TypedValue stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue - * @instance - */ - TypedValue.prototype.stringValue = null; - - /** - * TypedValue distributionValue. - * @member {google.api.IDistribution|null|undefined} distributionValue - * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue - * @instance - */ - TypedValue.prototype.distributionValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TypedValue value. - * @member {"boolValue"|"int64Value"|"doubleValue"|"stringValue"|"distributionValue"|undefined} value - * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue - * @instance - */ - Object.defineProperty(TypedValue.prototype, "value", { - get: $util.oneOfGetter($oneOfFields = ["boolValue", "int64Value", "doubleValue", "stringValue", "distributionValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TypedValue instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITypedValue=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.TypedValue} TypedValue instance - */ - TypedValue.create = function create(properties) { - return new TypedValue(properties); - }; - - /** - * Encodes the specified TypedValue message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TypedValue.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITypedValue} message TypedValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TypedValue.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(); - return writer; - }; - - /** - * Encodes the specified TypedValue message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TypedValue.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITypedValue} message TypedValue message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TypedValue.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TypedValue message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.TypedValue} TypedValue - * @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, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TypedValue(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.boolValue = reader.bool(); - 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()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TypedValue message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.TypedValue} TypedValue - * @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) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TypedValue message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.TypedValue - * @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) { - 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.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; - } - } - 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.v2alpha.TypedValue - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.TypedValue} TypedValue - */ - TypedValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TypedValue) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.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.v2alpha.TypedValue.distributionValue: object expected"); - message.distributionValue = $root.google.api.Distribution.fromObject(object.distributionValue); - } - 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.v2alpha.TypedValue - * @static - * @param {google.cloud.bigquery.migration.v2alpha.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.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"; - } - return object; - }; - - /** - * Converts this TypedValue to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.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.v2alpha.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.v2alpha.TypedValue"; - }; - - return TypedValue; - })(); - - v2alpha.TranslationFileMapping = (function() { - - /** - * Properties of a TranslationFileMapping. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface ITranslationFileMapping - * @property {string|null} [inputPath] TranslationFileMapping inputPath - * @property {string|null} [outputPath] TranslationFileMapping outputPath - */ - - /** - * Constructs a new TranslationFileMapping. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a TranslationFileMapping. - * @implements ITranslationFileMapping - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping=} [properties] Properties to set - */ - function TranslationFileMapping(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]]; - } - - /** - * TranslationFileMapping inputPath. - * @member {string} inputPath - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping - * @instance - */ - TranslationFileMapping.prototype.inputPath = ""; - - /** - * TranslationFileMapping outputPath. - * @member {string} outputPath - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping - * @instance - */ - TranslationFileMapping.prototype.outputPath = ""; - - /** - * Creates a new TranslationFileMapping instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.TranslationFileMapping} TranslationFileMapping instance - */ - TranslationFileMapping.create = function create(properties) { - return new TranslationFileMapping(properties); - }; - - /** - * Encodes the specified TranslationFileMapping message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping} message TranslationFileMapping message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TranslationFileMapping.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inputPath != null && Object.hasOwnProperty.call(message, "inputPath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputPath); - if (message.outputPath != null && Object.hasOwnProperty.call(message, "outputPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.outputPath); - return writer; - }; - - /** - * Encodes the specified TranslationFileMapping message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITranslationFileMapping} message TranslationFileMapping message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TranslationFileMapping.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TranslationFileMapping message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping - * @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.v2alpha.TranslationFileMapping} TranslationFileMapping - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranslationFileMapping.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.inputPath = reader.string(); - break; - } - case 2: { - message.outputPath = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TranslationFileMapping message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.TranslationFileMapping} TranslationFileMapping - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranslationFileMapping.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TranslationFileMapping message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TranslationFileMapping.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inputPath != null && message.hasOwnProperty("inputPath")) - if (!$util.isString(message.inputPath)) - return "inputPath: string expected"; - if (message.outputPath != null && message.hasOwnProperty("outputPath")) - if (!$util.isString(message.outputPath)) - return "outputPath: string expected"; - return null; - }; - - /** - * Creates a TranslationFileMapping message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.TranslationFileMapping} TranslationFileMapping - */ - TranslationFileMapping.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping(); - if (object.inputPath != null) - message.inputPath = String(object.inputPath); - if (object.outputPath != null) - message.outputPath = String(object.outputPath); - return message; - }; - - /** - * Creates a plain object from a TranslationFileMapping message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping - * @static - * @param {google.cloud.bigquery.migration.v2alpha.TranslationFileMapping} message TranslationFileMapping - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TranslationFileMapping.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.inputPath = ""; - object.outputPath = ""; - } - if (message.inputPath != null && message.hasOwnProperty("inputPath")) - object.inputPath = message.inputPath; - if (message.outputPath != null && message.hasOwnProperty("outputPath")) - object.outputPath = message.outputPath; - return object; - }; - - /** - * Converts this TranslationFileMapping to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping - * @instance - * @returns {Object.} JSON object - */ - TranslationFileMapping.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TranslationFileMapping - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationFileMapping - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TranslationFileMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.TranslationFileMapping"; - }; - - return TranslationFileMapping; - })(); - - v2alpha.TranslationTaskDetails = (function() { - - /** - * Properties of a TranslationTaskDetails. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface ITranslationTaskDetails - * @property {google.cloud.bigquery.migration.v2alpha.ITeradataOptions|null} [teradataOptions] TranslationTaskDetails teradataOptions - * @property {google.cloud.bigquery.migration.v2alpha.IBteqOptions|null} [bteqOptions] TranslationTaskDetails bteqOptions - * @property {string|null} [inputPath] TranslationTaskDetails inputPath - * @property {string|null} [outputPath] TranslationTaskDetails outputPath - * @property {Array.|null} [filePaths] TranslationTaskDetails filePaths - * @property {string|null} [schemaPath] TranslationTaskDetails schemaPath - * @property {google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding|null} [fileEncoding] TranslationTaskDetails fileEncoding - * @property {google.cloud.bigquery.migration.v2alpha.IIdentifierSettings|null} [identifierSettings] TranslationTaskDetails identifierSettings - * @property {Object.|null} [specialTokenMap] TranslationTaskDetails specialTokenMap - * @property {google.cloud.bigquery.migration.v2alpha.IFilter|null} [filter] TranslationTaskDetails filter - * @property {string|null} [translationExceptionTable] TranslationTaskDetails translationExceptionTable - */ - - /** - * Constructs a new TranslationTaskDetails. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a TranslationTaskDetails. - * @implements ITranslationTaskDetails - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails=} [properties] Properties to set - */ - function TranslationTaskDetails(properties) { - this.filePaths = []; - this.specialTokenMap = {}; - 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]]; - } - - /** - * TranslationTaskDetails teradataOptions. - * @member {google.cloud.bigquery.migration.v2alpha.ITeradataOptions|null|undefined} teradataOptions - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @instance - */ - TranslationTaskDetails.prototype.teradataOptions = null; - - /** - * TranslationTaskDetails bteqOptions. - * @member {google.cloud.bigquery.migration.v2alpha.IBteqOptions|null|undefined} bteqOptions - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @instance - */ - TranslationTaskDetails.prototype.bteqOptions = null; - - /** - * TranslationTaskDetails inputPath. - * @member {string} inputPath - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @instance - */ - TranslationTaskDetails.prototype.inputPath = ""; - - /** - * TranslationTaskDetails outputPath. - * @member {string} outputPath - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @instance - */ - TranslationTaskDetails.prototype.outputPath = ""; - - /** - * TranslationTaskDetails filePaths. - * @member {Array.} filePaths - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @instance - */ - TranslationTaskDetails.prototype.filePaths = $util.emptyArray; - - /** - * TranslationTaskDetails schemaPath. - * @member {string} schemaPath - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @instance - */ - TranslationTaskDetails.prototype.schemaPath = ""; - - /** - * TranslationTaskDetails fileEncoding. - * @member {google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding} fileEncoding - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @instance - */ - TranslationTaskDetails.prototype.fileEncoding = 0; - - /** - * TranslationTaskDetails identifierSettings. - * @member {google.cloud.bigquery.migration.v2alpha.IIdentifierSettings|null|undefined} identifierSettings - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @instance - */ - TranslationTaskDetails.prototype.identifierSettings = null; - - /** - * TranslationTaskDetails specialTokenMap. - * @member {Object.} specialTokenMap - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @instance - */ - TranslationTaskDetails.prototype.specialTokenMap = $util.emptyObject; - - /** - * TranslationTaskDetails filter. - * @member {google.cloud.bigquery.migration.v2alpha.IFilter|null|undefined} filter - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @instance - */ - TranslationTaskDetails.prototype.filter = null; - - /** - * TranslationTaskDetails translationExceptionTable. - * @member {string} translationExceptionTable - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @instance - */ - TranslationTaskDetails.prototype.translationExceptionTable = ""; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TranslationTaskDetails languageOptions. - * @member {"teradataOptions"|"bteqOptions"|undefined} languageOptions - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @instance - */ - Object.defineProperty(TranslationTaskDetails.prototype, "languageOptions", { - get: $util.oneOfGetter($oneOfFields = ["teradataOptions", "bteqOptions"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new TranslationTaskDetails instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails} TranslationTaskDetails instance - */ - TranslationTaskDetails.create = function create(properties) { - return new TranslationTaskDetails(properties); - }; - - /** - * Encodes the specified TranslationTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails} message TranslationTaskDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TranslationTaskDetails.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inputPath != null && Object.hasOwnProperty.call(message, "inputPath")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputPath); - if (message.outputPath != null && Object.hasOwnProperty.call(message, "outputPath")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.outputPath); - if (message.schemaPath != null && Object.hasOwnProperty.call(message, "schemaPath")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.schemaPath); - if (message.fileEncoding != null && Object.hasOwnProperty.call(message, "fileEncoding")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.fileEncoding); - if (message.identifierSettings != null && Object.hasOwnProperty.call(message, "identifierSettings")) - $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.encode(message.identifierSettings, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.specialTokenMap != null && Object.hasOwnProperty.call(message, "specialTokenMap")) - for (var keys = Object.keys(message.specialTokenMap), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.specialTokenMap[keys[i]]).ldelim(); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - $root.google.cloud.bigquery.migration.v2alpha.Filter.encode(message.filter, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.teradataOptions != null && Object.hasOwnProperty.call(message, "teradataOptions")) - $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions.encode(message.teradataOptions, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.bteqOptions != null && Object.hasOwnProperty.call(message, "bteqOptions")) - $root.google.cloud.bigquery.migration.v2alpha.BteqOptions.encode(message.bteqOptions, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.filePaths != null && message.filePaths.length) - for (var i = 0; i < message.filePaths.length; ++i) - $root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.encode(message.filePaths[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.translationExceptionTable != null && Object.hasOwnProperty.call(message, "translationExceptionTable")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.translationExceptionTable); - return writer; - }; - - /** - * Encodes the specified TranslationTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITranslationTaskDetails} message TranslationTaskDetails message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TranslationTaskDetails.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TranslationTaskDetails message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @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.v2alpha.TranslationTaskDetails} TranslationTaskDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranslationTaskDetails.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 10: { - message.teradataOptions = $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions.decode(reader, reader.uint32()); - break; - } - case 11: { - message.bteqOptions = $root.google.cloud.bigquery.migration.v2alpha.BteqOptions.decode(reader, reader.uint32()); - break; - } - case 1: { - message.inputPath = reader.string(); - break; - } - case 2: { - message.outputPath = reader.string(); - break; - } - case 12: { - if (!(message.filePaths && message.filePaths.length)) - message.filePaths = []; - message.filePaths.push($root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.decode(reader, reader.uint32())); - break; - } - case 3: { - message.schemaPath = reader.string(); - break; - } - case 4: { - message.fileEncoding = reader.int32(); - break; - } - case 5: { - message.identifierSettings = $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.decode(reader, reader.uint32()); - break; - } - case 6: { - if (message.specialTokenMap === $util.emptyObject) - message.specialTokenMap = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.int32(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.specialTokenMap[key] = value; - break; - } - case 7: { - message.filter = $root.google.cloud.bigquery.migration.v2alpha.Filter.decode(reader, reader.uint32()); - break; - } - case 13: { - message.translationExceptionTable = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TranslationTaskDetails message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails} TranslationTaskDetails - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranslationTaskDetails.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TranslationTaskDetails message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TranslationTaskDetails.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.teradataOptions != null && message.hasOwnProperty("teradataOptions")) { - properties.languageOptions = 1; - { - var error = $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions.verify(message.teradataOptions); - if (error) - return "teradataOptions." + error; - } - } - if (message.bteqOptions != null && message.hasOwnProperty("bteqOptions")) { - if (properties.languageOptions === 1) - return "languageOptions: multiple values"; - properties.languageOptions = 1; - { - var error = $root.google.cloud.bigquery.migration.v2alpha.BteqOptions.verify(message.bteqOptions); - if (error) - return "bteqOptions." + error; - } - } - if (message.inputPath != null && message.hasOwnProperty("inputPath")) - if (!$util.isString(message.inputPath)) - return "inputPath: string expected"; - if (message.outputPath != null && message.hasOwnProperty("outputPath")) - if (!$util.isString(message.outputPath)) - return "outputPath: string expected"; - if (message.filePaths != null && message.hasOwnProperty("filePaths")) { - if (!Array.isArray(message.filePaths)) - return "filePaths: array expected"; - for (var i = 0; i < message.filePaths.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.verify(message.filePaths[i]); - if (error) - return "filePaths." + error; - } - } - if (message.schemaPath != null && message.hasOwnProperty("schemaPath")) - if (!$util.isString(message.schemaPath)) - return "schemaPath: string expected"; - if (message.fileEncoding != null && message.hasOwnProperty("fileEncoding")) - switch (message.fileEncoding) { - default: - return "fileEncoding: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.identifierSettings != null && message.hasOwnProperty("identifierSettings")) { - var error = $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.verify(message.identifierSettings); - if (error) - return "identifierSettings." + error; - } - if (message.specialTokenMap != null && message.hasOwnProperty("specialTokenMap")) { - if (!$util.isObject(message.specialTokenMap)) - return "specialTokenMap: object expected"; - var key = Object.keys(message.specialTokenMap); - for (var i = 0; i < key.length; ++i) - switch (message.specialTokenMap[key[i]]) { - default: - return "specialTokenMap: enum value{k:string} expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - } - if (message.filter != null && message.hasOwnProperty("filter")) { - var error = $root.google.cloud.bigquery.migration.v2alpha.Filter.verify(message.filter); - if (error) - return "filter." + error; - } - if (message.translationExceptionTable != null && message.hasOwnProperty("translationExceptionTable")) - if (!$util.isString(message.translationExceptionTable)) - return "translationExceptionTable: string expected"; - return null; - }; - - /** - * Creates a TranslationTaskDetails message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails} TranslationTaskDetails - */ - TranslationTaskDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails(); - if (object.teradataOptions != null) { - if (typeof object.teradataOptions !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.teradataOptions: object expected"); - message.teradataOptions = $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions.fromObject(object.teradataOptions); - } - if (object.bteqOptions != null) { - if (typeof object.bteqOptions !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.bteqOptions: object expected"); - message.bteqOptions = $root.google.cloud.bigquery.migration.v2alpha.BteqOptions.fromObject(object.bteqOptions); - } - if (object.inputPath != null) - message.inputPath = String(object.inputPath); - if (object.outputPath != null) - message.outputPath = String(object.outputPath); - if (object.filePaths) { - if (!Array.isArray(object.filePaths)) - throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.filePaths: array expected"); - message.filePaths = []; - for (var i = 0; i < object.filePaths.length; ++i) { - if (typeof object.filePaths[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.filePaths: object expected"); - message.filePaths[i] = $root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.fromObject(object.filePaths[i]); - } - } - if (object.schemaPath != null) - message.schemaPath = String(object.schemaPath); - switch (object.fileEncoding) { - default: - if (typeof object.fileEncoding === "number") { - message.fileEncoding = object.fileEncoding; - break; - } - break; - case "FILE_ENCODING_UNSPECIFIED": - case 0: - message.fileEncoding = 0; - break; - case "UTF_8": - case 1: - message.fileEncoding = 1; - break; - case "ISO_8859_1": - case 2: - message.fileEncoding = 2; - break; - case "US_ASCII": - case 3: - message.fileEncoding = 3; - break; - case "UTF_16": - case 4: - message.fileEncoding = 4; - break; - case "UTF_16LE": - case 5: - message.fileEncoding = 5; - break; - case "UTF_16BE": - case 6: - message.fileEncoding = 6; - break; - } - if (object.identifierSettings != null) { - if (typeof object.identifierSettings !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.identifierSettings: object expected"); - message.identifierSettings = $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.fromObject(object.identifierSettings); - } - if (object.specialTokenMap) { - if (typeof object.specialTokenMap !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.specialTokenMap: object expected"); - message.specialTokenMap = {}; - for (var keys = Object.keys(object.specialTokenMap), i = 0; i < keys.length; ++i) - switch (object.specialTokenMap[keys[i]]) { - default: - if (typeof object.specialTokenMap[keys[i]] === "number") { - message.specialTokenMap[keys[i]] = object.specialTokenMap[keys[i]]; - break; - } - break; - case "TOKEN_TYPE_UNSPECIFIED": - case 0: - message.specialTokenMap[keys[i]] = 0; - break; - case "STRING": - case 1: - message.specialTokenMap[keys[i]] = 1; - break; - case "INT64": - case 2: - message.specialTokenMap[keys[i]] = 2; - break; - case "NUMERIC": - case 3: - message.specialTokenMap[keys[i]] = 3; - break; - case "BOOL": - case 4: - message.specialTokenMap[keys[i]] = 4; - break; - case "FLOAT64": - case 5: - message.specialTokenMap[keys[i]] = 5; - break; - case "DATE": - case 6: - message.specialTokenMap[keys[i]] = 6; - break; - case "TIMESTAMP": - case 7: - message.specialTokenMap[keys[i]] = 7; - break; - } - } - if (object.filter != null) { - if (typeof object.filter !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.filter: object expected"); - message.filter = $root.google.cloud.bigquery.migration.v2alpha.Filter.fromObject(object.filter); - } - if (object.translationExceptionTable != null) - message.translationExceptionTable = String(object.translationExceptionTable); - return message; - }; - - /** - * Creates a plain object from a TranslationTaskDetails message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @static - * @param {google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails} message TranslationTaskDetails - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TranslationTaskDetails.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.filePaths = []; - if (options.objects || options.defaults) - object.specialTokenMap = {}; - if (options.defaults) { - object.inputPath = ""; - object.outputPath = ""; - object.schemaPath = ""; - object.fileEncoding = options.enums === String ? "FILE_ENCODING_UNSPECIFIED" : 0; - object.identifierSettings = null; - object.filter = null; - object.translationExceptionTable = ""; - } - if (message.inputPath != null && message.hasOwnProperty("inputPath")) - object.inputPath = message.inputPath; - if (message.outputPath != null && message.hasOwnProperty("outputPath")) - object.outputPath = message.outputPath; - if (message.schemaPath != null && message.hasOwnProperty("schemaPath")) - object.schemaPath = message.schemaPath; - if (message.fileEncoding != null && message.hasOwnProperty("fileEncoding")) - object.fileEncoding = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding[message.fileEncoding] === undefined ? message.fileEncoding : $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding[message.fileEncoding] : message.fileEncoding; - if (message.identifierSettings != null && message.hasOwnProperty("identifierSettings")) - object.identifierSettings = $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.toObject(message.identifierSettings, options); - var keys2; - if (message.specialTokenMap && (keys2 = Object.keys(message.specialTokenMap)).length) { - object.specialTokenMap = {}; - for (var j = 0; j < keys2.length; ++j) - object.specialTokenMap[keys2[j]] = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.TokenType[message.specialTokenMap[keys2[j]]] === undefined ? message.specialTokenMap[keys2[j]] : $root.google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.TokenType[message.specialTokenMap[keys2[j]]] : message.specialTokenMap[keys2[j]]; - } - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = $root.google.cloud.bigquery.migration.v2alpha.Filter.toObject(message.filter, options); - if (message.teradataOptions != null && message.hasOwnProperty("teradataOptions")) { - object.teradataOptions = $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions.toObject(message.teradataOptions, options); - if (options.oneofs) - object.languageOptions = "teradataOptions"; - } - if (message.bteqOptions != null && message.hasOwnProperty("bteqOptions")) { - object.bteqOptions = $root.google.cloud.bigquery.migration.v2alpha.BteqOptions.toObject(message.bteqOptions, options); - if (options.oneofs) - object.languageOptions = "bteqOptions"; - } - if (message.filePaths && message.filePaths.length) { - object.filePaths = []; - for (var j = 0; j < message.filePaths.length; ++j) - object.filePaths[j] = $root.google.cloud.bigquery.migration.v2alpha.TranslationFileMapping.toObject(message.filePaths[j], options); - } - if (message.translationExceptionTable != null && message.hasOwnProperty("translationExceptionTable")) - object.translationExceptionTable = message.translationExceptionTable; - return object; - }; - - /** - * Converts this TranslationTaskDetails to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @instance - * @returns {Object.} JSON object - */ - TranslationTaskDetails.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TranslationTaskDetails - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TranslationTaskDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails"; - }; - - /** - * FileEncoding enum. - * @name google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.FileEncoding - * @enum {number} - * @property {number} FILE_ENCODING_UNSPECIFIED=0 FILE_ENCODING_UNSPECIFIED value - * @property {number} UTF_8=1 UTF_8 value - * @property {number} ISO_8859_1=2 ISO_8859_1 value - * @property {number} US_ASCII=3 US_ASCII value - * @property {number} UTF_16=4 UTF_16 value - * @property {number} UTF_16LE=5 UTF_16LE value - * @property {number} UTF_16BE=6 UTF_16BE value - */ - TranslationTaskDetails.FileEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FILE_ENCODING_UNSPECIFIED"] = 0; - values[valuesById[1] = "UTF_8"] = 1; - values[valuesById[2] = "ISO_8859_1"] = 2; - values[valuesById[3] = "US_ASCII"] = 3; - values[valuesById[4] = "UTF_16"] = 4; - values[valuesById[5] = "UTF_16LE"] = 5; - values[valuesById[6] = "UTF_16BE"] = 6; - return values; - })(); - - /** - * TokenType enum. - * @name google.cloud.bigquery.migration.v2alpha.TranslationTaskDetails.TokenType - * @enum {number} - * @property {number} TOKEN_TYPE_UNSPECIFIED=0 TOKEN_TYPE_UNSPECIFIED value - * @property {number} STRING=1 STRING value - * @property {number} INT64=2 INT64 value - * @property {number} NUMERIC=3 NUMERIC value - * @property {number} BOOL=4 BOOL value - * @property {number} FLOAT64=5 FLOAT64 value - * @property {number} DATE=6 DATE value - * @property {number} TIMESTAMP=7 TIMESTAMP value - */ - TranslationTaskDetails.TokenType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TOKEN_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "STRING"] = 1; - values[valuesById[2] = "INT64"] = 2; - values[valuesById[3] = "NUMERIC"] = 3; - values[valuesById[4] = "BOOL"] = 4; - values[valuesById[5] = "FLOAT64"] = 5; - values[valuesById[6] = "DATE"] = 6; - values[valuesById[7] = "TIMESTAMP"] = 7; - return values; - })(); - - return TranslationTaskDetails; - })(); - - v2alpha.Filter = (function() { - - /** - * Properties of a Filter. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IFilter - * @property {Array.|null} [inputFileExclusionPrefixes] Filter inputFileExclusionPrefixes - */ - - /** - * Constructs a new Filter. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a Filter. - * @implements IFilter - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IFilter=} [properties] Properties to set - */ - function Filter(properties) { - this.inputFileExclusionPrefixes = []; - 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]]; - } - - /** - * Filter inputFileExclusionPrefixes. - * @member {Array.} inputFileExclusionPrefixes - * @memberof google.cloud.bigquery.migration.v2alpha.Filter - * @instance - */ - Filter.prototype.inputFileExclusionPrefixes = $util.emptyArray; - - /** - * Creates a new Filter instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.Filter - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IFilter=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.Filter} Filter instance - */ - Filter.create = function create(properties) { - return new Filter(properties); - }; - - /** - * Encodes the specified Filter message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Filter.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.Filter - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.inputFileExclusionPrefixes != null && message.inputFileExclusionPrefixes.length) - for (var i = 0; i < message.inputFileExclusionPrefixes.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputFileExclusionPrefixes[i]); - return writer; - }; - - /** - * Encodes the specified Filter message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.Filter.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.Filter - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IFilter} message Filter message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Filter.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Filter message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.Filter - * @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.v2alpha.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.Filter(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.inputFileExclusionPrefixes && message.inputFileExclusionPrefixes.length)) - message.inputFileExclusionPrefixes = []; - message.inputFileExclusionPrefixes.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Filter message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.Filter - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.Filter} Filter - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Filter.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Filter message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.Filter - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Filter.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.inputFileExclusionPrefixes != null && message.hasOwnProperty("inputFileExclusionPrefixes")) { - if (!Array.isArray(message.inputFileExclusionPrefixes)) - return "inputFileExclusionPrefixes: array expected"; - for (var i = 0; i < message.inputFileExclusionPrefixes.length; ++i) - if (!$util.isString(message.inputFileExclusionPrefixes[i])) - return "inputFileExclusionPrefixes: string[] expected"; - } - return null; - }; - - /** - * Creates a Filter message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.Filter - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.Filter} Filter - */ - Filter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.Filter) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.Filter(); - if (object.inputFileExclusionPrefixes) { - if (!Array.isArray(object.inputFileExclusionPrefixes)) - throw TypeError(".google.cloud.bigquery.migration.v2alpha.Filter.inputFileExclusionPrefixes: array expected"); - message.inputFileExclusionPrefixes = []; - for (var i = 0; i < object.inputFileExclusionPrefixes.length; ++i) - message.inputFileExclusionPrefixes[i] = String(object.inputFileExclusionPrefixes[i]); - } - return message; - }; - - /** - * Creates a plain object from a Filter message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.Filter - * @static - * @param {google.cloud.bigquery.migration.v2alpha.Filter} message Filter - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Filter.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.inputFileExclusionPrefixes = []; - if (message.inputFileExclusionPrefixes && message.inputFileExclusionPrefixes.length) { - object.inputFileExclusionPrefixes = []; - for (var j = 0; j < message.inputFileExclusionPrefixes.length; ++j) - object.inputFileExclusionPrefixes[j] = message.inputFileExclusionPrefixes[j]; - } - return object; - }; - - /** - * Converts this Filter to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.Filter - * @instance - * @returns {Object.} JSON object - */ - Filter.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Filter - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.Filter - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Filter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.Filter"; - }; - - return Filter; - })(); - - v2alpha.IdentifierSettings = (function() { - - /** - * Properties of an IdentifierSettings. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IIdentifierSettings - * @property {google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase|null} [outputIdentifierCase] IdentifierSettings outputIdentifierCase - * @property {google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode|null} [identifierRewriteMode] IdentifierSettings identifierRewriteMode - */ - - /** - * Constructs a new IdentifierSettings. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents an IdentifierSettings. - * @implements IIdentifierSettings - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IIdentifierSettings=} [properties] Properties to set - */ - function IdentifierSettings(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]]; - } - - /** - * IdentifierSettings outputIdentifierCase. - * @member {google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase} outputIdentifierCase - * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings - * @instance - */ - IdentifierSettings.prototype.outputIdentifierCase = 0; - - /** - * IdentifierSettings identifierRewriteMode. - * @member {google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode} identifierRewriteMode - * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings - * @instance - */ - IdentifierSettings.prototype.identifierRewriteMode = 0; - - /** - * Creates a new IdentifierSettings instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IIdentifierSettings=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.IdentifierSettings} IdentifierSettings instance - */ - IdentifierSettings.create = function create(properties) { - return new IdentifierSettings(properties); - }; - - /** - * Encodes the specified IdentifierSettings message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.IdentifierSettings.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IIdentifierSettings} message IdentifierSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifierSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.outputIdentifierCase != null && Object.hasOwnProperty.call(message, "outputIdentifierCase")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.outputIdentifierCase); - if (message.identifierRewriteMode != null && Object.hasOwnProperty.call(message, "identifierRewriteMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.identifierRewriteMode); - return writer; - }; - - /** - * Encodes the specified IdentifierSettings message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.IdentifierSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IIdentifierSettings} message IdentifierSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - IdentifierSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an IdentifierSettings message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings - * @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.v2alpha.IdentifierSettings} IdentifierSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifierSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.outputIdentifierCase = reader.int32(); - break; - } - case 2: { - message.identifierRewriteMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an IdentifierSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.IdentifierSettings} IdentifierSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - IdentifierSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an IdentifierSettings message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - IdentifierSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.outputIdentifierCase != null && message.hasOwnProperty("outputIdentifierCase")) - switch (message.outputIdentifierCase) { - default: - return "outputIdentifierCase: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.identifierRewriteMode != null && message.hasOwnProperty("identifierRewriteMode")) - switch (message.identifierRewriteMode) { - default: - return "identifierRewriteMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an IdentifierSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.IdentifierSettings} IdentifierSettings - */ - IdentifierSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings(); - switch (object.outputIdentifierCase) { - default: - if (typeof object.outputIdentifierCase === "number") { - message.outputIdentifierCase = object.outputIdentifierCase; - break; - } - break; - case "IDENTIFIER_CASE_UNSPECIFIED": - case 0: - message.outputIdentifierCase = 0; - break; - case "ORIGINAL": - case 1: - message.outputIdentifierCase = 1; - break; - case "UPPER": - case 2: - message.outputIdentifierCase = 2; - break; - case "LOWER": - case 3: - message.outputIdentifierCase = 3; - break; - } - switch (object.identifierRewriteMode) { - default: - if (typeof object.identifierRewriteMode === "number") { - message.identifierRewriteMode = object.identifierRewriteMode; - break; - } - break; - case "IDENTIFIER_REWRITE_MODE_UNSPECIFIED": - case 0: - message.identifierRewriteMode = 0; - break; - case "NONE": - case 1: - message.identifierRewriteMode = 1; - break; - case "REWRITE_ALL": - case 2: - message.identifierRewriteMode = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an IdentifierSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IdentifierSettings} message IdentifierSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - IdentifierSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.outputIdentifierCase = options.enums === String ? "IDENTIFIER_CASE_UNSPECIFIED" : 0; - object.identifierRewriteMode = options.enums === String ? "IDENTIFIER_REWRITE_MODE_UNSPECIFIED" : 0; - } - if (message.outputIdentifierCase != null && message.hasOwnProperty("outputIdentifierCase")) - object.outputIdentifierCase = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase[message.outputIdentifierCase] === undefined ? message.outputIdentifierCase : $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase[message.outputIdentifierCase] : message.outputIdentifierCase; - if (message.identifierRewriteMode != null && message.hasOwnProperty("identifierRewriteMode")) - object.identifierRewriteMode = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode[message.identifierRewriteMode] === undefined ? message.identifierRewriteMode : $root.google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode[message.identifierRewriteMode] : message.identifierRewriteMode; - return object; - }; - - /** - * Converts this IdentifierSettings to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings - * @instance - * @returns {Object.} JSON object - */ - IdentifierSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for IdentifierSettings - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.IdentifierSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - IdentifierSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.IdentifierSettings"; - }; - - /** - * IdentifierCase enum. - * @name google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierCase - * @enum {number} - * @property {number} IDENTIFIER_CASE_UNSPECIFIED=0 IDENTIFIER_CASE_UNSPECIFIED value - * @property {number} ORIGINAL=1 ORIGINAL value - * @property {number} UPPER=2 UPPER value - * @property {number} LOWER=3 LOWER value - */ - IdentifierSettings.IdentifierCase = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDENTIFIER_CASE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINAL"] = 1; - values[valuesById[2] = "UPPER"] = 2; - values[valuesById[3] = "LOWER"] = 3; - return values; - })(); - - /** - * IdentifierRewriteMode enum. - * @name google.cloud.bigquery.migration.v2alpha.IdentifierSettings.IdentifierRewriteMode - * @enum {number} - * @property {number} IDENTIFIER_REWRITE_MODE_UNSPECIFIED=0 IDENTIFIER_REWRITE_MODE_UNSPECIFIED value - * @property {number} NONE=1 NONE value - * @property {number} REWRITE_ALL=2 REWRITE_ALL value - */ - IdentifierSettings.IdentifierRewriteMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDENTIFIER_REWRITE_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "NONE"] = 1; - values[valuesById[2] = "REWRITE_ALL"] = 2; - return values; - })(); - - return IdentifierSettings; - })(); - - v2alpha.TeradataOptions = (function() { - - /** - * Properties of a TeradataOptions. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface ITeradataOptions - */ - - /** - * Constructs a new TeradataOptions. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a TeradataOptions. - * @implements ITeradataOptions - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.ITeradataOptions=} [properties] Properties to set - */ - function TeradataOptions(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 TeradataOptions instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITeradataOptions=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.TeradataOptions} TeradataOptions instance - */ - TeradataOptions.create = function create(properties) { - return new TeradataOptions(properties); - }; - - /** - * Encodes the specified TeradataOptions message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TeradataOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITeradataOptions} message TeradataOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TeradataOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified TeradataOptions message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TeradataOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITeradataOptions} message TeradataOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TeradataOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TeradataOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions - * @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.v2alpha.TeradataOptions} TeradataOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TeradataOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TeradataOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.TeradataOptions} TeradataOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TeradataOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TeradataOptions message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TeradataOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a TeradataOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.TeradataOptions} TeradataOptions - */ - TeradataOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions) - return object; - return new $root.google.cloud.bigquery.migration.v2alpha.TeradataOptions(); - }; - - /** - * Creates a plain object from a TeradataOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions - * @static - * @param {google.cloud.bigquery.migration.v2alpha.TeradataOptions} message TeradataOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TeradataOptions.toObject = function toObject() { - return {}; - }; - - /** - * Converts this TeradataOptions to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions - * @instance - * @returns {Object.} JSON object - */ - TeradataOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TeradataOptions - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.TeradataOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TeradataOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.TeradataOptions"; - }; - - return TeradataOptions; - })(); - - v2alpha.BteqOptions = (function() { - - /** - * Properties of a BteqOptions. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IBteqOptions - * @property {google.cloud.bigquery.migration.v2alpha.IDatasetReference|null} [projectDataset] BteqOptions projectDataset - * @property {string|null} [defaultPathUri] BteqOptions defaultPathUri - * @property {Object.|null} [fileReplacementMap] BteqOptions fileReplacementMap - */ - - /** - * Constructs a new BteqOptions. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a BteqOptions. - * @implements IBteqOptions - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IBteqOptions=} [properties] Properties to set - */ - function BteqOptions(properties) { - this.fileReplacementMap = {}; - 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]]; - } - - /** - * BteqOptions projectDataset. - * @member {google.cloud.bigquery.migration.v2alpha.IDatasetReference|null|undefined} projectDataset - * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions - * @instance - */ - BteqOptions.prototype.projectDataset = null; - - /** - * BteqOptions defaultPathUri. - * @member {string} defaultPathUri - * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions - * @instance - */ - BteqOptions.prototype.defaultPathUri = ""; - - /** - * BteqOptions fileReplacementMap. - * @member {Object.} fileReplacementMap - * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions - * @instance - */ - BteqOptions.prototype.fileReplacementMap = $util.emptyObject; - - /** - * Creates a new BteqOptions instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IBteqOptions=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.BteqOptions} BteqOptions instance - */ - BteqOptions.create = function create(properties) { - return new BteqOptions(properties); - }; - - /** - * Encodes the specified BteqOptions message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.BteqOptions.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IBteqOptions} message BteqOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BteqOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.projectDataset != null && Object.hasOwnProperty.call(message, "projectDataset")) - $root.google.cloud.bigquery.migration.v2alpha.DatasetReference.encode(message.projectDataset, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.defaultPathUri != null && Object.hasOwnProperty.call(message, "defaultPathUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.defaultPathUri); - if (message.fileReplacementMap != null && Object.hasOwnProperty.call(message, "fileReplacementMap")) - for (var keys = Object.keys(message.fileReplacementMap), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.fileReplacementMap[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified BteqOptions message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.BteqOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IBteqOptions} message BteqOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BteqOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BteqOptions message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions - * @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.v2alpha.BteqOptions} BteqOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BteqOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.BteqOptions(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.projectDataset = $root.google.cloud.bigquery.migration.v2alpha.DatasetReference.decode(reader, reader.uint32()); - break; - } - case 2: { - message.defaultPathUri = reader.string(); - break; - } - case 3: { - if (message.fileReplacementMap === $util.emptyObject) - message.fileReplacementMap = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.fileReplacementMap[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BteqOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.BteqOptions} BteqOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BteqOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BteqOptions message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BteqOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.projectDataset != null && message.hasOwnProperty("projectDataset")) { - var error = $root.google.cloud.bigquery.migration.v2alpha.DatasetReference.verify(message.projectDataset); - if (error) - return "projectDataset." + error; - } - if (message.defaultPathUri != null && message.hasOwnProperty("defaultPathUri")) - if (!$util.isString(message.defaultPathUri)) - return "defaultPathUri: string expected"; - if (message.fileReplacementMap != null && message.hasOwnProperty("fileReplacementMap")) { - if (!$util.isObject(message.fileReplacementMap)) - return "fileReplacementMap: object expected"; - var key = Object.keys(message.fileReplacementMap); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.fileReplacementMap[key[i]])) - return "fileReplacementMap: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a BteqOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.BteqOptions} BteqOptions - */ - BteqOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.BteqOptions) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.BteqOptions(); - if (object.projectDataset != null) { - if (typeof object.projectDataset !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.BteqOptions.projectDataset: object expected"); - message.projectDataset = $root.google.cloud.bigquery.migration.v2alpha.DatasetReference.fromObject(object.projectDataset); - } - if (object.defaultPathUri != null) - message.defaultPathUri = String(object.defaultPathUri); - if (object.fileReplacementMap) { - if (typeof object.fileReplacementMap !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.BteqOptions.fileReplacementMap: object expected"); - message.fileReplacementMap = {}; - for (var keys = Object.keys(object.fileReplacementMap), i = 0; i < keys.length; ++i) - message.fileReplacementMap[keys[i]] = String(object.fileReplacementMap[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a BteqOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions - * @static - * @param {google.cloud.bigquery.migration.v2alpha.BteqOptions} message BteqOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BteqOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.fileReplacementMap = {}; - if (options.defaults) { - object.projectDataset = null; - object.defaultPathUri = ""; - } - if (message.projectDataset != null && message.hasOwnProperty("projectDataset")) - object.projectDataset = $root.google.cloud.bigquery.migration.v2alpha.DatasetReference.toObject(message.projectDataset, options); - if (message.defaultPathUri != null && message.hasOwnProperty("defaultPathUri")) - object.defaultPathUri = message.defaultPathUri; - var keys2; - if (message.fileReplacementMap && (keys2 = Object.keys(message.fileReplacementMap)).length) { - object.fileReplacementMap = {}; - for (var j = 0; j < keys2.length; ++j) - object.fileReplacementMap[keys2[j]] = message.fileReplacementMap[keys2[j]]; - } - return object; - }; - - /** - * Converts this BteqOptions to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions - * @instance - * @returns {Object.} JSON object - */ - BteqOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BteqOptions - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.BteqOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BteqOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.BteqOptions"; - }; - - return BteqOptions; - })(); - - v2alpha.DatasetReference = (function() { - - /** - * Properties of a DatasetReference. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IDatasetReference - * @property {string|null} [datasetId] DatasetReference datasetId - * @property {string|null} [projectId] DatasetReference projectId - */ - - /** - * Constructs a new DatasetReference. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a DatasetReference. - * @implements IDatasetReference - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IDatasetReference=} [properties] Properties to set - */ - function DatasetReference(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]]; - } - - /** - * DatasetReference datasetId. - * @member {string} datasetId - * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference - * @instance - */ - DatasetReference.prototype.datasetId = ""; - - /** - * DatasetReference projectId. - * @member {string} projectId - * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference - * @instance - */ - DatasetReference.prototype.projectId = ""; - - /** - * Creates a new DatasetReference instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IDatasetReference=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.DatasetReference} DatasetReference instance - */ - DatasetReference.create = function create(properties) { - return new DatasetReference(properties); - }; - - /** - * Encodes the specified DatasetReference message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DatasetReference.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IDatasetReference} message DatasetReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatasetReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.datasetId != null && Object.hasOwnProperty.call(message, "datasetId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.datasetId); - if (message.projectId != null && Object.hasOwnProperty.call(message, "projectId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.projectId); - return writer; - }; - - /** - * Encodes the specified DatasetReference message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DatasetReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IDatasetReference} message DatasetReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DatasetReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DatasetReference message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference - * @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.v2alpha.DatasetReference} DatasetReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatasetReference.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.DatasetReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.datasetId = reader.string(); - break; - } - case 2: { - message.projectId = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DatasetReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.DatasetReference} DatasetReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DatasetReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DatasetReference message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DatasetReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.datasetId != null && message.hasOwnProperty("datasetId")) - if (!$util.isString(message.datasetId)) - return "datasetId: string expected"; - if (message.projectId != null && message.hasOwnProperty("projectId")) - if (!$util.isString(message.projectId)) - return "projectId: string expected"; - return null; - }; - - /** - * Creates a DatasetReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.DatasetReference} DatasetReference - */ - DatasetReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.DatasetReference) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.DatasetReference(); - if (object.datasetId != null) - message.datasetId = String(object.datasetId); - if (object.projectId != null) - message.projectId = String(object.projectId); - return message; - }; - - /** - * Creates a plain object from a DatasetReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference - * @static - * @param {google.cloud.bigquery.migration.v2alpha.DatasetReference} message DatasetReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DatasetReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.datasetId = ""; - object.projectId = ""; - } - if (message.datasetId != null && message.hasOwnProperty("datasetId")) - object.datasetId = message.datasetId; - if (message.projectId != null && message.hasOwnProperty("projectId")) - object.projectId = message.projectId; - return object; - }; - - /** - * Converts this DatasetReference to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference - * @instance - * @returns {Object.} JSON object - */ - DatasetReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DatasetReference - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.DatasetReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DatasetReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.DatasetReference"; - }; - - return DatasetReference; - })(); - - v2alpha.MigrationService = (function() { - - /** - * Constructs a new MigrationService service. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a MigrationService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function MigrationService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (MigrationService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MigrationService; - - /** - * Creates new MigrationService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {MigrationService} RPC service. Useful where requests and/or responses are streamed. - */ - MigrationService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|createMigrationWorkflow}. - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @typedef CreateMigrationWorkflowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} [response] MigrationWorkflow - */ - - /** - * Calls CreateMigrationWorkflow. - * @function createMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest} request CreateMigrationWorkflowRequest message or plain object - * @param {google.cloud.bigquery.migration.v2alpha.MigrationService.CreateMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and MigrationWorkflow - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.createMigrationWorkflow = function createMigrationWorkflow(request, callback) { - return this.rpcCall(createMigrationWorkflow, $root.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest, $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow, request, callback); - }, "name", { value: "CreateMigrationWorkflow" }); - - /** - * Calls CreateMigrationWorkflow. - * @function createMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest} request CreateMigrationWorkflowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|getMigrationWorkflow}. - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @typedef GetMigrationWorkflowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} [response] MigrationWorkflow - */ - - /** - * Calls GetMigrationWorkflow. - * @function getMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest} request GetMigrationWorkflowRequest message or plain object - * @param {google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and MigrationWorkflow - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.getMigrationWorkflow = function getMigrationWorkflow(request, callback) { - return this.rpcCall(getMigrationWorkflow, $root.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest, $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow, request, callback); - }, "name", { value: "GetMigrationWorkflow" }); - - /** - * Calls GetMigrationWorkflow. - * @function getMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest} request GetMigrationWorkflowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|listMigrationWorkflows}. - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @typedef ListMigrationWorkflowsCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse} [response] ListMigrationWorkflowsResponse - */ - - /** - * Calls ListMigrationWorkflows. - * @function listMigrationWorkflows - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest} request ListMigrationWorkflowsRequest message or plain object - * @param {google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationWorkflowsCallback} callback Node-style callback called with the error, if any, and ListMigrationWorkflowsResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.listMigrationWorkflows = function listMigrationWorkflows(request, callback) { - return this.rpcCall(listMigrationWorkflows, $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest, $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse, request, callback); - }, "name", { value: "ListMigrationWorkflows" }); - - /** - * Calls ListMigrationWorkflows. - * @function listMigrationWorkflows - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest} request ListMigrationWorkflowsRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|deleteMigrationWorkflow}. - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @typedef DeleteMigrationWorkflowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls DeleteMigrationWorkflow. - * @function deleteMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest} request DeleteMigrationWorkflowRequest message or plain object - * @param {google.cloud.bigquery.migration.v2alpha.MigrationService.DeleteMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.deleteMigrationWorkflow = function deleteMigrationWorkflow(request, callback) { - return this.rpcCall(deleteMigrationWorkflow, $root.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "DeleteMigrationWorkflow" }); - - /** - * Calls DeleteMigrationWorkflow. - * @function deleteMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest} request DeleteMigrationWorkflowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|startMigrationWorkflow}. - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @typedef StartMigrationWorkflowCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.protobuf.Empty} [response] Empty - */ - - /** - * Calls StartMigrationWorkflow. - * @function startMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest} request StartMigrationWorkflowRequest message or plain object - * @param {google.cloud.bigquery.migration.v2alpha.MigrationService.StartMigrationWorkflowCallback} callback Node-style callback called with the error, if any, and Empty - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.startMigrationWorkflow = function startMigrationWorkflow(request, callback) { - return this.rpcCall(startMigrationWorkflow, $root.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest, $root.google.protobuf.Empty, request, callback); - }, "name", { value: "StartMigrationWorkflow" }); - - /** - * Calls StartMigrationWorkflow. - * @function startMigrationWorkflow - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest} request StartMigrationWorkflowRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|getMigrationSubtask}. - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @typedef GetMigrationSubtaskCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.bigquery.migration.v2alpha.MigrationSubtask} [response] MigrationSubtask - */ - - /** - * Calls GetMigrationSubtask. - * @function getMigrationSubtask - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest} request GetMigrationSubtaskRequest message or plain object - * @param {google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationSubtaskCallback} callback Node-style callback called with the error, if any, and MigrationSubtask - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.getMigrationSubtask = function getMigrationSubtask(request, callback) { - return this.rpcCall(getMigrationSubtask, $root.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest, $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask, request, callback); - }, "name", { value: "GetMigrationSubtask" }); - - /** - * Calls GetMigrationSubtask. - * @function getMigrationSubtask - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest} request GetMigrationSubtaskRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.MigrationService|listMigrationSubtasks}. - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @typedef ListMigrationSubtasksCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse} [response] ListMigrationSubtasksResponse - */ - - /** - * Calls ListMigrationSubtasks. - * @function listMigrationSubtasks - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest} request ListMigrationSubtasksRequest message or plain object - * @param {google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationSubtasksCallback} callback Node-style callback called with the error, if any, and ListMigrationSubtasksResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(MigrationService.prototype.listMigrationSubtasks = function listMigrationSubtasks(request, callback) { - return this.rpcCall(listMigrationSubtasks, $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest, $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse, request, callback); - }, "name", { value: "ListMigrationSubtasks" }); - - /** - * Calls ListMigrationSubtasks. - * @function listMigrationSubtasks - * @memberof google.cloud.bigquery.migration.v2alpha.MigrationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest} request ListMigrationSubtasksRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return MigrationService; - })(); - - v2alpha.CreateMigrationWorkflowRequest = (function() { - - /** - * Properties of a CreateMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface ICreateMigrationWorkflowRequest - * @property {string|null} [parent] CreateMigrationWorkflowRequest parent - * @property {google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow|null} [migrationWorkflow] CreateMigrationWorkflowRequest migrationWorkflow - */ - - /** - * Constructs a new CreateMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a CreateMigrationWorkflowRequest. - * @implements ICreateMigrationWorkflowRequest - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest=} [properties] Properties to set - */ - function CreateMigrationWorkflowRequest(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]]; - } - - /** - * CreateMigrationWorkflowRequest parent. - * @member {string} parent - * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest - * @instance - */ - CreateMigrationWorkflowRequest.prototype.parent = ""; - - /** - * CreateMigrationWorkflowRequest migrationWorkflow. - * @member {google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow|null|undefined} migrationWorkflow - * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest - * @instance - */ - CreateMigrationWorkflowRequest.prototype.migrationWorkflow = null; - - /** - * Creates a new CreateMigrationWorkflowRequest instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest instance - */ - CreateMigrationWorkflowRequest.create = function create(properties) { - return new CreateMigrationWorkflowRequest(properties); - }; - - /** - * Encodes the specified CreateMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest} message CreateMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateMigrationWorkflowRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.migrationWorkflow != null && Object.hasOwnProperty.call(message, "migrationWorkflow")) - $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.encode(message.migrationWorkflow, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CreateMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest} message CreateMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CreateMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest - * @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.v2alpha.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateMigrationWorkflowRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.migrationWorkflow = $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CreateMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CreateMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CreateMigrationWorkflowRequest message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CreateMigrationWorkflowRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.migrationWorkflow != null && message.hasOwnProperty("migrationWorkflow")) { - var error = $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.verify(message.migrationWorkflow); - if (error) - return "migrationWorkflow." + error; - } - return null; - }; - - /** - * Creates a CreateMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest} CreateMigrationWorkflowRequest - */ - CreateMigrationWorkflowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.migrationWorkflow != null) { - if (typeof object.migrationWorkflow !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest.migrationWorkflow: object expected"); - message.migrationWorkflow = $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.fromObject(object.migrationWorkflow); - } - return message; - }; - - /** - * Creates a plain object from a CreateMigrationWorkflowRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest} message CreateMigrationWorkflowRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CreateMigrationWorkflowRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.migrationWorkflow = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.migrationWorkflow != null && message.hasOwnProperty("migrationWorkflow")) - object.migrationWorkflow = $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.toObject(message.migrationWorkflow, options); - return object; - }; - - /** - * Converts this CreateMigrationWorkflowRequest to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest - * @instance - * @returns {Object.} JSON object - */ - CreateMigrationWorkflowRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CreateMigrationWorkflowRequest - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CreateMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest"; - }; - - return CreateMigrationWorkflowRequest; - })(); - - v2alpha.GetMigrationWorkflowRequest = (function() { - - /** - * Properties of a GetMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IGetMigrationWorkflowRequest - * @property {string|null} [name] GetMigrationWorkflowRequest name - * @property {google.protobuf.IFieldMask|null} [readMask] GetMigrationWorkflowRequest readMask - */ - - /** - * Constructs a new GetMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a GetMigrationWorkflowRequest. - * @implements IGetMigrationWorkflowRequest - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest=} [properties] Properties to set - */ - function GetMigrationWorkflowRequest(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]]; - } - - /** - * GetMigrationWorkflowRequest name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest - * @instance - */ - GetMigrationWorkflowRequest.prototype.name = ""; - - /** - * GetMigrationWorkflowRequest readMask. - * @member {google.protobuf.IFieldMask|null|undefined} readMask - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest - * @instance - */ - GetMigrationWorkflowRequest.prototype.readMask = null; - - /** - * Creates a new GetMigrationWorkflowRequest instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest instance - */ - GetMigrationWorkflowRequest.create = function create(properties) { - return new GetMigrationWorkflowRequest(properties); - }; - - /** - * Encodes the specified GetMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest} message GetMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMigrationWorkflowRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) - $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest} message GetMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest - * @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.v2alpha.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMigrationWorkflowRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetMigrationWorkflowRequest message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetMigrationWorkflowRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.readMask != null && message.hasOwnProperty("readMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.readMask); - if (error) - return "readMask." + error; - } - return null; - }; - - /** - * Creates a GetMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest} GetMigrationWorkflowRequest - */ - GetMigrationWorkflowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.readMask != null) { - if (typeof object.readMask !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest.readMask: object expected"); - message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); - } - return message; - }; - - /** - * Creates a plain object from a GetMigrationWorkflowRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest} message GetMigrationWorkflowRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetMigrationWorkflowRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.readMask = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.readMask != null && message.hasOwnProperty("readMask")) - object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); - return object; - }; - - /** - * Converts this GetMigrationWorkflowRequest to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest - * @instance - * @returns {Object.} JSON object - */ - GetMigrationWorkflowRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetMigrationWorkflowRequest - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest"; - }; - - return GetMigrationWorkflowRequest; - })(); - - v2alpha.ListMigrationWorkflowsRequest = (function() { - - /** - * Properties of a ListMigrationWorkflowsRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IListMigrationWorkflowsRequest - * @property {string|null} [parent] ListMigrationWorkflowsRequest parent - * @property {google.protobuf.IFieldMask|null} [readMask] ListMigrationWorkflowsRequest readMask - * @property {number|null} [pageSize] ListMigrationWorkflowsRequest pageSize - * @property {string|null} [pageToken] ListMigrationWorkflowsRequest pageToken - */ - - /** - * Constructs a new ListMigrationWorkflowsRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a ListMigrationWorkflowsRequest. - * @implements IListMigrationWorkflowsRequest - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest=} [properties] Properties to set - */ - function ListMigrationWorkflowsRequest(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]]; - } - - /** - * ListMigrationWorkflowsRequest parent. - * @member {string} parent - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest - * @instance - */ - ListMigrationWorkflowsRequest.prototype.parent = ""; - - /** - * ListMigrationWorkflowsRequest readMask. - * @member {google.protobuf.IFieldMask|null|undefined} readMask - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest - * @instance - */ - ListMigrationWorkflowsRequest.prototype.readMask = null; - - /** - * ListMigrationWorkflowsRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest - * @instance - */ - ListMigrationWorkflowsRequest.prototype.pageSize = 0; - - /** - * ListMigrationWorkflowsRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest - * @instance - */ - ListMigrationWorkflowsRequest.prototype.pageToken = ""; - - /** - * Creates a new ListMigrationWorkflowsRequest instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest instance - */ - ListMigrationWorkflowsRequest.create = function create(properties) { - return new ListMigrationWorkflowsRequest(properties); - }; - - /** - * Encodes the specified ListMigrationWorkflowsRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest} message ListMigrationWorkflowsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationWorkflowsRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) - $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - return writer; - }; - - /** - * Encodes the specified ListMigrationWorkflowsRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest} message ListMigrationWorkflowsRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationWorkflowsRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest - * @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.v2alpha.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationWorkflowsRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListMigrationWorkflowsRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationWorkflowsRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListMigrationWorkflowsRequest message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMigrationWorkflowsRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.readMask != null && message.hasOwnProperty("readMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.readMask); - if (error) - return "readMask." + error; - } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - return null; - }; - - /** - * Creates a ListMigrationWorkflowsRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest} ListMigrationWorkflowsRequest - */ - ListMigrationWorkflowsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.readMask != null) { - if (typeof object.readMask !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest.readMask: object expected"); - message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); - } - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - return message; - }; - - /** - * Creates a plain object from a ListMigrationWorkflowsRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest} message ListMigrationWorkflowsRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMigrationWorkflowsRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.readMask = null; - object.pageSize = 0; - object.pageToken = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.readMask != null && message.hasOwnProperty("readMask")) - object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - return object; - }; - - /** - * Converts this ListMigrationWorkflowsRequest to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest - * @instance - * @returns {Object.} JSON object - */ - ListMigrationWorkflowsRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListMigrationWorkflowsRequest - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListMigrationWorkflowsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest"; - }; - - return ListMigrationWorkflowsRequest; - })(); - - v2alpha.ListMigrationWorkflowsResponse = (function() { - - /** - * Properties of a ListMigrationWorkflowsResponse. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IListMigrationWorkflowsResponse - * @property {Array.|null} [migrationWorkflows] ListMigrationWorkflowsResponse migrationWorkflows - * @property {string|null} [nextPageToken] ListMigrationWorkflowsResponse nextPageToken - */ - - /** - * Constructs a new ListMigrationWorkflowsResponse. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a ListMigrationWorkflowsResponse. - * @implements IListMigrationWorkflowsResponse - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse=} [properties] Properties to set - */ - function ListMigrationWorkflowsResponse(properties) { - this.migrationWorkflows = []; - 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]]; - } - - /** - * ListMigrationWorkflowsResponse migrationWorkflows. - * @member {Array.} migrationWorkflows - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse - * @instance - */ - ListMigrationWorkflowsResponse.prototype.migrationWorkflows = $util.emptyArray; - - /** - * ListMigrationWorkflowsResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse - * @instance - */ - ListMigrationWorkflowsResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListMigrationWorkflowsResponse instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse instance - */ - ListMigrationWorkflowsResponse.create = function create(properties) { - return new ListMigrationWorkflowsResponse(properties); - }; - - /** - * Encodes the specified ListMigrationWorkflowsResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse} message ListMigrationWorkflowsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationWorkflowsResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.migrationWorkflows != null && message.migrationWorkflows.length) - for (var i = 0; i < message.migrationWorkflows.length; ++i) - $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.encode(message.migrationWorkflows[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListMigrationWorkflowsResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse} message ListMigrationWorkflowsResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationWorkflowsResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse - * @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.v2alpha.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationWorkflowsResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.migrationWorkflows && message.migrationWorkflows.length)) - message.migrationWorkflows = []; - message.migrationWorkflows.push($root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListMigrationWorkflowsResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationWorkflowsResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListMigrationWorkflowsResponse message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMigrationWorkflowsResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.migrationWorkflows != null && message.hasOwnProperty("migrationWorkflows")) { - if (!Array.isArray(message.migrationWorkflows)) - return "migrationWorkflows: array expected"; - for (var i = 0; i < message.migrationWorkflows.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.verify(message.migrationWorkflows[i]); - if (error) - return "migrationWorkflows." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListMigrationWorkflowsResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse} ListMigrationWorkflowsResponse - */ - ListMigrationWorkflowsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse(); - if (object.migrationWorkflows) { - if (!Array.isArray(object.migrationWorkflows)) - throw TypeError(".google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse.migrationWorkflows: array expected"); - message.migrationWorkflows = []; - for (var i = 0; i < object.migrationWorkflows.length; ++i) { - if (typeof object.migrationWorkflows[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse.migrationWorkflows: object expected"); - message.migrationWorkflows[i] = $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.fromObject(object.migrationWorkflows[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListMigrationWorkflowsResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse} message ListMigrationWorkflowsResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMigrationWorkflowsResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.migrationWorkflows = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.migrationWorkflows && message.migrationWorkflows.length) { - object.migrationWorkflows = []; - for (var j = 0; j < message.migrationWorkflows.length; ++j) - object.migrationWorkflows[j] = $root.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow.toObject(message.migrationWorkflows[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListMigrationWorkflowsResponse to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse - * @instance - * @returns {Object.} JSON object - */ - ListMigrationWorkflowsResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListMigrationWorkflowsResponse - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListMigrationWorkflowsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse"; - }; - - return ListMigrationWorkflowsResponse; - })(); - - v2alpha.DeleteMigrationWorkflowRequest = (function() { - - /** - * Properties of a DeleteMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IDeleteMigrationWorkflowRequest - * @property {string|null} [name] DeleteMigrationWorkflowRequest name - */ - - /** - * Constructs a new DeleteMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a DeleteMigrationWorkflowRequest. - * @implements IDeleteMigrationWorkflowRequest - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest=} [properties] Properties to set - */ - function DeleteMigrationWorkflowRequest(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]]; - } - - /** - * DeleteMigrationWorkflowRequest name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest - * @instance - */ - DeleteMigrationWorkflowRequest.prototype.name = ""; - - /** - * Creates a new DeleteMigrationWorkflowRequest instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest instance - */ - DeleteMigrationWorkflowRequest.create = function create(properties) { - return new DeleteMigrationWorkflowRequest(properties); - }; - - /** - * Encodes the specified DeleteMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest} message DeleteMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteMigrationWorkflowRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified DeleteMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest} message DeleteMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DeleteMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest - * @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.v2alpha.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteMigrationWorkflowRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DeleteMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DeleteMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DeleteMigrationWorkflowRequest message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DeleteMigrationWorkflowRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a DeleteMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest} DeleteMigrationWorkflowRequest - */ - DeleteMigrationWorkflowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a DeleteMigrationWorkflowRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest} message DeleteMigrationWorkflowRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DeleteMigrationWorkflowRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this DeleteMigrationWorkflowRequest to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest - * @instance - * @returns {Object.} JSON object - */ - DeleteMigrationWorkflowRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DeleteMigrationWorkflowRequest - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DeleteMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest"; - }; - - return DeleteMigrationWorkflowRequest; - })(); - - v2alpha.StartMigrationWorkflowRequest = (function() { - - /** - * Properties of a StartMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IStartMigrationWorkflowRequest - * @property {string|null} [name] StartMigrationWorkflowRequest name - */ - - /** - * Constructs a new StartMigrationWorkflowRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a StartMigrationWorkflowRequest. - * @implements IStartMigrationWorkflowRequest - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest=} [properties] Properties to set - */ - function StartMigrationWorkflowRequest(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]]; - } - - /** - * StartMigrationWorkflowRequest name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest - * @instance - */ - StartMigrationWorkflowRequest.prototype.name = ""; - - /** - * Creates a new StartMigrationWorkflowRequest instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest instance - */ - StartMigrationWorkflowRequest.create = function create(properties) { - return new StartMigrationWorkflowRequest(properties); - }; - - /** - * Encodes the specified StartMigrationWorkflowRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest} message StartMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartMigrationWorkflowRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified StartMigrationWorkflowRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest} message StartMigrationWorkflowRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - StartMigrationWorkflowRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest - * @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.v2alpha.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartMigrationWorkflowRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a StartMigrationWorkflowRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - StartMigrationWorkflowRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a StartMigrationWorkflowRequest message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - StartMigrationWorkflowRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a StartMigrationWorkflowRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest} StartMigrationWorkflowRequest - */ - StartMigrationWorkflowRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a StartMigrationWorkflowRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest} message StartMigrationWorkflowRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - StartMigrationWorkflowRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this StartMigrationWorkflowRequest to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest - * @instance - * @returns {Object.} JSON object - */ - StartMigrationWorkflowRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for StartMigrationWorkflowRequest - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - StartMigrationWorkflowRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest"; - }; - - return StartMigrationWorkflowRequest; - })(); - - v2alpha.GetMigrationSubtaskRequest = (function() { - - /** - * Properties of a GetMigrationSubtaskRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IGetMigrationSubtaskRequest - * @property {string|null} [name] GetMigrationSubtaskRequest name - * @property {google.protobuf.IFieldMask|null} [readMask] GetMigrationSubtaskRequest readMask - */ - - /** - * Constructs a new GetMigrationSubtaskRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a GetMigrationSubtaskRequest. - * @implements IGetMigrationSubtaskRequest - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest=} [properties] Properties to set - */ - function GetMigrationSubtaskRequest(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]]; - } - - /** - * GetMigrationSubtaskRequest name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest - * @instance - */ - GetMigrationSubtaskRequest.prototype.name = ""; - - /** - * GetMigrationSubtaskRequest readMask. - * @member {google.protobuf.IFieldMask|null|undefined} readMask - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest - * @instance - */ - GetMigrationSubtaskRequest.prototype.readMask = null; - - /** - * Creates a new GetMigrationSubtaskRequest instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest instance - */ - GetMigrationSubtaskRequest.create = function create(properties) { - return new GetMigrationSubtaskRequest(properties); - }; - - /** - * Encodes the specified GetMigrationSubtaskRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest} message GetMigrationSubtaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMigrationSubtaskRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) - $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GetMigrationSubtaskRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest} message GetMigrationSubtaskRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetMigrationSubtaskRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest - * @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.v2alpha.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMigrationSubtaskRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetMigrationSubtaskRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetMigrationSubtaskRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetMigrationSubtaskRequest message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetMigrationSubtaskRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.readMask != null && message.hasOwnProperty("readMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.readMask); - if (error) - return "readMask." + error; - } - return null; - }; - - /** - * Creates a GetMigrationSubtaskRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest} GetMigrationSubtaskRequest - */ - GetMigrationSubtaskRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest(); - if (object.name != null) - message.name = String(object.name); - if (object.readMask != null) { - if (typeof object.readMask !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest.readMask: object expected"); - message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); - } - return message; - }; - - /** - * Creates a plain object from a GetMigrationSubtaskRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest} message GetMigrationSubtaskRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetMigrationSubtaskRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.readMask = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.readMask != null && message.hasOwnProperty("readMask")) - object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); - return object; - }; - - /** - * Converts this GetMigrationSubtaskRequest to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest - * @instance - * @returns {Object.} JSON object - */ - GetMigrationSubtaskRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetMigrationSubtaskRequest - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetMigrationSubtaskRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest"; - }; - - return GetMigrationSubtaskRequest; - })(); - - v2alpha.ListMigrationSubtasksRequest = (function() { - - /** - * Properties of a ListMigrationSubtasksRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IListMigrationSubtasksRequest - * @property {string|null} [parent] ListMigrationSubtasksRequest parent - * @property {google.protobuf.IFieldMask|null} [readMask] ListMigrationSubtasksRequest readMask - * @property {number|null} [pageSize] ListMigrationSubtasksRequest pageSize - * @property {string|null} [pageToken] ListMigrationSubtasksRequest pageToken - * @property {string|null} [filter] ListMigrationSubtasksRequest filter - */ - - /** - * Constructs a new ListMigrationSubtasksRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a ListMigrationSubtasksRequest. - * @implements IListMigrationSubtasksRequest - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest=} [properties] Properties to set - */ - function ListMigrationSubtasksRequest(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]]; - } - - /** - * ListMigrationSubtasksRequest parent. - * @member {string} parent - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest - * @instance - */ - ListMigrationSubtasksRequest.prototype.parent = ""; - - /** - * ListMigrationSubtasksRequest readMask. - * @member {google.protobuf.IFieldMask|null|undefined} readMask - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest - * @instance - */ - ListMigrationSubtasksRequest.prototype.readMask = null; - - /** - * ListMigrationSubtasksRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest - * @instance - */ - ListMigrationSubtasksRequest.prototype.pageSize = 0; - - /** - * ListMigrationSubtasksRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest - * @instance - */ - ListMigrationSubtasksRequest.prototype.pageToken = ""; - - /** - * ListMigrationSubtasksRequest filter. - * @member {string} filter - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest - * @instance - */ - ListMigrationSubtasksRequest.prototype.filter = ""; - - /** - * Creates a new ListMigrationSubtasksRequest instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest instance - */ - ListMigrationSubtasksRequest.create = function create(properties) { - return new ListMigrationSubtasksRequest(properties); - }; - - /** - * Encodes the specified ListMigrationSubtasksRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest} message ListMigrationSubtasksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationSubtasksRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.readMask != null && Object.hasOwnProperty.call(message, "readMask")) - $root.google.protobuf.FieldMask.encode(message.readMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.filter); - return writer; - }; - - /** - * Encodes the specified ListMigrationSubtasksRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest} message ListMigrationSubtasksRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationSubtasksRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest - * @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.v2alpha.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationSubtasksRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.readMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); - break; - } - case 3: { - message.pageSize = reader.int32(); - break; - } - case 4: { - message.pageToken = reader.string(); - break; - } - case 5: { - message.filter = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListMigrationSubtasksRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationSubtasksRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListMigrationSubtasksRequest message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMigrationSubtasksRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.readMask != null && message.hasOwnProperty("readMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.readMask); - if (error) - return "readMask." + error; - } - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; - return null; - }; - - /** - * Creates a ListMigrationSubtasksRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest} ListMigrationSubtasksRequest - */ - ListMigrationSubtasksRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.readMask != null) { - if (typeof object.readMask !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest.readMask: object expected"); - message.readMask = $root.google.protobuf.FieldMask.fromObject(object.readMask); - } - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); - return message; - }; - - /** - * Creates a plain object from a ListMigrationSubtasksRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest} message ListMigrationSubtasksRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMigrationSubtasksRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.readMask = null; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.readMask != null && message.hasOwnProperty("readMask")) - object.readMask = $root.google.protobuf.FieldMask.toObject(message.readMask, options); - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; - return object; - }; - - /** - * Converts this ListMigrationSubtasksRequest to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest - * @instance - * @returns {Object.} JSON object - */ - ListMigrationSubtasksRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListMigrationSubtasksRequest - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListMigrationSubtasksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest"; - }; - - return ListMigrationSubtasksRequest; - })(); - - v2alpha.ListMigrationSubtasksResponse = (function() { - - /** - * Properties of a ListMigrationSubtasksResponse. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface IListMigrationSubtasksResponse - * @property {Array.|null} [migrationSubtasks] ListMigrationSubtasksResponse migrationSubtasks - * @property {string|null} [nextPageToken] ListMigrationSubtasksResponse nextPageToken - */ - - /** - * Constructs a new ListMigrationSubtasksResponse. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a ListMigrationSubtasksResponse. - * @implements IListMigrationSubtasksResponse - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse=} [properties] Properties to set - */ - function ListMigrationSubtasksResponse(properties) { - this.migrationSubtasks = []; - 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]]; - } - - /** - * ListMigrationSubtasksResponse migrationSubtasks. - * @member {Array.} migrationSubtasks - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse - * @instance - */ - ListMigrationSubtasksResponse.prototype.migrationSubtasks = $util.emptyArray; - - /** - * ListMigrationSubtasksResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse - * @instance - */ - ListMigrationSubtasksResponse.prototype.nextPageToken = ""; - - /** - * Creates a new ListMigrationSubtasksResponse instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse instance - */ - ListMigrationSubtasksResponse.create = function create(properties) { - return new ListMigrationSubtasksResponse(properties); - }; - - /** - * Encodes the specified ListMigrationSubtasksResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse} message ListMigrationSubtasksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationSubtasksResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.migrationSubtasks != null && message.migrationSubtasks.length) - for (var i = 0; i < message.migrationSubtasks.length; ++i) - $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask.encode(message.migrationSubtasks[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); - return writer; - }; - - /** - * Encodes the specified ListMigrationSubtasksResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse - * @static - * @param {google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse} message ListMigrationSubtasksResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ListMigrationSubtasksResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse - * @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.v2alpha.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationSubtasksResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.migrationSubtasks && message.migrationSubtasks.length)) - message.migrationSubtasks = []; - message.migrationSubtasks.push($root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ListMigrationSubtasksResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ListMigrationSubtasksResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ListMigrationSubtasksResponse message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ListMigrationSubtasksResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.migrationSubtasks != null && message.hasOwnProperty("migrationSubtasks")) { - if (!Array.isArray(message.migrationSubtasks)) - return "migrationSubtasks: array expected"; - for (var i = 0; i < message.migrationSubtasks.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask.verify(message.migrationSubtasks[i]); - if (error) - return "migrationSubtasks." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; - return null; - }; - - /** - * Creates a ListMigrationSubtasksResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse} ListMigrationSubtasksResponse - */ - ListMigrationSubtasksResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse(); - if (object.migrationSubtasks) { - if (!Array.isArray(object.migrationSubtasks)) - throw TypeError(".google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse.migrationSubtasks: array expected"); - message.migrationSubtasks = []; - for (var i = 0; i < object.migrationSubtasks.length; ++i) { - if (typeof object.migrationSubtasks[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse.migrationSubtasks: object expected"); - message.migrationSubtasks[i] = $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask.fromObject(object.migrationSubtasks[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); - return message; - }; - - /** - * Creates a plain object from a ListMigrationSubtasksResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse} message ListMigrationSubtasksResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ListMigrationSubtasksResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.migrationSubtasks = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.migrationSubtasks && message.migrationSubtasks.length) { - object.migrationSubtasks = []; - for (var j = 0; j < message.migrationSubtasks.length; ++j) - object.migrationSubtasks[j] = $root.google.cloud.bigquery.migration.v2alpha.MigrationSubtask.toObject(message.migrationSubtasks[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; - return object; - }; - - /** - * Converts this ListMigrationSubtasksResponse to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse - * @instance - * @returns {Object.} JSON object - */ - ListMigrationSubtasksResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ListMigrationSubtasksResponse - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ListMigrationSubtasksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse"; - }; - - return ListMigrationSubtasksResponse; - })(); - - v2alpha.SqlTranslationService = (function() { - - /** - * Constructs a new SqlTranslationService service. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a SqlTranslationService - * @extends $protobuf.rpc.Service - * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - */ - function SqlTranslationService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); - } - - (SqlTranslationService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = SqlTranslationService; - - /** - * Creates new SqlTranslationService service using the specified rpc implementation. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationService - * @static - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited - * @returns {SqlTranslationService} RPC service. Useful where requests and/or responses are streamed. - */ - SqlTranslationService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationService|translateQuery}. - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationService - * @typedef TranslateQueryCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse} [response] TranslateQueryResponse - */ - - /** - * Calls TranslateQuery. - * @function translateQuery - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest} request TranslateQueryRequest message or plain object - * @param {google.cloud.bigquery.migration.v2alpha.SqlTranslationService.TranslateQueryCallback} callback Node-style callback called with the error, if any, and TranslateQueryResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(SqlTranslationService.prototype.translateQuery = function translateQuery(request, callback) { - return this.rpcCall(translateQuery, $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest, $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse, request, callback); - }, "name", { value: "TranslateQuery" }); - - /** - * Calls TranslateQuery. - * @function translateQuery - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationService - * @instance - * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest} request TranslateQueryRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return SqlTranslationService; - })(); - - v2alpha.TranslateQueryRequest = (function() { - - /** - * Properties of a TranslateQueryRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface ITranslateQueryRequest - * @property {string|null} [parent] TranslateQueryRequest parent - * @property {google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect|null} [sourceDialect] TranslateQueryRequest sourceDialect - * @property {string|null} [query] TranslateQueryRequest query - */ - - /** - * Constructs a new TranslateQueryRequest. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a TranslateQueryRequest. - * @implements ITranslateQueryRequest - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest=} [properties] Properties to set - */ - function TranslateQueryRequest(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]]; - } - - /** - * TranslateQueryRequest parent. - * @member {string} parent - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest - * @instance - */ - TranslateQueryRequest.prototype.parent = ""; - - /** - * TranslateQueryRequest sourceDialect. - * @member {google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect} sourceDialect - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest - * @instance - */ - TranslateQueryRequest.prototype.sourceDialect = 0; - - /** - * TranslateQueryRequest query. - * @member {string} query - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest - * @instance - */ - TranslateQueryRequest.prototype.query = ""; - - /** - * Creates a new TranslateQueryRequest instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest} TranslateQueryRequest instance - */ - TranslateQueryRequest.create = function create(properties) { - return new TranslateQueryRequest(properties); - }; - - /** - * Encodes the specified TranslateQueryRequest message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest} message TranslateQueryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TranslateQueryRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.sourceDialect != null && Object.hasOwnProperty.call(message, "sourceDialect")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.sourceDialect); - if (message.query != null && Object.hasOwnProperty.call(message, "query")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.query); - return writer; - }; - - /** - * Encodes the specified TranslateQueryRequest message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest} message TranslateQueryRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TranslateQueryRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TranslateQueryRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest - * @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.v2alpha.TranslateQueryRequest} TranslateQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranslateQueryRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.sourceDialect = reader.int32(); - break; - } - case 3: { - message.query = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TranslateQueryRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest} TranslateQueryRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranslateQueryRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TranslateQueryRequest message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TranslateQueryRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.sourceDialect != null && message.hasOwnProperty("sourceDialect")) - switch (message.sourceDialect) { - default: - return "sourceDialect: enum value expected"; - case 0: - case 1: - break; - } - if (message.query != null && message.hasOwnProperty("query")) - if (!$util.isString(message.query)) - return "query: string expected"; - return null; - }; - - /** - * Creates a TranslateQueryRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest} TranslateQueryRequest - */ - TranslateQueryRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest(); - if (object.parent != null) - message.parent = String(object.parent); - switch (object.sourceDialect) { - default: - if (typeof object.sourceDialect === "number") { - message.sourceDialect = object.sourceDialect; - break; - } - break; - case "SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED": - case 0: - message.sourceDialect = 0; - break; - case "TERADATA": - case 1: - message.sourceDialect = 1; - break; - } - if (object.query != null) - message.query = String(object.query); - return message; - }; - - /** - * Creates a plain object from a TranslateQueryRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest - * @static - * @param {google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest} message TranslateQueryRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TranslateQueryRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.parent = ""; - object.sourceDialect = options.enums === String ? "SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED" : 0; - object.query = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.sourceDialect != null && message.hasOwnProperty("sourceDialect")) - object.sourceDialect = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect[message.sourceDialect] === undefined ? message.sourceDialect : $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect[message.sourceDialect] : message.sourceDialect; - if (message.query != null && message.hasOwnProperty("query")) - object.query = message.query; - return object; - }; - - /** - * Converts this TranslateQueryRequest to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest - * @instance - * @returns {Object.} JSON object - */ - TranslateQueryRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TranslateQueryRequest - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TranslateQueryRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest"; - }; - - /** - * SqlTranslationSourceDialect enum. - * @name google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect - * @enum {number} - * @property {number} SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED=0 SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED value - * @property {number} TERADATA=1 TERADATA value - */ - TranslateQueryRequest.SqlTranslationSourceDialect = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED"] = 0; - values[valuesById[1] = "TERADATA"] = 1; - return values; - })(); - - return TranslateQueryRequest; - })(); - - v2alpha.TranslateQueryResponse = (function() { - - /** - * Properties of a TranslateQueryResponse. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface ITranslateQueryResponse - * @property {string|null} [translationJob] TranslateQueryResponse translationJob - * @property {string|null} [translatedQuery] TranslateQueryResponse translatedQuery - * @property {Array.|null} [errors] TranslateQueryResponse errors - * @property {Array.|null} [warnings] TranslateQueryResponse warnings - */ - - /** - * Constructs a new TranslateQueryResponse. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a TranslateQueryResponse. - * @implements ITranslateQueryResponse - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse=} [properties] Properties to set - */ - function TranslateQueryResponse(properties) { - this.errors = []; - this.warnings = []; - 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]]; - } - - /** - * TranslateQueryResponse translationJob. - * @member {string} translationJob - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse - * @instance - */ - TranslateQueryResponse.prototype.translationJob = ""; - - /** - * TranslateQueryResponse translatedQuery. - * @member {string} translatedQuery - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse - * @instance - */ - TranslateQueryResponse.prototype.translatedQuery = ""; - - /** - * TranslateQueryResponse errors. - * @member {Array.} errors - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse - * @instance - */ - TranslateQueryResponse.prototype.errors = $util.emptyArray; - - /** - * TranslateQueryResponse warnings. - * @member {Array.} warnings - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse - * @instance - */ - TranslateQueryResponse.prototype.warnings = $util.emptyArray; - - /** - * Creates a new TranslateQueryResponse instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse} TranslateQueryResponse instance - */ - TranslateQueryResponse.create = function create(properties) { - return new TranslateQueryResponse(properties); - }; - - /** - * Encodes the specified TranslateQueryResponse message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse} message TranslateQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TranslateQueryResponse.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.translatedQuery != null && Object.hasOwnProperty.call(message, "translatedQuery")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.translatedQuery); - if (message.errors != null && message.errors.length) - for (var i = 0; i < message.errors.length; ++i) - $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError.encode(message.errors[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.warnings != null && message.warnings.length) - for (var i = 0; i < message.warnings.length; ++i) - $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.encode(message.warnings[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.translationJob != null && Object.hasOwnProperty.call(message, "translationJob")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.translationJob); - return writer; - }; - - /** - * Encodes the specified TranslateQueryResponse message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse} message TranslateQueryResponse message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - TranslateQueryResponse.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a TranslateQueryResponse message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse - * @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.v2alpha.TranslateQueryResponse} TranslateQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranslateQueryResponse.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 4: { - message.translationJob = reader.string(); - break; - } - case 1: { - message.translatedQuery = reader.string(); - break; - } - case 2: { - if (!(message.errors && message.errors.length)) - message.errors = []; - message.errors.push($root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.warnings && message.warnings.length)) - message.warnings = []; - message.warnings.push($root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a TranslateQueryResponse message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse} TranslateQueryResponse - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - TranslateQueryResponse.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a TranslateQueryResponse message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - TranslateQueryResponse.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.translationJob != null && message.hasOwnProperty("translationJob")) - if (!$util.isString(message.translationJob)) - return "translationJob: string expected"; - if (message.translatedQuery != null && message.hasOwnProperty("translatedQuery")) - if (!$util.isString(message.translatedQuery)) - return "translatedQuery: string expected"; - if (message.errors != null && message.hasOwnProperty("errors")) { - if (!Array.isArray(message.errors)) - return "errors: array expected"; - for (var i = 0; i < message.errors.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError.verify(message.errors[i]); - if (error) - return "errors." + error; - } - } - if (message.warnings != null && message.hasOwnProperty("warnings")) { - if (!Array.isArray(message.warnings)) - return "warnings: array expected"; - for (var i = 0; i < message.warnings.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.verify(message.warnings[i]); - if (error) - return "warnings." + error; - } - } - return null; - }; - - /** - * Creates a TranslateQueryResponse message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse} TranslateQueryResponse - */ - TranslateQueryResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse(); - if (object.translationJob != null) - message.translationJob = String(object.translationJob); - if (object.translatedQuery != null) - message.translatedQuery = String(object.translatedQuery); - if (object.errors) { - if (!Array.isArray(object.errors)) - throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.errors: array expected"); - message.errors = []; - for (var i = 0; i < object.errors.length; ++i) { - if (typeof object.errors[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.errors: object expected"); - message.errors[i] = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError.fromObject(object.errors[i]); - } - } - if (object.warnings) { - if (!Array.isArray(object.warnings)) - throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.warnings: array expected"); - message.warnings = []; - for (var i = 0; i < object.warnings.length; ++i) { - if (typeof object.warnings[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse.warnings: object expected"); - message.warnings[i] = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.fromObject(object.warnings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a TranslateQueryResponse message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse - * @static - * @param {google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse} message TranslateQueryResponse - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - TranslateQueryResponse.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.errors = []; - object.warnings = []; - } - if (options.defaults) { - object.translatedQuery = ""; - object.translationJob = ""; - } - if (message.translatedQuery != null && message.hasOwnProperty("translatedQuery")) - object.translatedQuery = message.translatedQuery; - if (message.errors && message.errors.length) { - object.errors = []; - for (var j = 0; j < message.errors.length; ++j) - object.errors[j] = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError.toObject(message.errors[j], options); - } - if (message.warnings && message.warnings.length) { - object.warnings = []; - for (var j = 0; j < message.warnings.length; ++j) - object.warnings[j] = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.toObject(message.warnings[j], options); - } - if (message.translationJob != null && message.hasOwnProperty("translationJob")) - object.translationJob = message.translationJob; - return object; - }; - - /** - * Converts this TranslateQueryResponse to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse - * @instance - * @returns {Object.} JSON object - */ - TranslateQueryResponse.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for TranslateQueryResponse - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - TranslateQueryResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse"; - }; - - return TranslateQueryResponse; - })(); - - v2alpha.SqlTranslationErrorDetail = (function() { - - /** - * Properties of a SqlTranslationErrorDetail. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface ISqlTranslationErrorDetail - * @property {number|Long|null} [row] SqlTranslationErrorDetail row - * @property {number|Long|null} [column] SqlTranslationErrorDetail column - * @property {string|null} [message] SqlTranslationErrorDetail message - */ - - /** - * Constructs a new SqlTranslationErrorDetail. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a SqlTranslationErrorDetail. - * @implements ISqlTranslationErrorDetail - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail=} [properties] Properties to set - */ - function SqlTranslationErrorDetail(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]]; - } - - /** - * SqlTranslationErrorDetail row. - * @member {number|Long} row - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail - * @instance - */ - SqlTranslationErrorDetail.prototype.row = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * SqlTranslationErrorDetail column. - * @member {number|Long} column - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail - * @instance - */ - SqlTranslationErrorDetail.prototype.column = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * SqlTranslationErrorDetail message. - * @member {string} message - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail - * @instance - */ - SqlTranslationErrorDetail.prototype.message = ""; - - /** - * Creates a new SqlTranslationErrorDetail instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail} SqlTranslationErrorDetail instance - */ - SqlTranslationErrorDetail.create = function create(properties) { - return new SqlTranslationErrorDetail(properties); - }; - - /** - * Encodes the specified SqlTranslationErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail} message SqlTranslationErrorDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlTranslationErrorDetail.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.row != null && Object.hasOwnProperty.call(message, "row")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.row); - if (message.column != null && Object.hasOwnProperty.call(message, "column")) - writer.uint32(/* id 2, wireType 0 =*/16).int64(message.column); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.message); - return writer; - }; - - /** - * Encodes the specified SqlTranslationErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail} message SqlTranslationErrorDetail message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlTranslationErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlTranslationErrorDetail message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail - * @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.v2alpha.SqlTranslationErrorDetail} SqlTranslationErrorDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlTranslationErrorDetail.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.row = reader.int64(); - break; - } - case 2: { - message.column = reader.int64(); - break; - } - case 3: { - message.message = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlTranslationErrorDetail message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail} SqlTranslationErrorDetail - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlTranslationErrorDetail.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlTranslationErrorDetail message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlTranslationErrorDetail.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.row != null && message.hasOwnProperty("row")) - if (!$util.isInteger(message.row) && !(message.row && $util.isInteger(message.row.low) && $util.isInteger(message.row.high))) - return "row: integer|Long expected"; - if (message.column != null && message.hasOwnProperty("column")) - if (!$util.isInteger(message.column) && !(message.column && $util.isInteger(message.column.low) && $util.isInteger(message.column.high))) - return "column: integer|Long expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - return null; - }; - - /** - * Creates a SqlTranslationErrorDetail message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail} SqlTranslationErrorDetail - */ - SqlTranslationErrorDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail(); - if (object.row != null) - if ($util.Long) - (message.row = $util.Long.fromValue(object.row)).unsigned = false; - else if (typeof object.row === "string") - message.row = parseInt(object.row, 10); - else if (typeof object.row === "number") - message.row = object.row; - else if (typeof object.row === "object") - message.row = new $util.LongBits(object.row.low >>> 0, object.row.high >>> 0).toNumber(); - if (object.column != null) - if ($util.Long) - (message.column = $util.Long.fromValue(object.column)).unsigned = false; - else if (typeof object.column === "string") - message.column = parseInt(object.column, 10); - else if (typeof object.column === "number") - message.column = object.column; - else if (typeof object.column === "object") - message.column = new $util.LongBits(object.column.low >>> 0, object.column.high >>> 0).toNumber(); - if (object.message != null) - message.message = String(object.message); - return message; - }; - - /** - * Creates a plain object from a SqlTranslationErrorDetail message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail - * @static - * @param {google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail} message SqlTranslationErrorDetail - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlTranslationErrorDetail.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.row = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.row = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.column = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.column = options.longs === String ? "0" : 0; - object.message = ""; - } - if (message.row != null && message.hasOwnProperty("row")) - if (typeof message.row === "number") - object.row = options.longs === String ? String(message.row) : message.row; - else - object.row = options.longs === String ? $util.Long.prototype.toString.call(message.row) : options.longs === Number ? new $util.LongBits(message.row.low >>> 0, message.row.high >>> 0).toNumber() : message.row; - if (message.column != null && message.hasOwnProperty("column")) - if (typeof message.column === "number") - object.column = options.longs === String ? String(message.column) : message.column; - else - object.column = options.longs === String ? $util.Long.prototype.toString.call(message.column) : options.longs === Number ? new $util.LongBits(message.column.low >>> 0, message.column.high >>> 0).toNumber() : message.column; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - return object; - }; - - /** - * Converts this SqlTranslationErrorDetail to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail - * @instance - * @returns {Object.} JSON object - */ - SqlTranslationErrorDetail.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlTranslationErrorDetail - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlTranslationErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail"; - }; - - return SqlTranslationErrorDetail; - })(); - - v2alpha.SqlTranslationError = (function() { - - /** - * Properties of a SqlTranslationError. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface ISqlTranslationError - * @property {google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType|null} [errorType] SqlTranslationError errorType - * @property {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null} [errorDetail] SqlTranslationError errorDetail - */ - - /** - * Constructs a new SqlTranslationError. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a SqlTranslationError. - * @implements ISqlTranslationError - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationError=} [properties] Properties to set - */ - function SqlTranslationError(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]]; - } - - /** - * SqlTranslationError errorType. - * @member {google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType} errorType - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError - * @instance - */ - SqlTranslationError.prototype.errorType = 0; - - /** - * SqlTranslationError errorDetail. - * @member {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null|undefined} errorDetail - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError - * @instance - */ - SqlTranslationError.prototype.errorDetail = null; - - /** - * Creates a new SqlTranslationError instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationError=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationError} SqlTranslationError instance - */ - SqlTranslationError.create = function create(properties) { - return new SqlTranslationError(properties); - }; - - /** - * Encodes the specified SqlTranslationError message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationError.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationError} message SqlTranslationError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlTranslationError.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.errorType != null && Object.hasOwnProperty.call(message, "errorType")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.errorType); - if (message.errorDetail != null && Object.hasOwnProperty.call(message, "errorDetail")) - $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.encode(message.errorDetail, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SqlTranslationError message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationError.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationError} message SqlTranslationError message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlTranslationError.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlTranslationError message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError - * @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.v2alpha.SqlTranslationError} SqlTranslationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlTranslationError.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.errorType = reader.int32(); - break; - } - case 2: { - message.errorDetail = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlTranslationError message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationError} SqlTranslationError - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlTranslationError.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlTranslationError message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlTranslationError.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.errorType != null && message.hasOwnProperty("errorType")) - switch (message.errorType) { - default: - return "errorType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.errorDetail != null && message.hasOwnProperty("errorDetail")) { - var error = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.verify(message.errorDetail); - if (error) - return "errorDetail." + error; - } - return null; - }; - - /** - * Creates a SqlTranslationError message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationError} SqlTranslationError - */ - SqlTranslationError.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError(); - switch (object.errorType) { - default: - if (typeof object.errorType === "number") { - message.errorType = object.errorType; - break; - } - break; - case "SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED": - case 0: - message.errorType = 0; - break; - case "SQL_PARSE_ERROR": - case 1: - message.errorType = 1; - break; - case "UNSUPPORTED_SQL_FUNCTION": - case 2: - message.errorType = 2; - break; - } - if (object.errorDetail != null) { - if (typeof object.errorDetail !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.SqlTranslationError.errorDetail: object expected"); - message.errorDetail = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.fromObject(object.errorDetail); - } - return message; - }; - - /** - * Creates a plain object from a SqlTranslationError message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError - * @static - * @param {google.cloud.bigquery.migration.v2alpha.SqlTranslationError} message SqlTranslationError - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlTranslationError.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.errorType = options.enums === String ? "SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED" : 0; - object.errorDetail = null; - } - if (message.errorType != null && message.hasOwnProperty("errorType")) - object.errorType = options.enums === String ? $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType[message.errorType] === undefined ? message.errorType : $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType[message.errorType] : message.errorType; - if (message.errorDetail != null && message.hasOwnProperty("errorDetail")) - object.errorDetail = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.toObject(message.errorDetail, options); - return object; - }; - - /** - * Converts this SqlTranslationError to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError - * @instance - * @returns {Object.} JSON object - */ - SqlTranslationError.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlTranslationError - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationError - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlTranslationError.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.SqlTranslationError"; - }; - - /** - * SqlTranslationErrorType enum. - * @name google.cloud.bigquery.migration.v2alpha.SqlTranslationError.SqlTranslationErrorType - * @enum {number} - * @property {number} SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED=0 SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED value - * @property {number} SQL_PARSE_ERROR=1 SQL_PARSE_ERROR value - * @property {number} UNSUPPORTED_SQL_FUNCTION=2 UNSUPPORTED_SQL_FUNCTION value - */ - SqlTranslationError.SqlTranslationErrorType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SQL_PARSE_ERROR"] = 1; - values[valuesById[2] = "UNSUPPORTED_SQL_FUNCTION"] = 2; - return values; - })(); - - return SqlTranslationError; - })(); - - v2alpha.SqlTranslationWarning = (function() { - - /** - * Properties of a SqlTranslationWarning. - * @memberof google.cloud.bigquery.migration.v2alpha - * @interface ISqlTranslationWarning - * @property {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null} [warningDetail] SqlTranslationWarning warningDetail - */ - - /** - * Constructs a new SqlTranslationWarning. - * @memberof google.cloud.bigquery.migration.v2alpha - * @classdesc Represents a SqlTranslationWarning. - * @implements ISqlTranslationWarning - * @constructor - * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning=} [properties] Properties to set - */ - function SqlTranslationWarning(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]]; - } - - /** - * SqlTranslationWarning warningDetail. - * @member {google.cloud.bigquery.migration.v2alpha.ISqlTranslationErrorDetail|null|undefined} warningDetail - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning - * @instance - */ - SqlTranslationWarning.prototype.warningDetail = null; - - /** - * Creates a new SqlTranslationWarning instance using the specified properties. - * @function create - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning} SqlTranslationWarning instance - */ - SqlTranslationWarning.create = function create(properties) { - return new SqlTranslationWarning(properties); - }; - - /** - * Encodes the specified SqlTranslationWarning message. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.verify|verify} messages. - * @function encode - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning} message SqlTranslationWarning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlTranslationWarning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.warningDetail != null && Object.hasOwnProperty.call(message, "warningDetail")) - $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.encode(message.warningDetail, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SqlTranslationWarning message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning - * @static - * @param {google.cloud.bigquery.migration.v2alpha.ISqlTranslationWarning} message SqlTranslationWarning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SqlTranslationWarning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SqlTranslationWarning message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning - * @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.v2alpha.SqlTranslationWarning} SqlTranslationWarning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlTranslationWarning.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.warningDetail = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SqlTranslationWarning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning} SqlTranslationWarning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SqlTranslationWarning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SqlTranslationWarning message. - * @function verify - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SqlTranslationWarning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.warningDetail != null && message.hasOwnProperty("warningDetail")) { - var error = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.verify(message.warningDetail); - if (error) - return "warningDetail." + error; - } - return null; - }; - - /** - * Creates a SqlTranslationWarning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning} SqlTranslationWarning - */ - SqlTranslationWarning.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning) - return object; - var message = new $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning(); - if (object.warningDetail != null) { - if (typeof object.warningDetail !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning.warningDetail: object expected"); - message.warningDetail = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.fromObject(object.warningDetail); - } - return message; - }; - - /** - * Creates a plain object from a SqlTranslationWarning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning - * @static - * @param {google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning} message SqlTranslationWarning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SqlTranslationWarning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.warningDetail = null; - if (message.warningDetail != null && message.hasOwnProperty("warningDetail")) - object.warningDetail = $root.google.cloud.bigquery.migration.v2alpha.SqlTranslationErrorDetail.toObject(message.warningDetail, options); - return object; - }; - - /** - * Converts this SqlTranslationWarning to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning - * @instance - * @returns {Object.} JSON object - */ - SqlTranslationWarning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SqlTranslationWarning - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SqlTranslationWarning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2alpha.SqlTranslationWarning"; - }; - - return SqlTranslationWarning; - })(); - - return v2alpha; - })(); - - return migration; - })(); - - return bigquery; - })(); - - return cloud; - })(); - - google.api = (function() { - - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; - - /** - * FieldBehavior enum. - * @name google.api.FieldBehavior - * @enum {number} - * @property {number} FIELD_BEHAVIOR_UNSPECIFIED=0 FIELD_BEHAVIOR_UNSPECIFIED value - * @property {number} OPTIONAL=1 OPTIONAL value - * @property {number} REQUIRED=2 REQUIRED value - * @property {number} OUTPUT_ONLY=3 OUTPUT_ONLY value - * @property {number} INPUT_ONLY=4 INPUT_ONLY value - * @property {number} IMMUTABLE=5 IMMUTABLE value - * @property {number} UNORDERED_LIST=6 UNORDERED_LIST value - * @property {number} NON_EMPTY_DEFAULT=7 NON_EMPTY_DEFAULT value - * @property {number} IDENTIFIER=8 IDENTIFIER value - */ - api.FieldBehavior = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_BEHAVIOR_UNSPECIFIED"] = 0; - values[valuesById[1] = "OPTIONAL"] = 1; - values[valuesById[2] = "REQUIRED"] = 2; - values[valuesById[3] = "OUTPUT_ONLY"] = 3; - values[valuesById[4] = "INPUT_ONLY"] = 4; - values[valuesById[5] = "IMMUTABLE"] = 5; - values[valuesById[6] = "UNORDERED_LIST"] = 6; - values[valuesById[7] = "NON_EMPTY_DEFAULT"] = 7; - values[valuesById[8] = "IDENTIFIER"] = 8; - return values; - })(); - - api.ResourceDescriptor = (function() { - - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ - - /** - * Constructs a new ResourceDescriptor. - * @memberof google.api - * @classdesc Represents a ResourceDescriptor. - * @implements IResourceDescriptor - * @constructor - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - */ - function ResourceDescriptor(properties) { - this.pattern = []; - this.style = []; - 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]]; - } - - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; - - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; - - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; - - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; - - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; - - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; - - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; - - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @function create - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor=} [properties] Properties to set - * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance - */ - ResourceDescriptor.create = function create(properties) { - return new ResourceDescriptor(properties); - }; - - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.pattern != null && message.pattern.length) - for (var i = 0; i < message.pattern.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.pattern[i]); - if (message.nameField != null && Object.hasOwnProperty.call(message, "nameField")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.nameField); - if (message.history != null && Object.hasOwnProperty.call(message, "history")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.history); - if (message.plural != null && Object.hasOwnProperty.call(message, "plural")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.plural); - if (message.singular != null && Object.hasOwnProperty.call(message, "singular")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.singular); - if (message.style != null && message.style.length) { - writer.uint32(/* id 10, wireType 2 =*/82).fork(); - for (var i = 0; i < message.style.length; ++i) - writer.int32(message.style[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.pattern != null && message.hasOwnProperty("pattern")) { - if (!Array.isArray(message.pattern)) - return "pattern: array expected"; - for (var i = 0; i < message.pattern.length; ++i) - if (!$util.isString(message.pattern[i])) - return "pattern: string[] expected"; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - if (!$util.isString(message.nameField)) - return "nameField: string expected"; - if (message.history != null && message.hasOwnProperty("history")) - switch (message.history) { - default: - return "history: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } - } - return null; - }; - - /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) - return object; - var message = new $root.google.api.ResourceDescriptor(); - if (object.type != null) - message.type = String(object.type); - if (object.pattern) { - if (!Array.isArray(object.pattern)) - throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); - message.pattern = []; - for (var i = 0; i < object.pattern.length; ++i) - message.pattern[i] = String(object.pattern[i]); - } - if (object.nameField != null) - message.nameField = String(object.nameField); - switch (object.history) { - default: - if (typeof object.history === "number") { - message.history = object.history; - break; - } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceDescriptor - * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.pattern = []; - object.style = []; - } - if (options.defaults) { - object.type = ""; - object.nameField = ""; - object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; - object.plural = ""; - object.singular = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.pattern && message.pattern.length) { - object.pattern = []; - for (var j = 0; j < message.pattern.length; ++j) - object.pattern[j] = message.pattern[j]; - } - if (message.nameField != null && message.hasOwnProperty("nameField")) - object.nameField = message.nameField; - if (message.history != null && message.hasOwnProperty("history")) - object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; - if (message.plural != null && message.hasOwnProperty("plural")) - object.plural = message.plural; - if (message.singular != null && message.hasOwnProperty("singular")) - object.singular = message.singular; - if (message.style && message.style.length) { - object.style = []; - for (var j = 0; j < message.style.length; ++j) - object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; - } - return object; - }; - - /** - * Converts this ResourceDescriptor to JSON. - * @function toJSON - * @memberof google.api.ResourceDescriptor - * @instance - * @returns {Object.} JSON object - */ - ResourceDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceDescriptor - * @function getTypeUrl - * @memberof google.api.ResourceDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; - }; - - /** - * History enum. - * @name google.api.ResourceDescriptor.History - * @enum {number} - * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value - * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value - * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value - */ - ResourceDescriptor.History = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; - values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; - values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; - return values; - })(); - - /** - * Style enum. - * @name google.api.ResourceDescriptor.Style - * @enum {number} - * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value - * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value - */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { - - /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType - */ - - /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set - */ - function ResourceReference(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]]; - } - - /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.type = ""; - - /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference - * @instance - */ - ResourceReference.prototype.childType = ""; - - /** - * Creates a new ResourceReference instance using the specified properties. - * @function create - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance - */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); - }; - - /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encode - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); - return writer; - }; - - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.childType = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceReference message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceReference - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ResourceReference} ResourceReference - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceReference.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceReference message. - * @function verify - * @memberof google.api.ResourceReference - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceReference.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.childType != null && message.hasOwnProperty("childType")) - if (!$util.isString(message.childType)) - return "childType: string expected"; - return null; - }; - - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ResourceReference - * @static - * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference - */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) - return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); - return message; - }; - - /** - * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ResourceReference - * @static - * @param {google.api.ResourceReference} message ResourceReference - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceReference.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.childType = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; - return object; - }; - - /** - * Converts this ResourceReference to JSON. - * @function toJSON - * @memberof google.api.ResourceReference - * @instance - * @returns {Object.} JSON object - */ - ResourceReference.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceReference - * @function getTypeUrl - * @memberof google.api.ResourceReference - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ResourceReference"; - }; - - return ResourceReference; - })(); - - api.Distribution = (function() { - - /** - * Properties of a Distribution. - * @memberof google.api - * @interface IDistribution - * @property {number|Long|null} [count] Distribution count - * @property {number|null} [mean] Distribution mean - * @property {number|null} [sumOfSquaredDeviation] Distribution sumOfSquaredDeviation - * @property {google.api.Distribution.IRange|null} [range] Distribution range - * @property {google.api.Distribution.IBucketOptions|null} [bucketOptions] Distribution bucketOptions - * @property {Array.|null} [bucketCounts] Distribution bucketCounts - * @property {Array.|null} [exemplars] Distribution exemplars - */ - - /** - * Constructs a new Distribution. - * @memberof google.api - * @classdesc Represents a Distribution. - * @implements IDistribution - * @constructor - * @param {google.api.IDistribution=} [properties] Properties to set - */ - function Distribution(properties) { - this.bucketCounts = []; - this.exemplars = []; - 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]]; - } - - /** - * Distribution count. - * @member {number|Long} count - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.count = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Distribution mean. - * @member {number} mean - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.mean = 0; - - /** - * Distribution sumOfSquaredDeviation. - * @member {number} sumOfSquaredDeviation - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.sumOfSquaredDeviation = 0; - - /** - * Distribution range. - * @member {google.api.Distribution.IRange|null|undefined} range - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.range = null; - - /** - * Distribution bucketOptions. - * @member {google.api.Distribution.IBucketOptions|null|undefined} bucketOptions - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.bucketOptions = null; - - /** - * Distribution bucketCounts. - * @member {Array.} bucketCounts - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.bucketCounts = $util.emptyArray; - - /** - * Distribution exemplars. - * @member {Array.} exemplars - * @memberof google.api.Distribution - * @instance - */ - Distribution.prototype.exemplars = $util.emptyArray; - - /** - * Creates a new Distribution instance using the specified properties. - * @function create - * @memberof google.api.Distribution - * @static - * @param {google.api.IDistribution=} [properties] Properties to set - * @returns {google.api.Distribution} Distribution instance - */ - Distribution.create = function create(properties) { - return new Distribution(properties); - }; - - /** - * Encodes the specified Distribution message. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution - * @static - * @param {google.api.IDistribution} message Distribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Distribution.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.count != null && Object.hasOwnProperty.call(message, "count")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.count); - if (message.mean != null && Object.hasOwnProperty.call(message, "mean")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.mean); - if (message.sumOfSquaredDeviation != null && Object.hasOwnProperty.call(message, "sumOfSquaredDeviation")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.sumOfSquaredDeviation); - if (message.range != null && Object.hasOwnProperty.call(message, "range")) - $root.google.api.Distribution.Range.encode(message.range, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.bucketOptions != null && Object.hasOwnProperty.call(message, "bucketOptions")) - $root.google.api.Distribution.BucketOptions.encode(message.bucketOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.bucketCounts != null && message.bucketCounts.length) { - writer.uint32(/* id 7, wireType 2 =*/58).fork(); - for (var i = 0; i < message.bucketCounts.length; ++i) - writer.int64(message.bucketCounts[i]); - writer.ldelim(); - } - if (message.exemplars != null && message.exemplars.length) - for (var i = 0; i < message.exemplars.length; ++i) - $root.google.api.Distribution.Exemplar.encode(message.exemplars[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Distribution message, length delimited. Does not implicitly {@link google.api.Distribution.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution - * @static - * @param {google.api.IDistribution} message Distribution message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Distribution.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Distribution message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution} Distribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Distribution.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.count = reader.int64(); - break; - } - case 2: { - message.mean = reader.double(); - break; - } - case 3: { - message.sumOfSquaredDeviation = reader.double(); - break; - } - case 4: { - message.range = $root.google.api.Distribution.Range.decode(reader, reader.uint32()); - break; - } - case 6: { - message.bucketOptions = $root.google.api.Distribution.BucketOptions.decode(reader, reader.uint32()); - break; - } - case 7: { - if (!(message.bucketCounts && message.bucketCounts.length)) - message.bucketCounts = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.bucketCounts.push(reader.int64()); - } else - message.bucketCounts.push(reader.int64()); - break; - } - case 10: { - if (!(message.exemplars && message.exemplars.length)) - message.exemplars = []; - message.exemplars.push($root.google.api.Distribution.Exemplar.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Distribution message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution} Distribution - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Distribution.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Distribution message. - * @function verify - * @memberof google.api.Distribution - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Distribution.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.count != null && message.hasOwnProperty("count")) - if (!$util.isInteger(message.count) && !(message.count && $util.isInteger(message.count.low) && $util.isInteger(message.count.high))) - return "count: integer|Long expected"; - if (message.mean != null && message.hasOwnProperty("mean")) - if (typeof message.mean !== "number") - return "mean: number expected"; - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) - if (typeof message.sumOfSquaredDeviation !== "number") - return "sumOfSquaredDeviation: number expected"; - if (message.range != null && message.hasOwnProperty("range")) { - var error = $root.google.api.Distribution.Range.verify(message.range); - if (error) - return "range." + error; - } - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) { - var error = $root.google.api.Distribution.BucketOptions.verify(message.bucketOptions); - if (error) - return "bucketOptions." + error; - } - if (message.bucketCounts != null && message.hasOwnProperty("bucketCounts")) { - if (!Array.isArray(message.bucketCounts)) - return "bucketCounts: array expected"; - for (var i = 0; i < message.bucketCounts.length; ++i) - if (!$util.isInteger(message.bucketCounts[i]) && !(message.bucketCounts[i] && $util.isInteger(message.bucketCounts[i].low) && $util.isInteger(message.bucketCounts[i].high))) - return "bucketCounts: integer|Long[] expected"; - } - if (message.exemplars != null && message.hasOwnProperty("exemplars")) { - if (!Array.isArray(message.exemplars)) - return "exemplars: array expected"; - for (var i = 0; i < message.exemplars.length; ++i) { - var error = $root.google.api.Distribution.Exemplar.verify(message.exemplars[i]); - if (error) - return "exemplars." + error; - } - } - return null; - }; - - /** - * Creates a Distribution message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution} Distribution - */ - Distribution.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution) - return object; - var message = new $root.google.api.Distribution(); - if (object.count != null) - if ($util.Long) - (message.count = $util.Long.fromValue(object.count)).unsigned = false; - else if (typeof object.count === "string") - message.count = parseInt(object.count, 10); - else if (typeof object.count === "number") - message.count = object.count; - else if (typeof object.count === "object") - message.count = new $util.LongBits(object.count.low >>> 0, object.count.high >>> 0).toNumber(); - if (object.mean != null) - message.mean = Number(object.mean); - if (object.sumOfSquaredDeviation != null) - message.sumOfSquaredDeviation = Number(object.sumOfSquaredDeviation); - if (object.range != null) { - if (typeof object.range !== "object") - throw TypeError(".google.api.Distribution.range: object expected"); - message.range = $root.google.api.Distribution.Range.fromObject(object.range); - } - if (object.bucketOptions != null) { - if (typeof object.bucketOptions !== "object") - throw TypeError(".google.api.Distribution.bucketOptions: object expected"); - message.bucketOptions = $root.google.api.Distribution.BucketOptions.fromObject(object.bucketOptions); - } - if (object.bucketCounts) { - if (!Array.isArray(object.bucketCounts)) - throw TypeError(".google.api.Distribution.bucketCounts: array expected"); - message.bucketCounts = []; - for (var i = 0; i < object.bucketCounts.length; ++i) - if ($util.Long) - (message.bucketCounts[i] = $util.Long.fromValue(object.bucketCounts[i])).unsigned = false; - else if (typeof object.bucketCounts[i] === "string") - message.bucketCounts[i] = parseInt(object.bucketCounts[i], 10); - else if (typeof object.bucketCounts[i] === "number") - message.bucketCounts[i] = object.bucketCounts[i]; - else if (typeof object.bucketCounts[i] === "object") - message.bucketCounts[i] = new $util.LongBits(object.bucketCounts[i].low >>> 0, object.bucketCounts[i].high >>> 0).toNumber(); - } - if (object.exemplars) { - if (!Array.isArray(object.exemplars)) - throw TypeError(".google.api.Distribution.exemplars: array expected"); - message.exemplars = []; - for (var i = 0; i < object.exemplars.length; ++i) { - if (typeof object.exemplars[i] !== "object") - throw TypeError(".google.api.Distribution.exemplars: object expected"); - message.exemplars[i] = $root.google.api.Distribution.Exemplar.fromObject(object.exemplars[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Distribution message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution - * @static - * @param {google.api.Distribution} message Distribution - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Distribution.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.bucketCounts = []; - object.exemplars = []; - } - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.count = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.count = options.longs === String ? "0" : 0; - object.mean = 0; - object.sumOfSquaredDeviation = 0; - object.range = null; - object.bucketOptions = null; - } - if (message.count != null && message.hasOwnProperty("count")) - if (typeof message.count === "number") - object.count = options.longs === String ? String(message.count) : message.count; - else - object.count = options.longs === String ? $util.Long.prototype.toString.call(message.count) : options.longs === Number ? new $util.LongBits(message.count.low >>> 0, message.count.high >>> 0).toNumber() : message.count; - if (message.mean != null && message.hasOwnProperty("mean")) - object.mean = options.json && !isFinite(message.mean) ? String(message.mean) : message.mean; - if (message.sumOfSquaredDeviation != null && message.hasOwnProperty("sumOfSquaredDeviation")) - object.sumOfSquaredDeviation = options.json && !isFinite(message.sumOfSquaredDeviation) ? String(message.sumOfSquaredDeviation) : message.sumOfSquaredDeviation; - if (message.range != null && message.hasOwnProperty("range")) - object.range = $root.google.api.Distribution.Range.toObject(message.range, options); - if (message.bucketOptions != null && message.hasOwnProperty("bucketOptions")) - object.bucketOptions = $root.google.api.Distribution.BucketOptions.toObject(message.bucketOptions, options); - if (message.bucketCounts && message.bucketCounts.length) { - object.bucketCounts = []; - for (var j = 0; j < message.bucketCounts.length; ++j) - if (typeof message.bucketCounts[j] === "number") - object.bucketCounts[j] = options.longs === String ? String(message.bucketCounts[j]) : message.bucketCounts[j]; - else - object.bucketCounts[j] = options.longs === String ? $util.Long.prototype.toString.call(message.bucketCounts[j]) : options.longs === Number ? new $util.LongBits(message.bucketCounts[j].low >>> 0, message.bucketCounts[j].high >>> 0).toNumber() : message.bucketCounts[j]; - } - if (message.exemplars && message.exemplars.length) { - object.exemplars = []; - for (var j = 0; j < message.exemplars.length; ++j) - object.exemplars[j] = $root.google.api.Distribution.Exemplar.toObject(message.exemplars[j], options); - } - return object; - }; - - /** - * Converts this Distribution to JSON. - * @function toJSON - * @memberof google.api.Distribution - * @instance - * @returns {Object.} JSON object - */ - Distribution.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Distribution - * @function getTypeUrl - * @memberof google.api.Distribution - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Distribution.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Distribution"; - }; - - Distribution.Range = (function() { - - /** - * Properties of a Range. - * @memberof google.api.Distribution - * @interface IRange - * @property {number|null} [min] Range min - * @property {number|null} [max] Range max - */ - - /** - * Constructs a new Range. - * @memberof google.api.Distribution - * @classdesc Represents a Range. - * @implements IRange - * @constructor - * @param {google.api.Distribution.IRange=} [properties] Properties to set - */ - function Range(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]]; - } - - /** - * Range min. - * @member {number} min - * @memberof google.api.Distribution.Range - * @instance - */ - Range.prototype.min = 0; - - /** - * Range max. - * @member {number} max - * @memberof google.api.Distribution.Range - * @instance - */ - Range.prototype.max = 0; - - /** - * Creates a new Range instance using the specified properties. - * @function create - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.IRange=} [properties] Properties to set - * @returns {google.api.Distribution.Range} Range instance - */ - Range.create = function create(properties) { - return new Range(properties); - }; - - /** - * Encodes the specified Range message. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.IRange} message Range message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Range.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.min != null && Object.hasOwnProperty.call(message, "min")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.min); - if (message.max != null && Object.hasOwnProperty.call(message, "max")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.max); - return writer; - }; - - /** - * Encodes the specified Range message, length delimited. Does not implicitly {@link google.api.Distribution.Range.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.IRange} message Range message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Range.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Range message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.Range - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.Range} Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Range.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Range(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.min = reader.double(); - break; - } - case 2: { - message.max = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Range message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.Range - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.Range} Range - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Range.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Range message. - * @function verify - * @memberof google.api.Distribution.Range - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Range.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.min != null && message.hasOwnProperty("min")) - if (typeof message.min !== "number") - return "min: number expected"; - if (message.max != null && message.hasOwnProperty("max")) - if (typeof message.max !== "number") - return "max: number expected"; - return null; - }; - - /** - * Creates a Range message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.Range - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.Range} Range - */ - Range.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.Range) - return object; - var message = new $root.google.api.Distribution.Range(); - if (object.min != null) - message.min = Number(object.min); - if (object.max != null) - message.max = Number(object.max); - return message; - }; - - /** - * Creates a plain object from a Range message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.Range - * @static - * @param {google.api.Distribution.Range} message Range - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Range.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.min = 0; - object.max = 0; - } - if (message.min != null && message.hasOwnProperty("min")) - object.min = options.json && !isFinite(message.min) ? String(message.min) : message.min; - if (message.max != null && message.hasOwnProperty("max")) - object.max = options.json && !isFinite(message.max) ? String(message.max) : message.max; - return object; - }; - - /** - * Converts this Range to JSON. - * @function toJSON - * @memberof google.api.Distribution.Range - * @instance - * @returns {Object.} JSON object - */ - Range.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Range - * @function getTypeUrl - * @memberof google.api.Distribution.Range - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Range.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Distribution.Range"; - }; - - return Range; - })(); - - Distribution.BucketOptions = (function() { - - /** - * Properties of a BucketOptions. - * @memberof google.api.Distribution - * @interface IBucketOptions - * @property {google.api.Distribution.BucketOptions.ILinear|null} [linearBuckets] BucketOptions linearBuckets - * @property {google.api.Distribution.BucketOptions.IExponential|null} [exponentialBuckets] BucketOptions exponentialBuckets - * @property {google.api.Distribution.BucketOptions.IExplicit|null} [explicitBuckets] BucketOptions explicitBuckets - */ - - /** - * Constructs a new BucketOptions. - * @memberof google.api.Distribution - * @classdesc Represents a BucketOptions. - * @implements IBucketOptions - * @constructor - * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set - */ - function BucketOptions(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]]; - } - - /** - * BucketOptions linearBuckets. - * @member {google.api.Distribution.BucketOptions.ILinear|null|undefined} linearBuckets - * @memberof google.api.Distribution.BucketOptions - * @instance - */ - BucketOptions.prototype.linearBuckets = null; - - /** - * BucketOptions exponentialBuckets. - * @member {google.api.Distribution.BucketOptions.IExponential|null|undefined} exponentialBuckets - * @memberof google.api.Distribution.BucketOptions - * @instance - */ - BucketOptions.prototype.exponentialBuckets = null; - - /** - * BucketOptions explicitBuckets. - * @member {google.api.Distribution.BucketOptions.IExplicit|null|undefined} explicitBuckets - * @memberof google.api.Distribution.BucketOptions - * @instance - */ - BucketOptions.prototype.explicitBuckets = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * BucketOptions options. - * @member {"linearBuckets"|"exponentialBuckets"|"explicitBuckets"|undefined} options - * @memberof google.api.Distribution.BucketOptions - * @instance - */ - Object.defineProperty(BucketOptions.prototype, "options", { - get: $util.oneOfGetter($oneOfFields = ["linearBuckets", "exponentialBuckets", "explicitBuckets"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new BucketOptions instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {google.api.Distribution.IBucketOptions=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions} BucketOptions instance - */ - BucketOptions.create = function create(properties) { - return new BucketOptions(properties); - }; - - /** - * Encodes the specified BucketOptions message. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BucketOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.linearBuckets != null && Object.hasOwnProperty.call(message, "linearBuckets")) - $root.google.api.Distribution.BucketOptions.Linear.encode(message.linearBuckets, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.exponentialBuckets != null && Object.hasOwnProperty.call(message, "exponentialBuckets")) - $root.google.api.Distribution.BucketOptions.Exponential.encode(message.exponentialBuckets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.explicitBuckets != null && Object.hasOwnProperty.call(message, "explicitBuckets")) - $root.google.api.Distribution.BucketOptions.Explicit.encode(message.explicitBuckets, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BucketOptions message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {google.api.Distribution.IBucketOptions} message BucketOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BucketOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BucketOptions message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions} BucketOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BucketOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.decode(reader, reader.uint32()); - break; - } - case 2: { - message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.decode(reader, reader.uint32()); - break; - } - case 3: { - message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BucketOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions} BucketOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BucketOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BucketOptions message. - * @function verify - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BucketOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Linear.verify(message.linearBuckets); - if (error) - return "linearBuckets." + error; - } - } - if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Exponential.verify(message.exponentialBuckets); - if (error) - return "exponentialBuckets." + error; - } - } - if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { - if (properties.options === 1) - return "options: multiple values"; - properties.options = 1; - { - var error = $root.google.api.Distribution.BucketOptions.Explicit.verify(message.explicitBuckets); - if (error) - return "explicitBuckets." + error; - } - } - return null; - }; - - /** - * Creates a BucketOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions} BucketOptions - */ - BucketOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions) - return object; - var message = new $root.google.api.Distribution.BucketOptions(); - if (object.linearBuckets != null) { - if (typeof object.linearBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.linearBuckets: object expected"); - message.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.fromObject(object.linearBuckets); - } - if (object.exponentialBuckets != null) { - if (typeof object.exponentialBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.exponentialBuckets: object expected"); - message.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.fromObject(object.exponentialBuckets); - } - if (object.explicitBuckets != null) { - if (typeof object.explicitBuckets !== "object") - throw TypeError(".google.api.Distribution.BucketOptions.explicitBuckets: object expected"); - message.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.fromObject(object.explicitBuckets); - } - return message; - }; - - /** - * Creates a plain object from a BucketOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {google.api.Distribution.BucketOptions} message BucketOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BucketOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.linearBuckets != null && message.hasOwnProperty("linearBuckets")) { - object.linearBuckets = $root.google.api.Distribution.BucketOptions.Linear.toObject(message.linearBuckets, options); - if (options.oneofs) - object.options = "linearBuckets"; - } - if (message.exponentialBuckets != null && message.hasOwnProperty("exponentialBuckets")) { - object.exponentialBuckets = $root.google.api.Distribution.BucketOptions.Exponential.toObject(message.exponentialBuckets, options); - if (options.oneofs) - object.options = "exponentialBuckets"; - } - if (message.explicitBuckets != null && message.hasOwnProperty("explicitBuckets")) { - object.explicitBuckets = $root.google.api.Distribution.BucketOptions.Explicit.toObject(message.explicitBuckets, options); - if (options.oneofs) - object.options = "explicitBuckets"; - } - return object; - }; - - /** - * Converts this BucketOptions to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions - * @instance - * @returns {Object.} JSON object - */ - BucketOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BucketOptions - * @function getTypeUrl - * @memberof google.api.Distribution.BucketOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BucketOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Distribution.BucketOptions"; - }; - - BucketOptions.Linear = (function() { - - /** - * Properties of a Linear. - * @memberof google.api.Distribution.BucketOptions - * @interface ILinear - * @property {number|null} [numFiniteBuckets] Linear numFiniteBuckets - * @property {number|null} [width] Linear width - * @property {number|null} [offset] Linear offset - */ - - /** - * Constructs a new Linear. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents a Linear. - * @implements ILinear - * @constructor - * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set - */ - function Linear(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]]; - } - - /** - * Linear numFiniteBuckets. - * @member {number} numFiniteBuckets - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.numFiniteBuckets = 0; - - /** - * Linear width. - * @member {number} width - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.width = 0; - - /** - * Linear offset. - * @member {number} offset - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - */ - Linear.prototype.offset = 0; - - /** - * Creates a new Linear instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Linear} Linear instance - */ - Linear.create = function create(properties) { - return new Linear(properties); - }; - - /** - * Encodes the specified Linear message. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Linear.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.width != null && Object.hasOwnProperty.call(message, "width")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.width); - if (message.offset != null && Object.hasOwnProperty.call(message, "offset")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.offset); - return writer; - }; - - /** - * Encodes the specified Linear message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Linear.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.ILinear} message Linear message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Linear.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Linear message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Linear.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Linear(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.numFiniteBuckets = reader.int32(); - break; - } - case 2: { - message.width = reader.double(); - break; - } - case 3: { - message.offset = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Linear message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Linear.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Linear message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Linear.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - if (!$util.isInteger(message.numFiniteBuckets)) - return "numFiniteBuckets: integer expected"; - if (message.width != null && message.hasOwnProperty("width")) - if (typeof message.width !== "number") - return "width: number expected"; - if (message.offset != null && message.hasOwnProperty("offset")) - if (typeof message.offset !== "number") - return "offset: number expected"; - return null; - }; - - /** - * Creates a Linear message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Linear} Linear - */ - Linear.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Linear) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Linear(); - if (object.numFiniteBuckets != null) - message.numFiniteBuckets = object.numFiniteBuckets | 0; - if (object.width != null) - message.width = Number(object.width); - if (object.offset != null) - message.offset = Number(object.offset); - return message; - }; - - /** - * Creates a plain object from a Linear message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {google.api.Distribution.BucketOptions.Linear} message Linear - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Linear.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.numFiniteBuckets = 0; - object.width = 0; - object.offset = 0; - } - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - object.numFiniteBuckets = message.numFiniteBuckets; - if (message.width != null && message.hasOwnProperty("width")) - object.width = options.json && !isFinite(message.width) ? String(message.width) : message.width; - if (message.offset != null && message.hasOwnProperty("offset")) - object.offset = options.json && !isFinite(message.offset) ? String(message.offset) : message.offset; - return object; - }; - - /** - * Converts this Linear to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Linear - * @instance - * @returns {Object.} JSON object - */ - Linear.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Linear - * @function getTypeUrl - * @memberof google.api.Distribution.BucketOptions.Linear - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Linear.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Distribution.BucketOptions.Linear"; - }; - - return Linear; - })(); - - BucketOptions.Exponential = (function() { - - /** - * Properties of an Exponential. - * @memberof google.api.Distribution.BucketOptions - * @interface IExponential - * @property {number|null} [numFiniteBuckets] Exponential numFiniteBuckets - * @property {number|null} [growthFactor] Exponential growthFactor - * @property {number|null} [scale] Exponential scale - */ - - /** - * Constructs a new Exponential. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents an Exponential. - * @implements IExponential - * @constructor - * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set - */ - function Exponential(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]]; - } - - /** - * Exponential numFiniteBuckets. - * @member {number} numFiniteBuckets - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.numFiniteBuckets = 0; - - /** - * Exponential growthFactor. - * @member {number} growthFactor - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.growthFactor = 0; - - /** - * Exponential scale. - * @member {number} scale - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - */ - Exponential.prototype.scale = 0; - - /** - * Creates a new Exponential instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential instance - */ - Exponential.create = function create(properties) { - return new Exponential(properties); - }; - - /** - * Encodes the specified Exponential message. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exponential.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.numFiniteBuckets != null && Object.hasOwnProperty.call(message, "numFiniteBuckets")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.numFiniteBuckets); - if (message.growthFactor != null && Object.hasOwnProperty.call(message, "growthFactor")) - writer.uint32(/* id 2, wireType 1 =*/17).double(message.growthFactor); - if (message.scale != null && Object.hasOwnProperty.call(message, "scale")) - writer.uint32(/* id 3, wireType 1 =*/25).double(message.scale); - return writer; - }; - - /** - * Encodes the specified Exponential message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Exponential.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.IExponential} message Exponential message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exponential.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Exponential message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exponential.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Exponential(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.numFiniteBuckets = reader.int32(); - break; - } - case 2: { - message.growthFactor = reader.double(); - break; - } - case 3: { - message.scale = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Exponential message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exponential.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Exponential message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Exponential.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - if (!$util.isInteger(message.numFiniteBuckets)) - return "numFiniteBuckets: integer expected"; - if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) - if (typeof message.growthFactor !== "number") - return "growthFactor: number expected"; - if (message.scale != null && message.hasOwnProperty("scale")) - if (typeof message.scale !== "number") - return "scale: number expected"; - return null; - }; - - /** - * Creates an Exponential message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Exponential} Exponential - */ - Exponential.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Exponential) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Exponential(); - if (object.numFiniteBuckets != null) - message.numFiniteBuckets = object.numFiniteBuckets | 0; - if (object.growthFactor != null) - message.growthFactor = Number(object.growthFactor); - if (object.scale != null) - message.scale = Number(object.scale); - return message; - }; - - /** - * Creates a plain object from an Exponential message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {google.api.Distribution.BucketOptions.Exponential} message Exponential - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Exponential.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.numFiniteBuckets = 0; - object.growthFactor = 0; - object.scale = 0; - } - if (message.numFiniteBuckets != null && message.hasOwnProperty("numFiniteBuckets")) - object.numFiniteBuckets = message.numFiniteBuckets; - if (message.growthFactor != null && message.hasOwnProperty("growthFactor")) - object.growthFactor = options.json && !isFinite(message.growthFactor) ? String(message.growthFactor) : message.growthFactor; - if (message.scale != null && message.hasOwnProperty("scale")) - object.scale = options.json && !isFinite(message.scale) ? String(message.scale) : message.scale; - return object; - }; - - /** - * Converts this Exponential to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Exponential - * @instance - * @returns {Object.} JSON object - */ - Exponential.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Exponential - * @function getTypeUrl - * @memberof google.api.Distribution.BucketOptions.Exponential - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Exponential.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Distribution.BucketOptions.Exponential"; - }; - - return Exponential; - })(); - - BucketOptions.Explicit = (function() { - - /** - * Properties of an Explicit. - * @memberof google.api.Distribution.BucketOptions - * @interface IExplicit - * @property {Array.|null} [bounds] Explicit bounds - */ - - /** - * Constructs a new Explicit. - * @memberof google.api.Distribution.BucketOptions - * @classdesc Represents an Explicit. - * @implements IExplicit - * @constructor - * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set - */ - function Explicit(properties) { - this.bounds = []; - 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]]; - } - - /** - * Explicit bounds. - * @member {Array.} bounds - * @memberof google.api.Distribution.BucketOptions.Explicit - * @instance - */ - Explicit.prototype.bounds = $util.emptyArray; - - /** - * Creates a new Explicit instance using the specified properties. - * @function create - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit=} [properties] Properties to set - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit instance - */ - Explicit.create = function create(properties) { - return new Explicit(properties); - }; - - /** - * Encodes the specified Explicit message. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Explicit.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.bounds != null && message.bounds.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.bounds.length; ++i) - writer.double(message.bounds[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified Explicit message, length delimited. Does not implicitly {@link google.api.Distribution.BucketOptions.Explicit.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.IExplicit} message Explicit message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Explicit.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Explicit message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Explicit.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.BucketOptions.Explicit(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.bounds && message.bounds.length)) - message.bounds = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.bounds.push(reader.double()); - } else - message.bounds.push(reader.double()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Explicit message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Explicit.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Explicit message. - * @function verify - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Explicit.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.bounds != null && message.hasOwnProperty("bounds")) { - if (!Array.isArray(message.bounds)) - return "bounds: array expected"; - for (var i = 0; i < message.bounds.length; ++i) - if (typeof message.bounds[i] !== "number") - return "bounds: number[] expected"; - } - return null; - }; - - /** - * Creates an Explicit message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.BucketOptions.Explicit} Explicit - */ - Explicit.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.BucketOptions.Explicit) - return object; - var message = new $root.google.api.Distribution.BucketOptions.Explicit(); - if (object.bounds) { - if (!Array.isArray(object.bounds)) - throw TypeError(".google.api.Distribution.BucketOptions.Explicit.bounds: array expected"); - message.bounds = []; - for (var i = 0; i < object.bounds.length; ++i) - message.bounds[i] = Number(object.bounds[i]); - } - return message; - }; - - /** - * Creates a plain object from an Explicit message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {google.api.Distribution.BucketOptions.Explicit} message Explicit - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Explicit.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.bounds = []; - if (message.bounds && message.bounds.length) { - object.bounds = []; - for (var j = 0; j < message.bounds.length; ++j) - object.bounds[j] = options.json && !isFinite(message.bounds[j]) ? String(message.bounds[j]) : message.bounds[j]; - } - return object; - }; - - /** - * Converts this Explicit to JSON. - * @function toJSON - * @memberof google.api.Distribution.BucketOptions.Explicit - * @instance - * @returns {Object.} JSON object - */ - Explicit.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Explicit - * @function getTypeUrl - * @memberof google.api.Distribution.BucketOptions.Explicit - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Explicit.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Distribution.BucketOptions.Explicit"; - }; - - return Explicit; - })(); - - return BucketOptions; - })(); - - Distribution.Exemplar = (function() { - - /** - * Properties of an Exemplar. - * @memberof google.api.Distribution - * @interface IExemplar - * @property {number|null} [value] Exemplar value - * @property {google.protobuf.ITimestamp|null} [timestamp] Exemplar timestamp - * @property {Array.|null} [attachments] Exemplar attachments - */ - - /** - * Constructs a new Exemplar. - * @memberof google.api.Distribution - * @classdesc Represents an Exemplar. - * @implements IExemplar - * @constructor - * @param {google.api.Distribution.IExemplar=} [properties] Properties to set - */ - function Exemplar(properties) { - this.attachments = []; - 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]]; - } - - /** - * Exemplar value. - * @member {number} value - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.value = 0; - - /** - * Exemplar timestamp. - * @member {google.protobuf.ITimestamp|null|undefined} timestamp - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.timestamp = null; - - /** - * Exemplar attachments. - * @member {Array.} attachments - * @memberof google.api.Distribution.Exemplar - * @instance - */ - Exemplar.prototype.attachments = $util.emptyArray; - - /** - * Creates a new Exemplar instance using the specified properties. - * @function create - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.IExemplar=} [properties] Properties to set - * @returns {google.api.Distribution.Exemplar} Exemplar instance - */ - Exemplar.create = function create(properties) { - return new Exemplar(properties); - }; - - /** - * Encodes the specified Exemplar message. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @function encode - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exemplar.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 1, wireType 1 =*/9).double(message.value); - if (message.timestamp != null && Object.hasOwnProperty.call(message, "timestamp")) - $root.google.protobuf.Timestamp.encode(message.timestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.attachments != null && message.attachments.length) - for (var i = 0; i < message.attachments.length; ++i) - $root.google.protobuf.Any.encode(message.attachments[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Exemplar message, length delimited. Does not implicitly {@link google.api.Distribution.Exemplar.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.IExemplar} message Exemplar message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Exemplar.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Exemplar message from the specified reader or buffer. - * @function decode - * @memberof google.api.Distribution.Exemplar - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Distribution.Exemplar} Exemplar - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exemplar.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Distribution.Exemplar(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.value = reader.double(); - break; - } - case 2: { - message.timestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.attachments && message.attachments.length)) - message.attachments = []; - message.attachments.push($root.google.protobuf.Any.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Exemplar message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Distribution.Exemplar - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Distribution.Exemplar} Exemplar - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Exemplar.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Exemplar message. - * @function verify - * @memberof google.api.Distribution.Exemplar - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Exemplar.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (typeof message.value !== "number") - return "value: number expected"; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.timestamp); - if (error) - return "timestamp." + error; - } - if (message.attachments != null && message.hasOwnProperty("attachments")) { - if (!Array.isArray(message.attachments)) - return "attachments: array expected"; - for (var i = 0; i < message.attachments.length; ++i) { - var error = $root.google.protobuf.Any.verify(message.attachments[i]); - if (error) - return "attachments." + error; - } - } - return null; - }; - - /** - * Creates an Exemplar message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Distribution.Exemplar - * @static - * @param {Object.} object Plain object - * @returns {google.api.Distribution.Exemplar} Exemplar - */ - Exemplar.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Distribution.Exemplar) - return object; - var message = new $root.google.api.Distribution.Exemplar(); - if (object.value != null) - message.value = Number(object.value); - if (object.timestamp != null) { - if (typeof object.timestamp !== "object") - throw TypeError(".google.api.Distribution.Exemplar.timestamp: object expected"); - message.timestamp = $root.google.protobuf.Timestamp.fromObject(object.timestamp); - } - if (object.attachments) { - if (!Array.isArray(object.attachments)) - throw TypeError(".google.api.Distribution.Exemplar.attachments: array expected"); - message.attachments = []; - for (var i = 0; i < object.attachments.length; ++i) { - if (typeof object.attachments[i] !== "object") - throw TypeError(".google.api.Distribution.Exemplar.attachments: object expected"); - message.attachments[i] = $root.google.protobuf.Any.fromObject(object.attachments[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an Exemplar message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Distribution.Exemplar - * @static - * @param {google.api.Distribution.Exemplar} message Exemplar - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Exemplar.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.attachments = []; - if (options.defaults) { - object.value = 0; - object.timestamp = null; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.json && !isFinite(message.value) ? String(message.value) : message.value; - if (message.timestamp != null && message.hasOwnProperty("timestamp")) - object.timestamp = $root.google.protobuf.Timestamp.toObject(message.timestamp, options); - if (message.attachments && message.attachments.length) { - object.attachments = []; - for (var j = 0; j < message.attachments.length; ++j) - object.attachments[j] = $root.google.protobuf.Any.toObject(message.attachments[j], options); - } - return object; - }; - - /** - * Converts this Exemplar to JSON. - * @function toJSON - * @memberof google.api.Distribution.Exemplar - * @instance - * @returns {Object.} JSON object - */ - Exemplar.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Exemplar - * @function getTypeUrl - * @memberof google.api.Distribution.Exemplar - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Exemplar.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Distribution.Exemplar"; - }; - - return Exemplar; - })(); - - return Distribution; - })(); - - api.MetricDescriptor = (function() { - - /** - * Properties of a MetricDescriptor. - * @memberof google.api - * @interface IMetricDescriptor - * @property {string|null} [name] MetricDescriptor name - * @property {string|null} [type] MetricDescriptor type - * @property {Array.|null} [labels] MetricDescriptor labels - * @property {google.api.MetricDescriptor.MetricKind|null} [metricKind] MetricDescriptor metricKind - * @property {google.api.MetricDescriptor.ValueType|null} [valueType] MetricDescriptor valueType - * @property {string|null} [unit] MetricDescriptor unit - * @property {string|null} [description] MetricDescriptor description - * @property {string|null} [displayName] MetricDescriptor displayName - * @property {google.api.MetricDescriptor.IMetricDescriptorMetadata|null} [metadata] MetricDescriptor metadata - * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptor launchStage - * @property {Array.|null} [monitoredResourceTypes] MetricDescriptor monitoredResourceTypes - */ - - /** - * Constructs a new MetricDescriptor. - * @memberof google.api - * @classdesc Represents a MetricDescriptor. - * @implements IMetricDescriptor - * @constructor - * @param {google.api.IMetricDescriptor=} [properties] Properties to set - */ - function MetricDescriptor(properties) { - this.labels = []; - this.monitoredResourceTypes = []; - 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]]; - } - - /** - * MetricDescriptor name. - * @member {string} name - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.name = ""; - - /** - * MetricDescriptor type. - * @member {string} type - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.type = ""; - - /** - * MetricDescriptor labels. - * @member {Array.} labels - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.labels = $util.emptyArray; - - /** - * MetricDescriptor metricKind. - * @member {google.api.MetricDescriptor.MetricKind} metricKind - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.metricKind = 0; - - /** - * MetricDescriptor valueType. - * @member {google.api.MetricDescriptor.ValueType} valueType - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.valueType = 0; - - /** - * MetricDescriptor unit. - * @member {string} unit - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.unit = ""; - - /** - * MetricDescriptor description. - * @member {string} description - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.description = ""; - - /** - * MetricDescriptor displayName. - * @member {string} displayName - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.displayName = ""; - - /** - * MetricDescriptor metadata. - * @member {google.api.MetricDescriptor.IMetricDescriptorMetadata|null|undefined} metadata - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.metadata = null; - - /** - * MetricDescriptor launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.launchStage = 0; - - /** - * MetricDescriptor monitoredResourceTypes. - * @member {Array.} monitoredResourceTypes - * @memberof google.api.MetricDescriptor - * @instance - */ - MetricDescriptor.prototype.monitoredResourceTypes = $util.emptyArray; - - /** - * Creates a new MetricDescriptor instance using the specified properties. - * @function create - * @memberof google.api.MetricDescriptor - * @static - * @param {google.api.IMetricDescriptor=} [properties] Properties to set - * @returns {google.api.MetricDescriptor} MetricDescriptor instance - */ - MetricDescriptor.create = function create(properties) { - return new MetricDescriptor(properties); - }; - - /** - * Encodes the specified MetricDescriptor message. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.MetricDescriptor - * @static - * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.labels != null && message.labels.length) - for (var i = 0; i < message.labels.length; ++i) - $root.google.api.LabelDescriptor.encode(message.labels[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.metricKind != null && Object.hasOwnProperty.call(message, "metricKind")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.metricKind); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.valueType); - if (message.unit != null && Object.hasOwnProperty.call(message, "unit")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.unit); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.description); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.displayName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.type); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.api.MetricDescriptor.MetricDescriptorMetadata.encode(message.metadata, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 12, wireType 0 =*/96).int32(message.launchStage); - if (message.monitoredResourceTypes != null && message.monitoredResourceTypes.length) - for (var i = 0; i < message.monitoredResourceTypes.length; ++i) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.monitoredResourceTypes[i]); - return writer; - }; - - /** - * Encodes the specified MetricDescriptor message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MetricDescriptor - * @static - * @param {google.api.IMetricDescriptor} message MetricDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetricDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.MetricDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MetricDescriptor} MetricDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricDescriptor.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 8: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.labels && message.labels.length)) - message.labels = []; - message.labels.push($root.google.api.LabelDescriptor.decode(reader, reader.uint32())); - break; - } - case 3: { - message.metricKind = reader.int32(); - break; - } - case 4: { - message.valueType = reader.int32(); - break; - } - case 5: { - message.unit = reader.string(); - break; - } - case 6: { - message.description = reader.string(); - break; - } - case 7: { - message.displayName = reader.string(); - break; - } - case 10: { - message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.decode(reader, reader.uint32()); - break; - } - case 12: { - message.launchStage = reader.int32(); - break; - } - case 13: { - if (!(message.monitoredResourceTypes && message.monitoredResourceTypes.length)) - message.monitoredResourceTypes = []; - message.monitoredResourceTypes.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetricDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MetricDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MetricDescriptor} MetricDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetricDescriptor message. - * @function verify - * @memberof google.api.MetricDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!Array.isArray(message.labels)) - return "labels: array expected"; - for (var i = 0; i < message.labels.length; ++i) { - var error = $root.google.api.LabelDescriptor.verify(message.labels[i]); - if (error) - return "labels." + error; - } - } - 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.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.unit != null && message.hasOwnProperty("unit")) - if (!$util.isString(message.unit)) - return "unit: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.monitoredResourceTypes != null && message.hasOwnProperty("monitoredResourceTypes")) { - if (!Array.isArray(message.monitoredResourceTypes)) - return "monitoredResourceTypes: array expected"; - for (var i = 0; i < message.monitoredResourceTypes.length; ++i) - if (!$util.isString(message.monitoredResourceTypes[i])) - return "monitoredResourceTypes: string[] expected"; - } - return null; - }; - - /** - * Creates a MetricDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MetricDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.MetricDescriptor} MetricDescriptor - */ - MetricDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MetricDescriptor) - return object; - var message = new $root.google.api.MetricDescriptor(); - if (object.name != null) - message.name = String(object.name); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (!Array.isArray(object.labels)) - throw TypeError(".google.api.MetricDescriptor.labels: array expected"); - message.labels = []; - for (var i = 0; i < object.labels.length; ++i) { - if (typeof object.labels[i] !== "object") - throw TypeError(".google.api.MetricDescriptor.labels: object expected"); - message.labels[i] = $root.google.api.LabelDescriptor.fromObject(object.labels[i]); - } - } - 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; - } - 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.unit != null) - message.unit = String(object.unit); - if (object.description != null) - message.description = String(object.description); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.api.MetricDescriptor.metadata: object expected"); - message.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.fromObject(object.metadata); - } - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.monitoredResourceTypes) { - if (!Array.isArray(object.monitoredResourceTypes)) - throw TypeError(".google.api.MetricDescriptor.monitoredResourceTypes: array expected"); - message.monitoredResourceTypes = []; - for (var i = 0; i < object.monitoredResourceTypes.length; ++i) - message.monitoredResourceTypes[i] = String(object.monitoredResourceTypes[i]); - } - return message; - }; - - /** - * Creates a plain object from a MetricDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MetricDescriptor - * @static - * @param {google.api.MetricDescriptor} message MetricDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.labels = []; - object.monitoredResourceTypes = []; - } - if (options.defaults) { - object.name = ""; - object.metricKind = options.enums === String ? "METRIC_KIND_UNSPECIFIED" : 0; - object.valueType = options.enums === String ? "VALUE_TYPE_UNSPECIFIED" : 0; - object.unit = ""; - object.description = ""; - object.displayName = ""; - object.type = ""; - object.metadata = null; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.labels && message.labels.length) { - object.labels = []; - for (var j = 0; j < message.labels.length; ++j) - object.labels[j] = $root.google.api.LabelDescriptor.toObject(message.labels[j], options); - } - 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.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.unit != null && message.hasOwnProperty("unit")) - object.unit = message.unit; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.api.MetricDescriptor.MetricDescriptorMetadata.toObject(message.metadata, options); - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.monitoredResourceTypes && message.monitoredResourceTypes.length) { - object.monitoredResourceTypes = []; - for (var j = 0; j < message.monitoredResourceTypes.length; ++j) - object.monitoredResourceTypes[j] = message.monitoredResourceTypes[j]; - } - return object; - }; - - /** - * Converts this MetricDescriptor to JSON. - * @function toJSON - * @memberof google.api.MetricDescriptor - * @instance - * @returns {Object.} JSON object - */ - MetricDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MetricDescriptor - * @function getTypeUrl - * @memberof google.api.MetricDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MetricDescriptor"; - }; - - /** - * MetricKind enum. - * @name google.api.MetricDescriptor.MetricKind - * @enum {number} - * @property {number} METRIC_KIND_UNSPECIFIED=0 METRIC_KIND_UNSPECIFIED value - * @property {number} GAUGE=1 GAUGE value - * @property {number} DELTA=2 DELTA value - * @property {number} CUMULATIVE=3 CUMULATIVE value - */ - MetricDescriptor.MetricKind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "METRIC_KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "GAUGE"] = 1; - values[valuesById[2] = "DELTA"] = 2; - values[valuesById[3] = "CUMULATIVE"] = 3; - return values; - })(); - - /** - * ValueType enum. - * @name google.api.MetricDescriptor.ValueType - * @enum {number} - * @property {number} VALUE_TYPE_UNSPECIFIED=0 VALUE_TYPE_UNSPECIFIED value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - * @property {number} DOUBLE=3 DOUBLE value - * @property {number} STRING=4 STRING value - * @property {number} DISTRIBUTION=5 DISTRIBUTION value - * @property {number} MONEY=6 MONEY value - */ - MetricDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VALUE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - values[valuesById[3] = "DOUBLE"] = 3; - values[valuesById[4] = "STRING"] = 4; - values[valuesById[5] = "DISTRIBUTION"] = 5; - values[valuesById[6] = "MONEY"] = 6; - return values; - })(); - - MetricDescriptor.MetricDescriptorMetadata = (function() { - - /** - * Properties of a MetricDescriptorMetadata. - * @memberof google.api.MetricDescriptor - * @interface IMetricDescriptorMetadata - * @property {google.api.LaunchStage|null} [launchStage] MetricDescriptorMetadata launchStage - * @property {google.protobuf.IDuration|null} [samplePeriod] MetricDescriptorMetadata samplePeriod - * @property {google.protobuf.IDuration|null} [ingestDelay] MetricDescriptorMetadata ingestDelay - * @property {Array.|null} [timeSeriesResourceHierarchyLevel] MetricDescriptorMetadata timeSeriesResourceHierarchyLevel - */ - - /** - * Constructs a new MetricDescriptorMetadata. - * @memberof google.api.MetricDescriptor - * @classdesc Represents a MetricDescriptorMetadata. - * @implements IMetricDescriptorMetadata - * @constructor - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set - */ - function MetricDescriptorMetadata(properties) { - this.timeSeriesResourceHierarchyLevel = []; - 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]]; - } - - /** - * MetricDescriptorMetadata launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.launchStage = 0; - - /** - * MetricDescriptorMetadata samplePeriod. - * @member {google.protobuf.IDuration|null|undefined} samplePeriod - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.samplePeriod = null; - - /** - * MetricDescriptorMetadata ingestDelay. - * @member {google.protobuf.IDuration|null|undefined} ingestDelay - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.ingestDelay = null; - - /** - * MetricDescriptorMetadata timeSeriesResourceHierarchyLevel. - * @member {Array.} timeSeriesResourceHierarchyLevel - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - */ - MetricDescriptorMetadata.prototype.timeSeriesResourceHierarchyLevel = $util.emptyArray; - - /** - * Creates a new MetricDescriptorMetadata instance using the specified properties. - * @function create - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata=} [properties] Properties to set - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata instance - */ - MetricDescriptorMetadata.create = function create(properties) { - return new MetricDescriptorMetadata(properties); - }; - - /** - * Encodes the specified MetricDescriptorMetadata message. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @function encode - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricDescriptorMetadata.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.launchStage); - if (message.samplePeriod != null && Object.hasOwnProperty.call(message, "samplePeriod")) - $root.google.protobuf.Duration.encode(message.samplePeriod, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.ingestDelay != null && Object.hasOwnProperty.call(message, "ingestDelay")) - $root.google.protobuf.Duration.encode(message.ingestDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.timeSeriesResourceHierarchyLevel != null && message.timeSeriesResourceHierarchyLevel.length) { - writer.uint32(/* id 4, wireType 2 =*/34).fork(); - for (var i = 0; i < message.timeSeriesResourceHierarchyLevel.length; ++i) - writer.int32(message.timeSeriesResourceHierarchyLevel[i]); - writer.ldelim(); - } - return writer; - }; - - /** - * Encodes the specified MetricDescriptorMetadata message, length delimited. Does not implicitly {@link google.api.MetricDescriptor.MetricDescriptorMetadata.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.IMetricDescriptorMetadata} message MetricDescriptorMetadata message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MetricDescriptorMetadata.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer. - * @function decode - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricDescriptorMetadata.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.launchStage = reader.int32(); - break; - } - case 2: { - message.samplePeriod = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 3: { - message.ingestDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.timeSeriesResourceHierarchyLevel && message.timeSeriesResourceHierarchyLevel.length)) - message.timeSeriesResourceHierarchyLevel = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.timeSeriesResourceHierarchyLevel.push(reader.int32()); - } else - message.timeSeriesResourceHierarchyLevel.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MetricDescriptorMetadata message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MetricDescriptorMetadata.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MetricDescriptorMetadata message. - * @function verify - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MetricDescriptorMetadata.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) { - var error = $root.google.protobuf.Duration.verify(message.samplePeriod); - if (error) - return "samplePeriod." + error; - } - if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) { - var error = $root.google.protobuf.Duration.verify(message.ingestDelay); - if (error) - return "ingestDelay." + error; - } - if (message.timeSeriesResourceHierarchyLevel != null && message.hasOwnProperty("timeSeriesResourceHierarchyLevel")) { - if (!Array.isArray(message.timeSeriesResourceHierarchyLevel)) - return "timeSeriesResourceHierarchyLevel: array expected"; - for (var i = 0; i < message.timeSeriesResourceHierarchyLevel.length; ++i) - switch (message.timeSeriesResourceHierarchyLevel[i]) { - default: - return "timeSeriesResourceHierarchyLevel: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - return null; - }; - - /** - * Creates a MetricDescriptorMetadata message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {Object.} object Plain object - * @returns {google.api.MetricDescriptor.MetricDescriptorMetadata} MetricDescriptorMetadata - */ - MetricDescriptorMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MetricDescriptor.MetricDescriptorMetadata) - return object; - var message = new $root.google.api.MetricDescriptor.MetricDescriptorMetadata(); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.samplePeriod != null) { - if (typeof object.samplePeriod !== "object") - throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.samplePeriod: object expected"); - message.samplePeriod = $root.google.protobuf.Duration.fromObject(object.samplePeriod); - } - if (object.ingestDelay != null) { - if (typeof object.ingestDelay !== "object") - throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.ingestDelay: object expected"); - message.ingestDelay = $root.google.protobuf.Duration.fromObject(object.ingestDelay); - } - if (object.timeSeriesResourceHierarchyLevel) { - if (!Array.isArray(object.timeSeriesResourceHierarchyLevel)) - throw TypeError(".google.api.MetricDescriptor.MetricDescriptorMetadata.timeSeriesResourceHierarchyLevel: array expected"); - message.timeSeriesResourceHierarchyLevel = []; - for (var i = 0; i < object.timeSeriesResourceHierarchyLevel.length; ++i) - switch (object.timeSeriesResourceHierarchyLevel[i]) { - default: - if (typeof object.timeSeriesResourceHierarchyLevel[i] === "number") { - message.timeSeriesResourceHierarchyLevel[i] = object.timeSeriesResourceHierarchyLevel[i]; - break; - } - case "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED": - case 0: - message.timeSeriesResourceHierarchyLevel[i] = 0; - break; - case "PROJECT": - case 1: - message.timeSeriesResourceHierarchyLevel[i] = 1; - break; - case "ORGANIZATION": - case 2: - message.timeSeriesResourceHierarchyLevel[i] = 2; - break; - case "FOLDER": - case 3: - message.timeSeriesResourceHierarchyLevel[i] = 3; - break; - } - } - return message; - }; - - /** - * Creates a plain object from a MetricDescriptorMetadata message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {google.api.MetricDescriptor.MetricDescriptorMetadata} message MetricDescriptorMetadata - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MetricDescriptorMetadata.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.timeSeriesResourceHierarchyLevel = []; - if (options.defaults) { - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.samplePeriod = null; - object.ingestDelay = null; - } - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.samplePeriod != null && message.hasOwnProperty("samplePeriod")) - object.samplePeriod = $root.google.protobuf.Duration.toObject(message.samplePeriod, options); - if (message.ingestDelay != null && message.hasOwnProperty("ingestDelay")) - object.ingestDelay = $root.google.protobuf.Duration.toObject(message.ingestDelay, options); - if (message.timeSeriesResourceHierarchyLevel && message.timeSeriesResourceHierarchyLevel.length) { - object.timeSeriesResourceHierarchyLevel = []; - for (var j = 0; j < message.timeSeriesResourceHierarchyLevel.length; ++j) - object.timeSeriesResourceHierarchyLevel[j] = options.enums === String ? $root.google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel[message.timeSeriesResourceHierarchyLevel[j]] === undefined ? message.timeSeriesResourceHierarchyLevel[j] : $root.google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel[message.timeSeriesResourceHierarchyLevel[j]] : message.timeSeriesResourceHierarchyLevel[j]; - } - return object; - }; - - /** - * Converts this MetricDescriptorMetadata to JSON. - * @function toJSON - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @instance - * @returns {Object.} JSON object - */ - MetricDescriptorMetadata.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MetricDescriptorMetadata - * @function getTypeUrl - * @memberof google.api.MetricDescriptor.MetricDescriptorMetadata - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MetricDescriptorMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MetricDescriptor.MetricDescriptorMetadata"; - }; - - /** - * TimeSeriesResourceHierarchyLevel enum. - * @name google.api.MetricDescriptor.MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel - * @enum {number} - * @property {number} TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED=0 TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED value - * @property {number} PROJECT=1 PROJECT value - * @property {number} ORGANIZATION=2 ORGANIZATION value - * @property {number} FOLDER=3 FOLDER value - */ - MetricDescriptorMetadata.TimeSeriesResourceHierarchyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED"] = 0; - values[valuesById[1] = "PROJECT"] = 1; - values[valuesById[2] = "ORGANIZATION"] = 2; - values[valuesById[3] = "FOLDER"] = 3; - return values; - })(); - - return MetricDescriptorMetadata; - })(); - - return MetricDescriptor; - })(); - - api.Metric = (function() { - - /** - * Properties of a Metric. - * @memberof google.api - * @interface IMetric - * @property {string|null} [type] Metric type - * @property {Object.|null} [labels] Metric labels - */ - - /** - * Constructs a new Metric. - * @memberof google.api - * @classdesc Represents a Metric. - * @implements IMetric - * @constructor - * @param {google.api.IMetric=} [properties] Properties to set - */ - function Metric(properties) { - this.labels = {}; - 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]]; - } - - /** - * Metric type. - * @member {string} type - * @memberof google.api.Metric - * @instance - */ - Metric.prototype.type = ""; - - /** - * Metric labels. - * @member {Object.} labels - * @memberof google.api.Metric - * @instance - */ - Metric.prototype.labels = $util.emptyObject; - - /** - * Creates a new Metric instance using the specified properties. - * @function create - * @memberof google.api.Metric - * @static - * @param {google.api.IMetric=} [properties] Properties to set - * @returns {google.api.Metric} Metric instance - */ - Metric.create = function create(properties) { - return new Metric(properties); - }; - - /** - * Encodes the specified Metric message. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @function encode - * @memberof google.api.Metric - * @static - * @param {google.api.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.labels != null && Object.hasOwnProperty.call(message, "labels")) - for (var keys = Object.keys(message.labels), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.labels[keys[i]]).ldelim(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - return writer; - }; - - /** - * Encodes the specified Metric message, length delimited. Does not implicitly {@link google.api.Metric.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Metric - * @static - * @param {google.api.IMetric} message Metric message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Metric.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Metric message from the specified reader or buffer. - * @function decode - * @memberof google.api.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Metric(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.type = reader.string(); - break; - } - case 2: { - if (message.labels === $util.emptyObject) - message.labels = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.labels[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Metric message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Metric - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Metric} Metric - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Metric.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Metric message. - * @function verify - * @memberof google.api.Metric - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Metric.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.labels != null && message.hasOwnProperty("labels")) { - if (!$util.isObject(message.labels)) - return "labels: object expected"; - var key = Object.keys(message.labels); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.labels[key[i]])) - return "labels: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a Metric message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Metric - * @static - * @param {Object.} object Plain object - * @returns {google.api.Metric} Metric - */ - Metric.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Metric) - return object; - var message = new $root.google.api.Metric(); - if (object.type != null) - message.type = String(object.type); - if (object.labels) { - if (typeof object.labels !== "object") - throw TypeError(".google.api.Metric.labels: object expected"); - message.labels = {}; - for (var keys = Object.keys(object.labels), i = 0; i < keys.length; ++i) - message.labels[keys[i]] = String(object.labels[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a Metric message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Metric - * @static - * @param {google.api.Metric} message Metric - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Metric.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.labels = {}; - if (options.defaults) - object.type = ""; - var keys2; - if (message.labels && (keys2 = Object.keys(message.labels)).length) { - object.labels = {}; - for (var j = 0; j < keys2.length; ++j) - object.labels[keys2[j]] = message.labels[keys2[j]]; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - return object; - }; - - /** - * Converts this Metric to JSON. - * @function toJSON - * @memberof google.api.Metric - * @instance - * @returns {Object.} JSON object - */ - Metric.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Metric - * @function getTypeUrl - * @memberof google.api.Metric - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Metric.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Metric"; - }; - - return Metric; - })(); - - api.LabelDescriptor = (function() { - - /** - * Properties of a LabelDescriptor. - * @memberof google.api - * @interface ILabelDescriptor - * @property {string|null} [key] LabelDescriptor key - * @property {google.api.LabelDescriptor.ValueType|null} [valueType] LabelDescriptor valueType - * @property {string|null} [description] LabelDescriptor description - */ - - /** - * Constructs a new LabelDescriptor. - * @memberof google.api - * @classdesc Represents a LabelDescriptor. - * @implements ILabelDescriptor - * @constructor - * @param {google.api.ILabelDescriptor=} [properties] Properties to set - */ - function LabelDescriptor(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]]; - } - - /** - * LabelDescriptor key. - * @member {string} key - * @memberof google.api.LabelDescriptor - * @instance - */ - LabelDescriptor.prototype.key = ""; - - /** - * LabelDescriptor valueType. - * @member {google.api.LabelDescriptor.ValueType} valueType - * @memberof google.api.LabelDescriptor - * @instance - */ - LabelDescriptor.prototype.valueType = 0; - - /** - * LabelDescriptor description. - * @member {string} description - * @memberof google.api.LabelDescriptor - * @instance - */ - LabelDescriptor.prototype.description = ""; - - /** - * Creates a new LabelDescriptor instance using the specified properties. - * @function create - * @memberof google.api.LabelDescriptor - * @static - * @param {google.api.ILabelDescriptor=} [properties] Properties to set - * @returns {google.api.LabelDescriptor} LabelDescriptor instance - */ - LabelDescriptor.create = function create(properties) { - return new LabelDescriptor(properties); - }; - - /** - * Encodes the specified LabelDescriptor message. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @function encode - * @memberof google.api.LabelDescriptor - * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LabelDescriptor.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.key != null && Object.hasOwnProperty.call(message, "key")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.key); - if (message.valueType != null && Object.hasOwnProperty.call(message, "valueType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.valueType); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - return writer; - }; - - /** - * Encodes the specified LabelDescriptor message, length delimited. Does not implicitly {@link google.api.LabelDescriptor.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.LabelDescriptor - * @static - * @param {google.api.ILabelDescriptor} message LabelDescriptor message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LabelDescriptor.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LabelDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.LabelDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.LabelDescriptor} LabelDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LabelDescriptor.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.LabelDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.key = reader.string(); - break; - } - case 2: { - message.valueType = reader.int32(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LabelDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.LabelDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.LabelDescriptor} LabelDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LabelDescriptor.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LabelDescriptor message. - * @function verify - * @memberof google.api.LabelDescriptor - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LabelDescriptor.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.key != null && message.hasOwnProperty("key")) - if (!$util.isString(message.key)) - return "key: string expected"; - if (message.valueType != null && message.hasOwnProperty("valueType")) - switch (message.valueType) { - default: - return "valueType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates a LabelDescriptor message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.LabelDescriptor - * @static - * @param {Object.} object Plain object - * @returns {google.api.LabelDescriptor} LabelDescriptor - */ - LabelDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.LabelDescriptor) - return object; - var message = new $root.google.api.LabelDescriptor(); - if (object.key != null) - message.key = String(object.key); - switch (object.valueType) { - default: - if (typeof object.valueType === "number") { - message.valueType = object.valueType; - break; - } - break; - case "STRING": - case 0: - message.valueType = 0; - break; - case "BOOL": - case 1: - message.valueType = 1; - break; - case "INT64": - case 2: - message.valueType = 2; - break; - } - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from a LabelDescriptor message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.LabelDescriptor - * @static - * @param {google.api.LabelDescriptor} message LabelDescriptor - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LabelDescriptor.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.key = ""; - object.valueType = options.enums === String ? "STRING" : 0; - object.description = ""; - } - if (message.key != null && message.hasOwnProperty("key")) - object.key = message.key; - if (message.valueType != null && message.hasOwnProperty("valueType")) - object.valueType = options.enums === String ? $root.google.api.LabelDescriptor.ValueType[message.valueType] === undefined ? message.valueType : $root.google.api.LabelDescriptor.ValueType[message.valueType] : message.valueType; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this LabelDescriptor to JSON. - * @function toJSON - * @memberof google.api.LabelDescriptor - * @instance - * @returns {Object.} JSON object - */ - LabelDescriptor.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LabelDescriptor - * @function getTypeUrl - * @memberof google.api.LabelDescriptor - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LabelDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.LabelDescriptor"; - }; - - /** - * ValueType enum. - * @name google.api.LabelDescriptor.ValueType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} BOOL=1 BOOL value - * @property {number} INT64=2 INT64 value - */ - LabelDescriptor.ValueType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "BOOL"] = 1; - values[valuesById[2] = "INT64"] = 2; - return values; - })(); - - return LabelDescriptor; - })(); - - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; - })(); - - api.Http = (function() { - - /** - * Properties of a Http. - * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion - */ - - /** - * Constructs a new Http. - * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp - * @constructor - * @param {google.api.IHttp=} [properties] Properties to set - */ - function Http(properties) { - this.rules = []; - 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]]; - } - - /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http - * @instance - */ - Http.prototype.rules = $util.emptyArray; - - /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http - * @instance - */ - Http.prototype.fullyDecodeReservedExpansion = false; - - /** - * Creates a new Http instance using the specified properties. - * @function create - * @memberof google.api.Http - * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance - */ - Http.create = function create(properties) { - return new Http(properties); - }; - - /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encode - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.rules != null && message.rules.length) - for (var i = 0; i < message.rules.length; ++i) - $root.google.api.HttpRule.encode(message.rules[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.fullyDecodeReservedExpansion != null && Object.hasOwnProperty.call(message, "fullyDecodeReservedExpansion")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.fullyDecodeReservedExpansion); - return writer; - }; - - /** - * Encodes the specified Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Http - * @static - * @param {google.api.IHttp} message Http message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Http.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Http message from the specified reader or buffer. - * @function decode - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Http message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Http - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Http.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Http message. - * @function verify - * @memberof google.api.Http - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Http.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.rules != null && message.hasOwnProperty("rules")) { - if (!Array.isArray(message.rules)) - return "rules: array expected"; - for (var i = 0; i < message.rules.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.rules[i]); - if (error) - return "rules." + error; - } - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - if (typeof message.fullyDecodeReservedExpansion !== "boolean") - return "fullyDecodeReservedExpansion: boolean expected"; - return null; - }; - - /** - * Creates a Http message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Http - * @static - * @param {Object.} object Plain object - * @returns {google.api.Http} Http - */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) - return object; - var message = new $root.google.api.Http(); - if (object.rules) { - if (!Array.isArray(object.rules)) - throw TypeError(".google.api.Http.rules: array expected"); - message.rules = []; - for (var i = 0; i < object.rules.length; ++i) { - if (typeof object.rules[i] !== "object") - throw TypeError(".google.api.Http.rules: object expected"); - message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); - } - } - if (object.fullyDecodeReservedExpansion != null) - message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); - return message; - }; - - /** - * Creates a plain object from a Http message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Http - * @static - * @param {google.api.Http} message Http - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Http.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.rules = []; - if (options.defaults) - object.fullyDecodeReservedExpansion = false; - if (message.rules && message.rules.length) { - object.rules = []; - for (var j = 0; j < message.rules.length; ++j) - object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); - } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; - return object; - }; - - /** - * Converts this Http to JSON. - * @function toJSON - * @memberof google.api.Http - * @instance - * @returns {Object.} JSON object - */ - Http.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Http - * @function getTypeUrl - * @memberof google.api.Http - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Http"; - }; - - return Http; - })(); - - api.HttpRule = (function() { - - /** - * Properties of a HttpRule. - * @memberof google.api - * @interface IHttpRule - * @property {string|null} [selector] HttpRule selector - * @property {string|null} [get] HttpRule get - * @property {string|null} [put] HttpRule put - * @property {string|null} [post] HttpRule post - * @property {string|null} ["delete"] HttpRule delete - * @property {string|null} [patch] HttpRule patch - * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom - * @property {string|null} [body] HttpRule body - * @property {string|null} [responseBody] HttpRule responseBody - * @property {Array.|null} [additionalBindings] HttpRule additionalBindings - */ - - /** - * Constructs a new HttpRule. - * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule - * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set - */ - function HttpRule(properties) { - this.additionalBindings = []; - 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]]; - } - - /** - * HttpRule selector. - * @member {string} selector - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.selector = ""; - - /** - * HttpRule get. - * @member {string|null|undefined} get - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.get = null; - - /** - * HttpRule put. - * @member {string|null|undefined} put - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.put = null; - - /** - * HttpRule post. - * @member {string|null|undefined} post - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.post = null; - - /** - * HttpRule delete. - * @member {string|null|undefined} delete - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype["delete"] = null; - - /** - * HttpRule patch. - * @member {string|null|undefined} patch - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.patch = null; - - /** - * HttpRule custom. - * @member {google.api.ICustomHttpPattern|null|undefined} custom - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.custom = null; - - /** - * HttpRule body. - * @member {string} body - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.body = ""; - - /** - * HttpRule responseBody. - * @member {string} responseBody - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.responseBody = ""; - - /** - * HttpRule additionalBindings. - * @member {Array.} additionalBindings - * @memberof google.api.HttpRule - * @instance - */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule - * @instance - */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new HttpRule instance using the specified properties. - * @function create - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance - */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); - }; - - /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encode - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); - return writer; - }; - - /** - * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer. - * @function decode - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.get = reader.string(); - break; - } - case 3: { - message.put = reader.string(); - break; - } - case 4: { - message.post = reader.string(); - break; - } - case 5: { - message["delete"] = reader.string(); - break; - } - case 6: { - message.patch = reader.string(); - break; - } - case 8: { - message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); - break; - } - case 7: { - message.body = reader.string(); - break; - } - case 12: { - message.responseBody = reader.string(); - break; - } - case 11: { - if (!(message.additionalBindings && message.additionalBindings.length)) - message.additionalBindings = []; - message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.HttpRule - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a HttpRule message. - * @function verify - * @memberof google.api.HttpRule - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - HttpRule.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.get != null && message.hasOwnProperty("get")) { - properties.pattern = 1; - if (!$util.isString(message.get)) - return "get: string expected"; - } - if (message.put != null && message.hasOwnProperty("put")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.put)) - return "put: string expected"; - } - if (message.post != null && message.hasOwnProperty("post")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.post)) - return "post: string expected"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message["delete"])) - return "delete: string expected"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - if (!$util.isString(message.patch)) - return "patch: string expected"; - } - if (message.custom != null && message.hasOwnProperty("custom")) { - if (properties.pattern === 1) - return "pattern: multiple values"; - properties.pattern = 1; - { - var error = $root.google.api.CustomHttpPattern.verify(message.custom); - if (error) - return "custom." + error; - } - } - if (message.body != null && message.hasOwnProperty("body")) - if (!$util.isString(message.body)) - return "body: string expected"; - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - if (!$util.isString(message.responseBody)) - return "responseBody: string expected"; - if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { - if (!Array.isArray(message.additionalBindings)) - return "additionalBindings: array expected"; - for (var i = 0; i < message.additionalBindings.length; ++i) { - var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); - if (error) - return "additionalBindings." + error; - } - } - return null; - }; - - /** - * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.HttpRule - * @static - * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule - */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) - return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a HttpRule message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.HttpRule - * @static - * @param {google.api.HttpRule} message HttpRule - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - HttpRule.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); - } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; - return object; - }; - - /** - * Converts this HttpRule to JSON. - * @function toJSON - * @memberof google.api.HttpRule - * @instance - * @returns {Object.} JSON object - */ - HttpRule.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for HttpRule - * @function getTypeUrl - * @memberof google.api.HttpRule - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.HttpRule"; - }; - - return HttpRule; - })(); - - api.CustomHttpPattern = (function() { - - /** - * Properties of a CustomHttpPattern. - * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path - */ - - /** - * Constructs a new CustomHttpPattern. - * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern - * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - */ - function CustomHttpPattern(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]]; - } - - /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.kind = ""; - - /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern - * @instance - */ - CustomHttpPattern.prototype.path = ""; - - /** - * Creates a new CustomHttpPattern instance using the specified properties. - * @function create - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance - */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); - }; - - /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encode - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); - return writer; - }; - - /** - * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. - * @function decode - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.kind = reader.string(); - break; - } - case 2: { - message.path = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CustomHttpPattern - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CustomHttpPattern message. - * @function verify - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CustomHttpPattern.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - if (!$util.isString(message.kind)) - return "kind: string expected"; - if (message.path != null && message.hasOwnProperty("path")) - if (!$util.isString(message.path)) - return "path: string expected"; - return null; - }; - - /** - * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern - */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) - return object; - var message = new $root.google.api.CustomHttpPattern(); - if (object.kind != null) - message.kind = String(object.kind); - if (object.path != null) - message.path = String(object.path); - return message; - }; - - /** - * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CustomHttpPattern - * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CustomHttpPattern.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.kind = ""; - object.path = ""; - } - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; - return object; - }; - - /** - * Converts this CustomHttpPattern to JSON. - * @function toJSON - * @memberof google.api.CustomHttpPattern - * @instance - * @returns {Object.} JSON object - */ - CustomHttpPattern.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CustomHttpPattern - * @function getTypeUrl - * @memberof google.api.CustomHttpPattern - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; - }; - - return CustomHttpPattern; - })(); - - api.CommonLanguageSettings = (function() { - - /** - * Properties of a CommonLanguageSettings. - * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations - * @property {google.api.ISelectiveGapicGeneration|null} [selectiveGapicGeneration] CommonLanguageSettings selectiveGapicGeneration - */ - - /** - * Constructs a new CommonLanguageSettings. - * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings - * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - */ - function CommonLanguageSettings(properties) { - this.destinations = []; - 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]]; - } - - /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; - - /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; - - /** - * CommonLanguageSettings selectiveGapicGeneration. - * @member {google.api.ISelectiveGapicGeneration|null|undefined} selectiveGapicGeneration - * @memberof google.api.CommonLanguageSettings - * @instance - */ - CommonLanguageSettings.prototype.selectiveGapicGeneration = null; - - /** - * Creates a new CommonLanguageSettings instance using the specified properties. - * @function create - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance - */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); - }; - - /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.referenceDocsUri != null && Object.hasOwnProperty.call(message, "referenceDocsUri")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.referenceDocsUri); - if (message.destinations != null && message.destinations.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.destinations.length; ++i) - writer.int32(message.destinations[i]); - writer.ldelim(); - } - if (message.selectiveGapicGeneration != null && Object.hasOwnProperty.call(message, "selectiveGapicGeneration")) - $root.google.api.SelectiveGapicGeneration.encode(message.selectiveGapicGeneration, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.referenceDocsUri = reader.string(); - break; - } - case 2: { - if (!(message.destinations && message.destinations.length)) - message.destinations = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.destinations.push(reader.int32()); - } else - message.destinations.push(reader.int32()); - break; - } - case 3: { - message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CommonLanguageSettings message. - * @function verify - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CommonLanguageSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - if (!$util.isString(message.referenceDocsUri)) - return "referenceDocsUri: string expected"; - if (message.destinations != null && message.hasOwnProperty("destinations")) { - if (!Array.isArray(message.destinations)) - return "destinations: array expected"; - for (var i = 0; i < message.destinations.length; ++i) - switch (message.destinations[i]) { - default: - return "destinations: enum value[] expected"; - case 0: - case 10: - case 20: - break; - } - } - if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) { - var error = $root.google.api.SelectiveGapicGeneration.verify(message.selectiveGapicGeneration); - if (error) - return "selectiveGapicGeneration." + error; - } - return null; - }; - - /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings - */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) - return object; - var message = new $root.google.api.CommonLanguageSettings(); - if (object.referenceDocsUri != null) - message.referenceDocsUri = String(object.referenceDocsUri); - if (object.destinations) { - if (!Array.isArray(object.destinations)) - throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected"); - message.destinations = []; - for (var i = 0; i < object.destinations.length; ++i) - switch (object.destinations[i]) { - default: - if (typeof object.destinations[i] === "number") { - message.destinations[i] = object.destinations[i]; - break; - } - case "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": - case 0: - message.destinations[i] = 0; - break; - case "GITHUB": - case 10: - message.destinations[i] = 10; - break; - case "PACKAGE_MANAGER": - case 20: - message.destinations[i] = 20; - break; - } - } - if (object.selectiveGapicGeneration != null) { - if (typeof object.selectiveGapicGeneration !== "object") - throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected"); - message.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.fromObject(object.selectiveGapicGeneration); - } - return message; - }; - - /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CommonLanguageSettings - * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CommonLanguageSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.destinations = []; - if (options.defaults) { - object.referenceDocsUri = ""; - object.selectiveGapicGeneration = null; - } - if (message.referenceDocsUri != null && message.hasOwnProperty("referenceDocsUri")) - object.referenceDocsUri = message.referenceDocsUri; - if (message.destinations && message.destinations.length) { - object.destinations = []; - for (var j = 0; j < message.destinations.length; ++j) - object.destinations[j] = options.enums === String ? $root.google.api.ClientLibraryDestination[message.destinations[j]] === undefined ? message.destinations[j] : $root.google.api.ClientLibraryDestination[message.destinations[j]] : message.destinations[j]; - } - if (message.selectiveGapicGeneration != null && message.hasOwnProperty("selectiveGapicGeneration")) - object.selectiveGapicGeneration = $root.google.api.SelectiveGapicGeneration.toObject(message.selectiveGapicGeneration, options); - return object; - }; - - /** - * Converts this CommonLanguageSettings to JSON. - * @function toJSON - * @memberof google.api.CommonLanguageSettings - * @instance - * @returns {Object.} JSON object - */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CommonLanguageSettings - * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; - }; - - return CommonLanguageSettings; - })(); - - api.ClientLibrarySettings = (function() { - - /** - * Properties of a ClientLibrarySettings. - * @memberof google.api - * @interface IClientLibrarySettings - * @property {string|null} [version] ClientLibrarySettings version - * @property {google.api.LaunchStage|null} [launchStage] ClientLibrarySettings launchStage - * @property {boolean|null} [restNumericEnums] ClientLibrarySettings restNumericEnums - * @property {google.api.IJavaSettings|null} [javaSettings] ClientLibrarySettings javaSettings - * @property {google.api.ICppSettings|null} [cppSettings] ClientLibrarySettings cppSettings - * @property {google.api.IPhpSettings|null} [phpSettings] ClientLibrarySettings phpSettings - * @property {google.api.IPythonSettings|null} [pythonSettings] ClientLibrarySettings pythonSettings - * @property {google.api.INodeSettings|null} [nodeSettings] ClientLibrarySettings nodeSettings - * @property {google.api.IDotnetSettings|null} [dotnetSettings] ClientLibrarySettings dotnetSettings - * @property {google.api.IRubySettings|null} [rubySettings] ClientLibrarySettings rubySettings - * @property {google.api.IGoSettings|null} [goSettings] ClientLibrarySettings goSettings - */ - - /** - * Constructs a new ClientLibrarySettings. - * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings - * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - */ - function ClientLibrarySettings(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]]; - } - - /** - * ClientLibrarySettings version. - * @member {string} version - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.version = ""; - - /** - * ClientLibrarySettings launchStage. - * @member {google.api.LaunchStage} launchStage - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.launchStage = 0; - - /** - * ClientLibrarySettings restNumericEnums. - * @member {boolean} restNumericEnums - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.restNumericEnums = false; - - /** - * ClientLibrarySettings javaSettings. - * @member {google.api.IJavaSettings|null|undefined} javaSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.javaSettings = null; - - /** - * ClientLibrarySettings cppSettings. - * @member {google.api.ICppSettings|null|undefined} cppSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.cppSettings = null; - - /** - * ClientLibrarySettings phpSettings. - * @member {google.api.IPhpSettings|null|undefined} phpSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.phpSettings = null; - - /** - * ClientLibrarySettings pythonSettings. - * @member {google.api.IPythonSettings|null|undefined} pythonSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.pythonSettings = null; - - /** - * ClientLibrarySettings nodeSettings. - * @member {google.api.INodeSettings|null|undefined} nodeSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.nodeSettings = null; - - /** - * ClientLibrarySettings dotnetSettings. - * @member {google.api.IDotnetSettings|null|undefined} dotnetSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.dotnetSettings = null; - - /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.rubySettings = null; - - /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings - * @instance - */ - ClientLibrarySettings.prototype.goSettings = null; - - /** - * Creates a new ClientLibrarySettings instance using the specified properties. - * @function create - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance - */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); - }; - - /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.version != null && Object.hasOwnProperty.call(message, "version")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.version); - if (message.launchStage != null && Object.hasOwnProperty.call(message, "launchStage")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.launchStage); - if (message.restNumericEnums != null && Object.hasOwnProperty.call(message, "restNumericEnums")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.restNumericEnums); - if (message.javaSettings != null && Object.hasOwnProperty.call(message, "javaSettings")) - $root.google.api.JavaSettings.encode(message.javaSettings, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.cppSettings != null && Object.hasOwnProperty.call(message, "cppSettings")) - $root.google.api.CppSettings.encode(message.cppSettings, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.phpSettings != null && Object.hasOwnProperty.call(message, "phpSettings")) - $root.google.api.PhpSettings.encode(message.phpSettings, writer.uint32(/* id 23, wireType 2 =*/186).fork()).ldelim(); - if (message.pythonSettings != null && Object.hasOwnProperty.call(message, "pythonSettings")) - $root.google.api.PythonSettings.encode(message.pythonSettings, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); - if (message.nodeSettings != null && Object.hasOwnProperty.call(message, "nodeSettings")) - $root.google.api.NodeSettings.encode(message.nodeSettings, writer.uint32(/* id 25, wireType 2 =*/202).fork()).ldelim(); - if (message.dotnetSettings != null && Object.hasOwnProperty.call(message, "dotnetSettings")) - $root.google.api.DotnetSettings.encode(message.dotnetSettings, writer.uint32(/* id 26, wireType 2 =*/210).fork()).ldelim(); - if (message.rubySettings != null && Object.hasOwnProperty.call(message, "rubySettings")) - $root.google.api.RubySettings.encode(message.rubySettings, writer.uint32(/* id 27, wireType 2 =*/218).fork()).ldelim(); - if (message.goSettings != null && Object.hasOwnProperty.call(message, "goSettings")) - $root.google.api.GoSettings.encode(message.goSettings, writer.uint32(/* id 28, wireType 2 =*/226).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.version = reader.string(); - break; - } - case 2: { - message.launchStage = reader.int32(); - break; - } - case 3: { - message.restNumericEnums = reader.bool(); - break; - } - case 21: { - message.javaSettings = $root.google.api.JavaSettings.decode(reader, reader.uint32()); - break; - } - case 22: { - message.cppSettings = $root.google.api.CppSettings.decode(reader, reader.uint32()); - break; - } - case 23: { - message.phpSettings = $root.google.api.PhpSettings.decode(reader, reader.uint32()); - break; - } - case 24: { - message.pythonSettings = $root.google.api.PythonSettings.decode(reader, reader.uint32()); - break; - } - case 25: { - message.nodeSettings = $root.google.api.NodeSettings.decode(reader, reader.uint32()); - break; - } - case 26: { - message.dotnetSettings = $root.google.api.DotnetSettings.decode(reader, reader.uint32()); - break; - } - case 27: { - message.rubySettings = $root.google.api.RubySettings.decode(reader, reader.uint32()); - break; - } - case 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ClientLibrarySettings message. - * @function verify - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ClientLibrarySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.version != null && message.hasOwnProperty("version")) - if (!$util.isString(message.version)) - return "version: string expected"; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - switch (message.launchStage) { - default: - return "launchStage: enum value expected"; - case 0: - case 6: - case 7: - case 1: - case 2: - case 3: - case 4: - case 5: - break; - } - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - if (typeof message.restNumericEnums !== "boolean") - return "restNumericEnums: boolean expected"; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) { - var error = $root.google.api.JavaSettings.verify(message.javaSettings); - if (error) - return "javaSettings." + error; - } - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) { - var error = $root.google.api.CppSettings.verify(message.cppSettings); - if (error) - return "cppSettings." + error; - } - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) { - var error = $root.google.api.PhpSettings.verify(message.phpSettings); - if (error) - return "phpSettings." + error; - } - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) { - var error = $root.google.api.PythonSettings.verify(message.pythonSettings); - if (error) - return "pythonSettings." + error; - } - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) { - var error = $root.google.api.NodeSettings.verify(message.nodeSettings); - if (error) - return "nodeSettings." + error; - } - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) { - var error = $root.google.api.DotnetSettings.verify(message.dotnetSettings); - if (error) - return "dotnetSettings." + error; - } - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) { - var error = $root.google.api.RubySettings.verify(message.rubySettings); - if (error) - return "rubySettings." + error; - } - if (message.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); - if (error) - return "goSettings." + error; - } - return null; - }; - - /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings - */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) - return object; - var message = new $root.google.api.ClientLibrarySettings(); - if (object.version != null) - message.version = String(object.version); - switch (object.launchStage) { - default: - if (typeof object.launchStage === "number") { - message.launchStage = object.launchStage; - break; - } - break; - case "LAUNCH_STAGE_UNSPECIFIED": - case 0: - message.launchStage = 0; - break; - case "UNIMPLEMENTED": - case 6: - message.launchStage = 6; - break; - case "PRELAUNCH": - case 7: - message.launchStage = 7; - break; - case "EARLY_ACCESS": - case 1: - message.launchStage = 1; - break; - case "ALPHA": - case 2: - message.launchStage = 2; - break; - case "BETA": - case 3: - message.launchStage = 3; - break; - case "GA": - case 4: - message.launchStage = 4; - break; - case "DEPRECATED": - case 5: - message.launchStage = 5; - break; - } - if (object.restNumericEnums != null) - message.restNumericEnums = Boolean(object.restNumericEnums); - if (object.javaSettings != null) { - if (typeof object.javaSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected"); - message.javaSettings = $root.google.api.JavaSettings.fromObject(object.javaSettings); - } - if (object.cppSettings != null) { - if (typeof object.cppSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected"); - message.cppSettings = $root.google.api.CppSettings.fromObject(object.cppSettings); - } - if (object.phpSettings != null) { - if (typeof object.phpSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected"); - message.phpSettings = $root.google.api.PhpSettings.fromObject(object.phpSettings); - } - if (object.pythonSettings != null) { - if (typeof object.pythonSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected"); - message.pythonSettings = $root.google.api.PythonSettings.fromObject(object.pythonSettings); - } - if (object.nodeSettings != null) { - if (typeof object.nodeSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected"); - message.nodeSettings = $root.google.api.NodeSettings.fromObject(object.nodeSettings); - } - if (object.dotnetSettings != null) { - if (typeof object.dotnetSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected"); - message.dotnetSettings = $root.google.api.DotnetSettings.fromObject(object.dotnetSettings); - } - if (object.rubySettings != null) { - if (typeof object.rubySettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected"); - message.rubySettings = $root.google.api.RubySettings.fromObject(object.rubySettings); - } - if (object.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); - } - return message; - }; - - /** - * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.ClientLibrarySettings - * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ClientLibrarySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.version = ""; - object.launchStage = options.enums === String ? "LAUNCH_STAGE_UNSPECIFIED" : 0; - object.restNumericEnums = false; - object.javaSettings = null; - object.cppSettings = null; - object.phpSettings = null; - object.pythonSettings = null; - object.nodeSettings = null; - object.dotnetSettings = null; - object.rubySettings = null; - object.goSettings = null; - } - if (message.version != null && message.hasOwnProperty("version")) - object.version = message.version; - if (message.launchStage != null && message.hasOwnProperty("launchStage")) - object.launchStage = options.enums === String ? $root.google.api.LaunchStage[message.launchStage] === undefined ? message.launchStage : $root.google.api.LaunchStage[message.launchStage] : message.launchStage; - if (message.restNumericEnums != null && message.hasOwnProperty("restNumericEnums")) - object.restNumericEnums = message.restNumericEnums; - if (message.javaSettings != null && message.hasOwnProperty("javaSettings")) - object.javaSettings = $root.google.api.JavaSettings.toObject(message.javaSettings, options); - if (message.cppSettings != null && message.hasOwnProperty("cppSettings")) - object.cppSettings = $root.google.api.CppSettings.toObject(message.cppSettings, options); - if (message.phpSettings != null && message.hasOwnProperty("phpSettings")) - object.phpSettings = $root.google.api.PhpSettings.toObject(message.phpSettings, options); - if (message.pythonSettings != null && message.hasOwnProperty("pythonSettings")) - object.pythonSettings = $root.google.api.PythonSettings.toObject(message.pythonSettings, options); - if (message.nodeSettings != null && message.hasOwnProperty("nodeSettings")) - object.nodeSettings = $root.google.api.NodeSettings.toObject(message.nodeSettings, options); - if (message.dotnetSettings != null && message.hasOwnProperty("dotnetSettings")) - object.dotnetSettings = $root.google.api.DotnetSettings.toObject(message.dotnetSettings, options); - if (message.rubySettings != null && message.hasOwnProperty("rubySettings")) - object.rubySettings = $root.google.api.RubySettings.toObject(message.rubySettings, options); - if (message.goSettings != null && message.hasOwnProperty("goSettings")) - object.goSettings = $root.google.api.GoSettings.toObject(message.goSettings, options); - return object; - }; - - /** - * Converts this ClientLibrarySettings to JSON. - * @function toJSON - * @memberof google.api.ClientLibrarySettings - * @instance - * @returns {Object.} JSON object - */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ClientLibrarySettings - * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; - }; - - return ClientLibrarySettings; - })(); - - api.Publishing = (function() { - - /** - * Properties of a Publishing. - * @memberof google.api - * @interface IPublishing - * @property {Array.|null} [methodSettings] Publishing methodSettings - * @property {string|null} [newIssueUri] Publishing newIssueUri - * @property {string|null} [documentationUri] Publishing documentationUri - * @property {string|null} [apiShortName] Publishing apiShortName - * @property {string|null} [githubLabel] Publishing githubLabel - * @property {Array.|null} [codeownerGithubTeams] Publishing codeownerGithubTeams - * @property {string|null} [docTagPrefix] Publishing docTagPrefix - * @property {google.api.ClientLibraryOrganization|null} [organization] Publishing organization - * @property {Array.|null} [librarySettings] Publishing librarySettings - * @property {string|null} [protoReferenceDocumentationUri] Publishing protoReferenceDocumentationUri - * @property {string|null} [restReferenceDocumentationUri] Publishing restReferenceDocumentationUri - */ - - /** - * Constructs a new Publishing. - * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing - * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set - */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; - 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]]; - } - - /** - * Publishing methodSettings. - * @member {Array.} methodSettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.methodSettings = $util.emptyArray; - - /** - * Publishing newIssueUri. - * @member {string} newIssueUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.newIssueUri = ""; - - /** - * Publishing documentationUri. - * @member {string} documentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.documentationUri = ""; - - /** - * Publishing apiShortName. - * @member {string} apiShortName - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.apiShortName = ""; - - /** - * Publishing githubLabel. - * @member {string} githubLabel - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.githubLabel = ""; - - /** - * Publishing codeownerGithubTeams. - * @member {Array.} codeownerGithubTeams - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.codeownerGithubTeams = $util.emptyArray; - - /** - * Publishing docTagPrefix. - * @member {string} docTagPrefix - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.docTagPrefix = ""; - - /** - * Publishing organization. - * @member {google.api.ClientLibraryOrganization} organization - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.organization = 0; - - /** - * Publishing librarySettings. - * @member {Array.} librarySettings - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.librarySettings = $util.emptyArray; - - /** - * Publishing protoReferenceDocumentationUri. - * @member {string} protoReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.protoReferenceDocumentationUri = ""; - - /** - * Publishing restReferenceDocumentationUri. - * @member {string} restReferenceDocumentationUri - * @memberof google.api.Publishing - * @instance - */ - Publishing.prototype.restReferenceDocumentationUri = ""; - - /** - * Creates a new Publishing instance using the specified properties. - * @function create - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance - */ - Publishing.create = function create(properties) { - return new Publishing(properties); - }; - - /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encode - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.methodSettings != null && message.methodSettings.length) - for (var i = 0; i < message.methodSettings.length; ++i) - $root.google.api.MethodSettings.encode(message.methodSettings[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.newIssueUri != null && Object.hasOwnProperty.call(message, "newIssueUri")) - writer.uint32(/* id 101, wireType 2 =*/810).string(message.newIssueUri); - if (message.documentationUri != null && Object.hasOwnProperty.call(message, "documentationUri")) - writer.uint32(/* id 102, wireType 2 =*/818).string(message.documentationUri); - if (message.apiShortName != null && Object.hasOwnProperty.call(message, "apiShortName")) - writer.uint32(/* id 103, wireType 2 =*/826).string(message.apiShortName); - if (message.githubLabel != null && Object.hasOwnProperty.call(message, "githubLabel")) - writer.uint32(/* id 104, wireType 2 =*/834).string(message.githubLabel); - if (message.codeownerGithubTeams != null && message.codeownerGithubTeams.length) - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - writer.uint32(/* id 105, wireType 2 =*/842).string(message.codeownerGithubTeams[i]); - if (message.docTagPrefix != null && Object.hasOwnProperty.call(message, "docTagPrefix")) - writer.uint32(/* id 106, wireType 2 =*/850).string(message.docTagPrefix); - if (message.organization != null && Object.hasOwnProperty.call(message, "organization")) - writer.uint32(/* id 107, wireType 0 =*/856).int32(message.organization); - if (message.librarySettings != null && message.librarySettings.length) - for (var i = 0; i < message.librarySettings.length; ++i) - $root.google.api.ClientLibrarySettings.encode(message.librarySettings[i], writer.uint32(/* id 109, wireType 2 =*/874).fork()).ldelim(); - if (message.protoReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "protoReferenceDocumentationUri")) - writer.uint32(/* id 110, wireType 2 =*/882).string(message.protoReferenceDocumentationUri); - if (message.restReferenceDocumentationUri != null && Object.hasOwnProperty.call(message, "restReferenceDocumentationUri")) - writer.uint32(/* id 111, wireType 2 =*/890).string(message.restReferenceDocumentationUri); - return writer; - }; - - /** - * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.Publishing - * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Publishing.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Publishing message from the specified reader or buffer. - * @function decode - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.methodSettings && message.methodSettings.length)) - message.methodSettings = []; - message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); - break; - } - case 101: { - message.newIssueUri = reader.string(); - break; - } - case 102: { - message.documentationUri = reader.string(); - break; - } - case 103: { - message.apiShortName = reader.string(); - break; - } - case 104: { - message.githubLabel = reader.string(); - break; - } - case 105: { - if (!(message.codeownerGithubTeams && message.codeownerGithubTeams.length)) - message.codeownerGithubTeams = []; - message.codeownerGithubTeams.push(reader.string()); - break; - } - case 106: { - message.docTagPrefix = reader.string(); - break; - } - case 107: { - message.organization = reader.int32(); - break; - } - case 109: { - if (!(message.librarySettings && message.librarySettings.length)) - message.librarySettings = []; - message.librarySettings.push($root.google.api.ClientLibrarySettings.decode(reader, reader.uint32())); - break; - } - case 110: { - message.protoReferenceDocumentationUri = reader.string(); - break; - } - case 111: { - message.restReferenceDocumentationUri = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.Publishing - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Publishing.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Publishing message. - * @function verify - * @memberof google.api.Publishing - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Publishing.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.methodSettings != null && message.hasOwnProperty("methodSettings")) { - if (!Array.isArray(message.methodSettings)) - return "methodSettings: array expected"; - for (var i = 0; i < message.methodSettings.length; ++i) { - var error = $root.google.api.MethodSettings.verify(message.methodSettings[i]); - if (error) - return "methodSettings." + error; - } - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - if (!$util.isString(message.newIssueUri)) - return "newIssueUri: string expected"; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - if (!$util.isString(message.documentationUri)) - return "documentationUri: string expected"; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - if (!$util.isString(message.apiShortName)) - return "apiShortName: string expected"; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - if (!$util.isString(message.githubLabel)) - return "githubLabel: string expected"; - if (message.codeownerGithubTeams != null && message.hasOwnProperty("codeownerGithubTeams")) { - if (!Array.isArray(message.codeownerGithubTeams)) - return "codeownerGithubTeams: array expected"; - for (var i = 0; i < message.codeownerGithubTeams.length; ++i) - if (!$util.isString(message.codeownerGithubTeams[i])) - return "codeownerGithubTeams: string[] expected"; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - if (!$util.isString(message.docTagPrefix)) - return "docTagPrefix: string expected"; - if (message.organization != null && message.hasOwnProperty("organization")) - switch (message.organization) { - default: - return "organization: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.librarySettings != null && message.hasOwnProperty("librarySettings")) { - if (!Array.isArray(message.librarySettings)) - return "librarySettings: array expected"; - for (var i = 0; i < message.librarySettings.length; ++i) { - var error = $root.google.api.ClientLibrarySettings.verify(message.librarySettings[i]); - if (error) - return "librarySettings." + error; - } - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - if (!$util.isString(message.restReferenceDocumentationUri)) - return "restReferenceDocumentationUri: string expected"; - return null; - }; - - /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.Publishing - * @static - * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing - */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) - return object; - var message = new $root.google.api.Publishing(); - if (object.methodSettings) { - if (!Array.isArray(object.methodSettings)) - throw TypeError(".google.api.Publishing.methodSettings: array expected"); - message.methodSettings = []; - for (var i = 0; i < object.methodSettings.length; ++i) { - if (typeof object.methodSettings[i] !== "object") - throw TypeError(".google.api.Publishing.methodSettings: object expected"); - message.methodSettings[i] = $root.google.api.MethodSettings.fromObject(object.methodSettings[i]); - } - } - if (object.newIssueUri != null) - message.newIssueUri = String(object.newIssueUri); - if (object.documentationUri != null) - message.documentationUri = String(object.documentationUri); - if (object.apiShortName != null) - message.apiShortName = String(object.apiShortName); - if (object.githubLabel != null) - message.githubLabel = String(object.githubLabel); - if (object.codeownerGithubTeams) { - if (!Array.isArray(object.codeownerGithubTeams)) - throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected"); - message.codeownerGithubTeams = []; - for (var i = 0; i < object.codeownerGithubTeams.length; ++i) - message.codeownerGithubTeams[i] = String(object.codeownerGithubTeams[i]); - } - if (object.docTagPrefix != null) - message.docTagPrefix = String(object.docTagPrefix); - switch (object.organization) { - default: - if (typeof object.organization === "number") { - message.organization = object.organization; - break; - } - break; - case "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": - case 0: - message.organization = 0; - break; - case "CLOUD": - case 1: - message.organization = 1; - break; - case "ADS": - case 2: - message.organization = 2; - break; - case "PHOTOS": - case 3: - message.organization = 3; - break; - case "STREET_VIEW": - case 4: - message.organization = 4; - break; - case "SHOPPING": - case 5: - message.organization = 5; - break; - case "GEO": - case 6: - message.organization = 6; - break; - case "GENERATIVE_AI": - case 7: - message.organization = 7; - break; - } - if (object.librarySettings) { - if (!Array.isArray(object.librarySettings)) - throw TypeError(".google.api.Publishing.librarySettings: array expected"); - message.librarySettings = []; - for (var i = 0; i < object.librarySettings.length; ++i) { - if (typeof object.librarySettings[i] !== "object") - throw TypeError(".google.api.Publishing.librarySettings: object expected"); - message.librarySettings[i] = $root.google.api.ClientLibrarySettings.fromObject(object.librarySettings[i]); - } - } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); - if (object.restReferenceDocumentationUri != null) - message.restReferenceDocumentationUri = String(object.restReferenceDocumentationUri); - return message; - }; - - /** - * Creates a plain object from a Publishing message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.Publishing - * @static - * @param {google.api.Publishing} message Publishing - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Publishing.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.methodSettings = []; - object.codeownerGithubTeams = []; - object.librarySettings = []; - } - if (options.defaults) { - object.newIssueUri = ""; - object.documentationUri = ""; - object.apiShortName = ""; - object.githubLabel = ""; - object.docTagPrefix = ""; - object.organization = options.enums === String ? "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED" : 0; - object.protoReferenceDocumentationUri = ""; - object.restReferenceDocumentationUri = ""; - } - if (message.methodSettings && message.methodSettings.length) { - object.methodSettings = []; - for (var j = 0; j < message.methodSettings.length; ++j) - object.methodSettings[j] = $root.google.api.MethodSettings.toObject(message.methodSettings[j], options); - } - if (message.newIssueUri != null && message.hasOwnProperty("newIssueUri")) - object.newIssueUri = message.newIssueUri; - if (message.documentationUri != null && message.hasOwnProperty("documentationUri")) - object.documentationUri = message.documentationUri; - if (message.apiShortName != null && message.hasOwnProperty("apiShortName")) - object.apiShortName = message.apiShortName; - if (message.githubLabel != null && message.hasOwnProperty("githubLabel")) - object.githubLabel = message.githubLabel; - if (message.codeownerGithubTeams && message.codeownerGithubTeams.length) { - object.codeownerGithubTeams = []; - for (var j = 0; j < message.codeownerGithubTeams.length; ++j) - object.codeownerGithubTeams[j] = message.codeownerGithubTeams[j]; - } - if (message.docTagPrefix != null && message.hasOwnProperty("docTagPrefix")) - object.docTagPrefix = message.docTagPrefix; - if (message.organization != null && message.hasOwnProperty("organization")) - object.organization = options.enums === String ? $root.google.api.ClientLibraryOrganization[message.organization] === undefined ? message.organization : $root.google.api.ClientLibraryOrganization[message.organization] : message.organization; - if (message.librarySettings && message.librarySettings.length) { - object.librarySettings = []; - for (var j = 0; j < message.librarySettings.length; ++j) - object.librarySettings[j] = $root.google.api.ClientLibrarySettings.toObject(message.librarySettings[j], options); - } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - object.protoReferenceDocumentationUri = message.protoReferenceDocumentationUri; - if (message.restReferenceDocumentationUri != null && message.hasOwnProperty("restReferenceDocumentationUri")) - object.restReferenceDocumentationUri = message.restReferenceDocumentationUri; - return object; - }; - - /** - * Converts this Publishing to JSON. - * @function toJSON - * @memberof google.api.Publishing - * @instance - * @returns {Object.} JSON object - */ - Publishing.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Publishing - * @function getTypeUrl - * @memberof google.api.Publishing - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.Publishing"; - }; - - return Publishing; - })(); - - api.JavaSettings = (function() { - - /** - * Properties of a JavaSettings. - * @memberof google.api - * @interface IJavaSettings - * @property {string|null} [libraryPackage] JavaSettings libraryPackage - * @property {Object.|null} [serviceClassNames] JavaSettings serviceClassNames - * @property {google.api.ICommonLanguageSettings|null} [common] JavaSettings common - */ - - /** - * Constructs a new JavaSettings. - * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings - * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set - */ - function JavaSettings(properties) { - this.serviceClassNames = {}; - 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]]; - } - - /** - * JavaSettings libraryPackage. - * @member {string} libraryPackage - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.libraryPackage = ""; - - /** - * JavaSettings serviceClassNames. - * @member {Object.} serviceClassNames - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.serviceClassNames = $util.emptyObject; - - /** - * JavaSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings - * @instance - */ - JavaSettings.prototype.common = null; - - /** - * Creates a new JavaSettings instance using the specified properties. - * @function create - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance - */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); - }; - - /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encode - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.libraryPackage != null && Object.hasOwnProperty.call(message, "libraryPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.libraryPackage); - if (message.serviceClassNames != null && Object.hasOwnProperty.call(message, "serviceClassNames")) - for (var keys = Object.keys(message.serviceClassNames), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.serviceClassNames[keys[i]]).ldelim(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.libraryPackage = reader.string(); - break; - } - case 2: { - if (message.serviceClassNames === $util.emptyObject) - message.serviceClassNames = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.serviceClassNames[key] = value; - break; - } - case 3: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.JavaSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a JavaSettings message. - * @function verify - * @memberof google.api.JavaSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - JavaSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - if (!$util.isString(message.libraryPackage)) - return "libraryPackage: string expected"; - if (message.serviceClassNames != null && message.hasOwnProperty("serviceClassNames")) { - if (!$util.isObject(message.serviceClassNames)) - return "serviceClassNames: object expected"; - var key = Object.keys(message.serviceClassNames); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.serviceClassNames[key[i]])) - return "serviceClassNames: string{k:string} expected"; - } - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.JavaSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings - */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) - return object; - var message = new $root.google.api.JavaSettings(); - if (object.libraryPackage != null) - message.libraryPackage = String(object.libraryPackage); - if (object.serviceClassNames) { - if (typeof object.serviceClassNames !== "object") - throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected"); - message.serviceClassNames = {}; - for (var keys = Object.keys(object.serviceClassNames), i = 0; i < keys.length; ++i) - message.serviceClassNames[keys[i]] = String(object.serviceClassNames[keys[i]]); - } - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.JavaSettings - * @static - * @param {google.api.JavaSettings} message JavaSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - JavaSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; - object.common = null; - } - if (message.libraryPackage != null && message.hasOwnProperty("libraryPackage")) - object.libraryPackage = message.libraryPackage; - var keys2; - if (message.serviceClassNames && (keys2 = Object.keys(message.serviceClassNames)).length) { - object.serviceClassNames = {}; - for (var j = 0; j < keys2.length; ++j) - object.serviceClassNames[keys2[j]] = message.serviceClassNames[keys2[j]]; - } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this JavaSettings to JSON. - * @function toJSON - * @memberof google.api.JavaSettings - * @instance - * @returns {Object.} JSON object - */ - JavaSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for JavaSettings - * @function getTypeUrl - * @memberof google.api.JavaSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.JavaSettings"; - }; - - return JavaSettings; - })(); - - api.CppSettings = (function() { - - /** - * Properties of a CppSettings. - * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common - */ - - /** - * Constructs a new CppSettings. - * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings - * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set - */ - function CppSettings(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]]; - } - - /** - * CppSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings - * @instance - */ - CppSettings.prototype.common = null; - - /** - * Creates a new CppSettings instance using the specified properties. - * @function create - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance - */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); - }; - - /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encode - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.CppSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a CppSettings message. - * @function verify - * @memberof google.api.CppSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - CppSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.CppSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings - */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) - return object; - var message = new $root.google.api.CppSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a CppSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.CppSettings - * @static - * @param {google.api.CppSettings} message CppSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - CppSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this CppSettings to JSON. - * @function toJSON - * @memberof google.api.CppSettings - * @instance - * @returns {Object.} JSON object - */ - CppSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for CppSettings - * @function getTypeUrl - * @memberof google.api.CppSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.CppSettings"; - }; - - return CppSettings; - })(); - - api.PhpSettings = (function() { - - /** - * Properties of a PhpSettings. - * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common - */ - - /** - * Constructs a new PhpSettings. - * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings - * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set - */ - function PhpSettings(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]]; - } - - /** - * PhpSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings - * @instance - */ - PhpSettings.prototype.common = null; - - /** - * Creates a new PhpSettings instance using the specified properties. - * @function create - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance - */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); - }; - - /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PhpSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PhpSettings message. - * @function verify - * @memberof google.api.PhpSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PhpSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PhpSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings - */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) - return object; - var message = new $root.google.api.PhpSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PhpSettings - * @static - * @param {google.api.PhpSettings} message PhpSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PhpSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this PhpSettings to JSON. - * @function toJSON - * @memberof google.api.PhpSettings - * @instance - * @returns {Object.} JSON object - */ - PhpSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PhpSettings - * @function getTypeUrl - * @memberof google.api.PhpSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PhpSettings"; - }; - - return PhpSettings; - })(); - - api.PythonSettings = (function() { - - /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common - * @property {google.api.PythonSettings.IExperimentalFeatures|null} [experimentalFeatures] PythonSettings experimentalFeatures - */ - - /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set - */ - function PythonSettings(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]]; - } - - /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.common = null; - - /** - * PythonSettings experimentalFeatures. - * @member {google.api.PythonSettings.IExperimentalFeatures|null|undefined} experimentalFeatures - * @memberof google.api.PythonSettings - * @instance - */ - PythonSettings.prototype.experimentalFeatures = null; - - /** - * Creates a new PythonSettings instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance - */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); - }; - - /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.experimentalFeatures != null && Object.hasOwnProperty.call(message, "experimentalFeatures")) - $root.google.api.PythonSettings.ExperimentalFeatures.encode(message.experimentalFeatures, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PythonSettings message. - * @function verify - * @memberof google.api.PythonSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PythonSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) { - var error = $root.google.api.PythonSettings.ExperimentalFeatures.verify(message.experimentalFeatures); - if (error) - return "experimentalFeatures." + error; - } - return null; - }; - - /** - * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings} PythonSettings - */ - PythonSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings) - return object; - var message = new $root.google.api.PythonSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.PythonSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.experimentalFeatures != null) { - if (typeof object.experimentalFeatures !== "object") - throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected"); - message.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.fromObject(object.experimentalFeatures); - } - return message; - }; - - /** - * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings - * @static - * @param {google.api.PythonSettings} message PythonSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PythonSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.common = null; - object.experimentalFeatures = null; - } - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - if (message.experimentalFeatures != null && message.hasOwnProperty("experimentalFeatures")) - object.experimentalFeatures = $root.google.api.PythonSettings.ExperimentalFeatures.toObject(message.experimentalFeatures, options); - return object; - }; - - /** - * Converts this PythonSettings to JSON. - * @function toJSON - * @memberof google.api.PythonSettings - * @instance - * @returns {Object.} JSON object - */ - PythonSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PythonSettings - * @function getTypeUrl - * @memberof google.api.PythonSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings"; - }; - - PythonSettings.ExperimentalFeatures = (function() { - - /** - * Properties of an ExperimentalFeatures. - * @memberof google.api.PythonSettings - * @interface IExperimentalFeatures - * @property {boolean|null} [restAsyncIoEnabled] ExperimentalFeatures restAsyncIoEnabled - * @property {boolean|null} [protobufPythonicTypesEnabled] ExperimentalFeatures protobufPythonicTypesEnabled - * @property {boolean|null} [unversionedPackageDisabled] ExperimentalFeatures unversionedPackageDisabled - */ - - /** - * Constructs a new ExperimentalFeatures. - * @memberof google.api.PythonSettings - * @classdesc Represents an ExperimentalFeatures. - * @implements IExperimentalFeatures - * @constructor - * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set - */ - function ExperimentalFeatures(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]]; - } - - /** - * ExperimentalFeatures restAsyncIoEnabled. - * @member {boolean} restAsyncIoEnabled - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @instance - */ - ExperimentalFeatures.prototype.restAsyncIoEnabled = false; - - /** - * ExperimentalFeatures protobufPythonicTypesEnabled. - * @member {boolean} protobufPythonicTypesEnabled - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @instance - */ - ExperimentalFeatures.prototype.protobufPythonicTypesEnabled = false; - - /** - * ExperimentalFeatures unversionedPackageDisabled. - * @member {boolean} unversionedPackageDisabled - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @instance - */ - ExperimentalFeatures.prototype.unversionedPackageDisabled = false; - - /** - * Creates a new ExperimentalFeatures instance using the specified properties. - * @function create - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {google.api.PythonSettings.IExperimentalFeatures=} [properties] Properties to set - * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures instance - */ - ExperimentalFeatures.create = function create(properties) { - return new ExperimentalFeatures(properties); - }; - - /** - * Encodes the specified ExperimentalFeatures message. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. - * @function encode - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExperimentalFeatures.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.restAsyncIoEnabled != null && Object.hasOwnProperty.call(message, "restAsyncIoEnabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.restAsyncIoEnabled); - if (message.protobufPythonicTypesEnabled != null && Object.hasOwnProperty.call(message, "protobufPythonicTypesEnabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.protobufPythonicTypesEnabled); - if (message.unversionedPackageDisabled != null && Object.hasOwnProperty.call(message, "unversionedPackageDisabled")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.unversionedPackageDisabled); - return writer; - }; - - /** - * Encodes the specified ExperimentalFeatures message, length delimited. Does not implicitly {@link google.api.PythonSettings.ExperimentalFeatures.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {google.api.PythonSettings.IExperimentalFeatures} message ExperimentalFeatures message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExperimentalFeatures.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExperimentalFeatures message from the specified reader or buffer. - * @function decode - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExperimentalFeatures.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings.ExperimentalFeatures(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.restAsyncIoEnabled = reader.bool(); - break; - } - case 2: { - message.protobufPythonicTypesEnabled = reader.bool(); - break; - } - case 3: { - message.unversionedPackageDisabled = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExperimentalFeatures message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExperimentalFeatures.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExperimentalFeatures message. - * @function verify - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExperimentalFeatures.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) - if (typeof message.restAsyncIoEnabled !== "boolean") - return "restAsyncIoEnabled: boolean expected"; - if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) - if (typeof message.protobufPythonicTypesEnabled !== "boolean") - return "protobufPythonicTypesEnabled: boolean expected"; - if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) - if (typeof message.unversionedPackageDisabled !== "boolean") - return "unversionedPackageDisabled: boolean expected"; - return null; - }; - - /** - * Creates an ExperimentalFeatures message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {Object.} object Plain object - * @returns {google.api.PythonSettings.ExperimentalFeatures} ExperimentalFeatures - */ - ExperimentalFeatures.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PythonSettings.ExperimentalFeatures) - return object; - var message = new $root.google.api.PythonSettings.ExperimentalFeatures(); - if (object.restAsyncIoEnabled != null) - message.restAsyncIoEnabled = Boolean(object.restAsyncIoEnabled); - if (object.protobufPythonicTypesEnabled != null) - message.protobufPythonicTypesEnabled = Boolean(object.protobufPythonicTypesEnabled); - if (object.unversionedPackageDisabled != null) - message.unversionedPackageDisabled = Boolean(object.unversionedPackageDisabled); - return message; - }; - - /** - * Creates a plain object from an ExperimentalFeatures message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {google.api.PythonSettings.ExperimentalFeatures} message ExperimentalFeatures - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExperimentalFeatures.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.restAsyncIoEnabled = false; - object.protobufPythonicTypesEnabled = false; - object.unversionedPackageDisabled = false; - } - if (message.restAsyncIoEnabled != null && message.hasOwnProperty("restAsyncIoEnabled")) - object.restAsyncIoEnabled = message.restAsyncIoEnabled; - if (message.protobufPythonicTypesEnabled != null && message.hasOwnProperty("protobufPythonicTypesEnabled")) - object.protobufPythonicTypesEnabled = message.protobufPythonicTypesEnabled; - if (message.unversionedPackageDisabled != null && message.hasOwnProperty("unversionedPackageDisabled")) - object.unversionedPackageDisabled = message.unversionedPackageDisabled; - return object; - }; - - /** - * Converts this ExperimentalFeatures to JSON. - * @function toJSON - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @instance - * @returns {Object.} JSON object - */ - ExperimentalFeatures.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExperimentalFeatures - * @function getTypeUrl - * @memberof google.api.PythonSettings.ExperimentalFeatures - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExperimentalFeatures.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.PythonSettings.ExperimentalFeatures"; - }; - - return ExperimentalFeatures; - })(); - - return PythonSettings; - })(); - - api.NodeSettings = (function() { - - /** - * Properties of a NodeSettings. - * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common - */ - - /** - * Constructs a new NodeSettings. - * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings - * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set - */ - function NodeSettings(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]]; - } - - /** - * NodeSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings - * @instance - */ - NodeSettings.prototype.common = null; - - /** - * Creates a new NodeSettings instance using the specified properties. - * @function create - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance - */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); - }; - - /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encode - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.NodeSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NodeSettings message. - * @function verify - * @memberof google.api.NodeSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NodeSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.NodeSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings - */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) - return object; - var message = new $root.google.api.NodeSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.NodeSettings - * @static - * @param {google.api.NodeSettings} message NodeSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NodeSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this NodeSettings to JSON. - * @function toJSON - * @memberof google.api.NodeSettings - * @instance - * @returns {Object.} JSON object - */ - NodeSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NodeSettings - * @function getTypeUrl - * @memberof google.api.NodeSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.NodeSettings"; - }; - - return NodeSettings; - })(); - - api.DotnetSettings = (function() { - - /** - * Properties of a DotnetSettings. - * @memberof google.api - * @interface IDotnetSettings - * @property {google.api.ICommonLanguageSettings|null} [common] DotnetSettings common - * @property {Object.|null} [renamedServices] DotnetSettings renamedServices - * @property {Object.|null} [renamedResources] DotnetSettings renamedResources - * @property {Array.|null} [ignoredResources] DotnetSettings ignoredResources - * @property {Array.|null} [forcedNamespaceAliases] DotnetSettings forcedNamespaceAliases - * @property {Array.|null} [handwrittenSignatures] DotnetSettings handwrittenSignatures - */ - - /** - * Constructs a new DotnetSettings. - * @memberof google.api - * @classdesc Represents a DotnetSettings. - * @implements IDotnetSettings - * @constructor - * @param {google.api.IDotnetSettings=} [properties] Properties to set - */ - function DotnetSettings(properties) { - this.renamedServices = {}; - this.renamedResources = {}; - this.ignoredResources = []; - this.forcedNamespaceAliases = []; - this.handwrittenSignatures = []; - 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]]; - } - - /** - * DotnetSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.common = null; - - /** - * DotnetSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedServices = $util.emptyObject; - - /** - * DotnetSettings renamedResources. - * @member {Object.} renamedResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.renamedResources = $util.emptyObject; - - /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; - - /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; - - /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings - * @instance - */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; - - /** - * Creates a new DotnetSettings instance using the specified properties. - * @function create - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance - */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); - }; - - /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encode - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - if (message.renamedResources != null && Object.hasOwnProperty.call(message, "renamedResources")) - for (var keys = Object.keys(message.renamedResources), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedResources[keys[i]]).ldelim(); - if (message.ignoredResources != null && message.ignoredResources.length) - for (var i = 0; i < message.ignoredResources.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.ignoredResources[i]); - if (message.forcedNamespaceAliases != null && message.forcedNamespaceAliases.length) - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.forcedNamespaceAliases[i]); - if (message.handwrittenSignatures != null && message.handwrittenSignatures.length) - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.handwrittenSignatures[i]); - return writer; - }; - - /** - * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedServices[key] = value; - break; - } - case 3: { - if (message.renamedResources === $util.emptyObject) - message.renamedResources = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedResources[key] = value; - break; - } - case 4: { - if (!(message.ignoredResources && message.ignoredResources.length)) - message.ignoredResources = []; - message.ignoredResources.push(reader.string()); - break; - } - case 5: { - if (!(message.forcedNamespaceAliases && message.forcedNamespaceAliases.length)) - message.forcedNamespaceAliases = []; - message.forcedNamespaceAliases.push(reader.string()); - break; - } - case 6: { - if (!(message.handwrittenSignatures && message.handwrittenSignatures.length)) - message.handwrittenSignatures = []; - message.handwrittenSignatures.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.DotnetSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DotnetSettings message. - * @function verify - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DotnetSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - if (message.renamedResources != null && message.hasOwnProperty("renamedResources")) { - if (!$util.isObject(message.renamedResources)) - return "renamedResources: object expected"; - var key = Object.keys(message.renamedResources); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedResources[key[i]])) - return "renamedResources: string{k:string} expected"; - } - if (message.ignoredResources != null && message.hasOwnProperty("ignoredResources")) { - if (!Array.isArray(message.ignoredResources)) - return "ignoredResources: array expected"; - for (var i = 0; i < message.ignoredResources.length; ++i) - if (!$util.isString(message.ignoredResources[i])) - return "ignoredResources: string[] expected"; - } - if (message.forcedNamespaceAliases != null && message.hasOwnProperty("forcedNamespaceAliases")) { - if (!Array.isArray(message.forcedNamespaceAliases)) - return "forcedNamespaceAliases: array expected"; - for (var i = 0; i < message.forcedNamespaceAliases.length; ++i) - if (!$util.isString(message.forcedNamespaceAliases[i])) - return "forcedNamespaceAliases: string[] expected"; - } - if (message.handwrittenSignatures != null && message.hasOwnProperty("handwrittenSignatures")) { - if (!Array.isArray(message.handwrittenSignatures)) - return "handwrittenSignatures: array expected"; - for (var i = 0; i < message.handwrittenSignatures.length; ++i) - if (!$util.isString(message.handwrittenSignatures[i])) - return "handwrittenSignatures: string[] expected"; - } - return null; - }; - - /** - * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.DotnetSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.DotnetSettings} DotnetSettings - */ - DotnetSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.DotnetSettings) - return object; - var message = new $root.google.api.DotnetSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.DotnetSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.DotnetSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - if (object.renamedResources) { - if (typeof object.renamedResources !== "object") - throw TypeError(".google.api.DotnetSettings.renamedResources: object expected"); - message.renamedResources = {}; - for (var keys = Object.keys(object.renamedResources), i = 0; i < keys.length; ++i) - message.renamedResources[keys[i]] = String(object.renamedResources[keys[i]]); - } - if (object.ignoredResources) { - if (!Array.isArray(object.ignoredResources)) - throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected"); - message.ignoredResources = []; - for (var i = 0; i < object.ignoredResources.length; ++i) - message.ignoredResources[i] = String(object.ignoredResources[i]); - } - if (object.forcedNamespaceAliases) { - if (!Array.isArray(object.forcedNamespaceAliases)) - throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected"); - message.forcedNamespaceAliases = []; - for (var i = 0; i < object.forcedNamespaceAliases.length; ++i) - message.forcedNamespaceAliases[i] = String(object.forcedNamespaceAliases[i]); - } - if (object.handwrittenSignatures) { - if (!Array.isArray(object.handwrittenSignatures)) - throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected"); - message.handwrittenSignatures = []; - for (var i = 0; i < object.handwrittenSignatures.length; ++i) - message.handwrittenSignatures[i] = String(object.handwrittenSignatures[i]); - } - return message; - }; - - /** - * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.DotnetSettings - * @static - * @param {google.api.DotnetSettings} message DotnetSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DotnetSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.ignoredResources = []; - object.forcedNamespaceAliases = []; - object.handwrittenSignatures = []; - } - if (options.objects || options.defaults) { - object.renamedServices = {}; - object.renamedResources = {}; - } - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - if (message.renamedResources && (keys2 = Object.keys(message.renamedResources)).length) { - object.renamedResources = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedResources[keys2[j]] = message.renamedResources[keys2[j]]; - } - if (message.ignoredResources && message.ignoredResources.length) { - object.ignoredResources = []; - for (var j = 0; j < message.ignoredResources.length; ++j) - object.ignoredResources[j] = message.ignoredResources[j]; - } - if (message.forcedNamespaceAliases && message.forcedNamespaceAliases.length) { - object.forcedNamespaceAliases = []; - for (var j = 0; j < message.forcedNamespaceAliases.length; ++j) - object.forcedNamespaceAliases[j] = message.forcedNamespaceAliases[j]; - } - if (message.handwrittenSignatures && message.handwrittenSignatures.length) { - object.handwrittenSignatures = []; - for (var j = 0; j < message.handwrittenSignatures.length; ++j) - object.handwrittenSignatures[j] = message.handwrittenSignatures[j]; - } - return object; - }; - - /** - * Converts this DotnetSettings to JSON. - * @function toJSON - * @memberof google.api.DotnetSettings - * @instance - * @returns {Object.} JSON object - */ - DotnetSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DotnetSettings - * @function getTypeUrl - * @memberof google.api.DotnetSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.DotnetSettings"; - }; - - return DotnetSettings; - })(); - - api.RubySettings = (function() { - - /** - * Properties of a RubySettings. - * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common - */ - - /** - * Constructs a new RubySettings. - * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings - * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set - */ - function RubySettings(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]]; - } - - /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings - * @instance - */ - RubySettings.prototype.common = null; - - /** - * Creates a new RubySettings instance using the specified properties. - * @function create - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance - */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); - }; - - /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encode - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.RubySettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RubySettings message. - * @function verify - * @memberof google.api.RubySettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RubySettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - return null; - }; - - /** - * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.RubySettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings - */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) - return object; - var message = new $root.google.api.RubySettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.RubySettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - return message; - }; - - /** - * Creates a plain object from a RubySettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.RubySettings - * @static - * @param {google.api.RubySettings} message RubySettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RubySettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - return object; - }; - - /** - * Converts this RubySettings to JSON. - * @function toJSON - * @memberof google.api.RubySettings - * @instance - * @returns {Object.} JSON object - */ - RubySettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RubySettings - * @function getTypeUrl - * @memberof google.api.RubySettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.RubySettings"; - }; - - return RubySettings; - })(); - - api.GoSettings = (function() { - - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - * @property {Object.|null} [renamedServices] GoSettings renamedServices - */ - - /** - * Constructs a new GoSettings. - * @memberof google.api - * @classdesc Represents a GoSettings. - * @implements IGoSettings - * @constructor - * @param {google.api.IGoSettings=} [properties] Properties to set - */ - function GoSettings(properties) { - this.renamedServices = {}; - 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]]; - } - - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; - - /** - * GoSettings renamedServices. - * @member {Object.} renamedServices - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.renamedServices = $util.emptyObject; - - /** - * Creates a new GoSettings instance using the specified properties. - * @function create - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings=} [properties] Properties to set - * @returns {google.api.GoSettings} GoSettings instance - */ - GoSettings.create = function create(properties) { - return new GoSettings(properties); - }; - - /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encode - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.common != null && Object.hasOwnProperty.call(message, "common")) - $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.renamedServices != null && Object.hasOwnProperty.call(message, "renamedServices")) - for (var keys = Object.keys(message.renamedServices), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.renamedServices[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {google.api.IGoSettings} message GoSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GoSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - case 2: { - if (message.renamedServices === $util.emptyObject) - message.renamedServices = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.renamedServices[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.GoSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.GoSettings} GoSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GoSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GoSettings message. - * @function verify - * @memberof google.api.GoSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GoSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.common != null && message.hasOwnProperty("common")) { - var error = $root.google.api.CommonLanguageSettings.verify(message.common); - if (error) - return "common." + error; - } - if (message.renamedServices != null && message.hasOwnProperty("renamedServices")) { - if (!$util.isObject(message.renamedServices)) - return "renamedServices: object expected"; - var key = Object.keys(message.renamedServices); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.renamedServices[key[i]])) - return "renamedServices: string{k:string} expected"; - } - return null; - }; - - /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.GoSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.GoSettings} GoSettings - */ - GoSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.GoSettings) - return object; - var message = new $root.google.api.GoSettings(); - if (object.common != null) { - if (typeof object.common !== "object") - throw TypeError(".google.api.GoSettings.common: object expected"); - message.common = $root.google.api.CommonLanguageSettings.fromObject(object.common); - } - if (object.renamedServices) { - if (typeof object.renamedServices !== "object") - throw TypeError(".google.api.GoSettings.renamedServices: object expected"); - message.renamedServices = {}; - for (var keys = Object.keys(object.renamedServices), i = 0; i < keys.length; ++i) - message.renamedServices[keys[i]] = String(object.renamedServices[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.GoSettings - * @static - * @param {google.api.GoSettings} message GoSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GoSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.renamedServices = {}; - if (options.defaults) - object.common = null; - if (message.common != null && message.hasOwnProperty("common")) - object.common = $root.google.api.CommonLanguageSettings.toObject(message.common, options); - var keys2; - if (message.renamedServices && (keys2 = Object.keys(message.renamedServices)).length) { - object.renamedServices = {}; - for (var j = 0; j < keys2.length; ++j) - object.renamedServices[keys2[j]] = message.renamedServices[keys2[j]]; - } - return object; - }; - - /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings - * @instance - * @returns {Object.} JSON object - */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GoSettings - * @function getTypeUrl - * @memberof google.api.GoSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { - - /** - * Properties of a MethodSettings. - * @memberof google.api - * @interface IMethodSettings - * @property {string|null} [selector] MethodSettings selector - * @property {google.api.MethodSettings.ILongRunning|null} [longRunning] MethodSettings longRunning - * @property {Array.|null} [autoPopulatedFields] MethodSettings autoPopulatedFields - */ - - /** - * Constructs a new MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings - * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set - */ - function MethodSettings(properties) { - this.autoPopulatedFields = []; - 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]]; - } - - /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.selector = ""; - - /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.longRunning = null; - - /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings - * @instance - */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; - - /** - * Creates a new MethodSettings instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance - */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); - }; - - /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.longRunning != null && Object.hasOwnProperty.call(message, "longRunning")) - $root.google.api.MethodSettings.LongRunning.encode(message.longRunning, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.autoPopulatedFields != null && message.autoPopulatedFields.length) - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.autoPopulatedFields[i]); - return writer; - }; - - /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.selector = reader.string(); - break; - } - case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); - break; - } - case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodSettings message. - * @function verify - * @memberof google.api.MethodSettings - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodSettings.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.selector != null && message.hasOwnProperty("selector")) - if (!$util.isString(message.selector)) - return "selector: string expected"; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) { - var error = $root.google.api.MethodSettings.LongRunning.verify(message.longRunning); - if (error) - return "longRunning." + error; - } - if (message.autoPopulatedFields != null && message.hasOwnProperty("autoPopulatedFields")) { - if (!Array.isArray(message.autoPopulatedFields)) - return "autoPopulatedFields: array expected"; - for (var i = 0; i < message.autoPopulatedFields.length; ++i) - if (!$util.isString(message.autoPopulatedFields[i])) - return "autoPopulatedFields: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings - */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) - return object; - var message = new $root.google.api.MethodSettings(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.longRunning != null) { - if (typeof object.longRunning !== "object") - throw TypeError(".google.api.MethodSettings.longRunning: object expected"); - message.longRunning = $root.google.api.MethodSettings.LongRunning.fromObject(object.longRunning); - } - if (object.autoPopulatedFields) { - if (!Array.isArray(object.autoPopulatedFields)) - throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected"); - message.autoPopulatedFields = []; - for (var i = 0; i < object.autoPopulatedFields.length; ++i) - message.autoPopulatedFields[i] = String(object.autoPopulatedFields[i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings - * @static - * @param {google.api.MethodSettings} message MethodSettings - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodSettings.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; - if (options.defaults) { - object.selector = ""; - object.longRunning = null; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.longRunning != null && message.hasOwnProperty("longRunning")) - object.longRunning = $root.google.api.MethodSettings.LongRunning.toObject(message.longRunning, options); - if (message.autoPopulatedFields && message.autoPopulatedFields.length) { - object.autoPopulatedFields = []; - for (var j = 0; j < message.autoPopulatedFields.length; ++j) - object.autoPopulatedFields[j] = message.autoPopulatedFields[j]; - } - return object; - }; - - /** - * Converts this MethodSettings to JSON. - * @function toJSON - * @memberof google.api.MethodSettings - * @instance - * @returns {Object.} JSON object - */ - MethodSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodSettings - * @function getTypeUrl - * @memberof google.api.MethodSettings - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings"; - }; - - MethodSettings.LongRunning = (function() { - - /** - * Properties of a LongRunning. - * @memberof google.api.MethodSettings - * @interface ILongRunning - * @property {google.protobuf.IDuration|null} [initialPollDelay] LongRunning initialPollDelay - * @property {number|null} [pollDelayMultiplier] LongRunning pollDelayMultiplier - * @property {google.protobuf.IDuration|null} [maxPollDelay] LongRunning maxPollDelay - * @property {google.protobuf.IDuration|null} [totalPollTimeout] LongRunning totalPollTimeout - */ - - /** - * Constructs a new LongRunning. - * @memberof google.api.MethodSettings - * @classdesc Represents a LongRunning. - * @implements ILongRunning - * @constructor - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - */ - function LongRunning(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]]; - } - - /** - * LongRunning initialPollDelay. - * @member {google.protobuf.IDuration|null|undefined} initialPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.initialPollDelay = null; - - /** - * LongRunning pollDelayMultiplier. - * @member {number} pollDelayMultiplier - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.pollDelayMultiplier = 0; - - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; - - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; - - /** - * Creates a new LongRunning instance using the specified properties. - * @function create - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning=} [properties] Properties to set - * @returns {google.api.MethodSettings.LongRunning} LongRunning instance - */ - LongRunning.create = function create(properties) { - return new LongRunning(properties); - }; - - /** - * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.initialPollDelay != null && Object.hasOwnProperty.call(message, "initialPollDelay")) - $root.google.protobuf.Duration.encode(message.initialPollDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.pollDelayMultiplier != null && Object.hasOwnProperty.call(message, "pollDelayMultiplier")) - writer.uint32(/* id 2, wireType 5 =*/21).float(message.pollDelayMultiplier); - if (message.maxPollDelay != null && Object.hasOwnProperty.call(message, "maxPollDelay")) - $root.google.protobuf.Duration.encode(message.maxPollDelay, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.totalPollTimeout != null && Object.hasOwnProperty.call(message, "totalPollTimeout")) - $root.google.protobuf.Duration.encode(message.totalPollTimeout, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.ILongRunning} message LongRunning message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LongRunning.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer. - * @function decode - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings.LongRunning(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.initialPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 2: { - message.pollDelayMultiplier = reader.float(); - break; - } - case 3: { - message.maxPollDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.totalPollTimeout = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LongRunning message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings.LongRunning} LongRunning - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LongRunning.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LongRunning message. - * @function verify - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LongRunning.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.initialPollDelay); - if (error) - return "initialPollDelay." + error; - } - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - if (typeof message.pollDelayMultiplier !== "number") - return "pollDelayMultiplier: number expected"; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) { - var error = $root.google.protobuf.Duration.verify(message.maxPollDelay); - if (error) - return "maxPollDelay." + error; - } - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) { - var error = $root.google.protobuf.Duration.verify(message.totalPollTimeout); - if (error) - return "totalPollTimeout." + error; - } - return null; - }; - - /** - * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {Object.} object Plain object - * @returns {google.api.MethodSettings.LongRunning} LongRunning - */ - LongRunning.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings.LongRunning) - return object; - var message = new $root.google.api.MethodSettings.LongRunning(); - if (object.initialPollDelay != null) { - if (typeof object.initialPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected"); - message.initialPollDelay = $root.google.protobuf.Duration.fromObject(object.initialPollDelay); - } - if (object.pollDelayMultiplier != null) - message.pollDelayMultiplier = Number(object.pollDelayMultiplier); - if (object.maxPollDelay != null) { - if (typeof object.maxPollDelay !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected"); - message.maxPollDelay = $root.google.protobuf.Duration.fromObject(object.maxPollDelay); - } - if (object.totalPollTimeout != null) { - if (typeof object.totalPollTimeout !== "object") - throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected"); - message.totalPollTimeout = $root.google.protobuf.Duration.fromObject(object.totalPollTimeout); - } - return message; - }; - - /** - * Creates a plain object from a LongRunning message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {google.api.MethodSettings.LongRunning} message LongRunning - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LongRunning.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.initialPollDelay = null; - object.pollDelayMultiplier = 0; - object.maxPollDelay = null; - object.totalPollTimeout = null; - } - if (message.initialPollDelay != null && message.hasOwnProperty("initialPollDelay")) - object.initialPollDelay = $root.google.protobuf.Duration.toObject(message.initialPollDelay, options); - if (message.pollDelayMultiplier != null && message.hasOwnProperty("pollDelayMultiplier")) - object.pollDelayMultiplier = options.json && !isFinite(message.pollDelayMultiplier) ? String(message.pollDelayMultiplier) : message.pollDelayMultiplier; - if (message.maxPollDelay != null && message.hasOwnProperty("maxPollDelay")) - object.maxPollDelay = $root.google.protobuf.Duration.toObject(message.maxPollDelay, options); - if (message.totalPollTimeout != null && message.hasOwnProperty("totalPollTimeout")) - object.totalPollTimeout = $root.google.protobuf.Duration.toObject(message.totalPollTimeout, options); - return object; - }; - - /** - * Converts this LongRunning to JSON. - * @function toJSON - * @memberof google.api.MethodSettings.LongRunning - * @instance - * @returns {Object.} JSON object - */ - LongRunning.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LongRunning - * @function getTypeUrl - * @memberof google.api.MethodSettings.LongRunning - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LongRunning.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; - - return LongRunning; - })(); - - return MethodSettings; - })(); - - /** - * ClientLibraryOrganization enum. - * @name google.api.ClientLibraryOrganization - * @enum {number} - * @property {number} CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED=0 CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED value - * @property {number} CLOUD=1 CLOUD value - * @property {number} ADS=2 ADS value - * @property {number} PHOTOS=3 PHOTOS value - * @property {number} STREET_VIEW=4 STREET_VIEW value - * @property {number} SHOPPING=5 SHOPPING value - * @property {number} GEO=6 GEO value - * @property {number} GENERATIVE_AI=7 GENERATIVE_AI value - */ - api.ClientLibraryOrganization = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"] = 0; - values[valuesById[1] = "CLOUD"] = 1; - values[valuesById[2] = "ADS"] = 2; - values[valuesById[3] = "PHOTOS"] = 3; - values[valuesById[4] = "STREET_VIEW"] = 4; - values[valuesById[5] = "SHOPPING"] = 5; - values[valuesById[6] = "GEO"] = 6; - values[valuesById[7] = "GENERATIVE_AI"] = 7; - return values; - })(); - - /** - * ClientLibraryDestination enum. - * @name google.api.ClientLibraryDestination - * @enum {number} - * @property {number} CLIENT_LIBRARY_DESTINATION_UNSPECIFIED=0 CLIENT_LIBRARY_DESTINATION_UNSPECIFIED value - * @property {number} GITHUB=10 GITHUB value - * @property {number} PACKAGE_MANAGER=20 PACKAGE_MANAGER value - */ - api.ClientLibraryDestination = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"] = 0; - values[valuesById[10] = "GITHUB"] = 10; - values[valuesById[20] = "PACKAGE_MANAGER"] = 20; - return values; - })(); - - api.SelectiveGapicGeneration = (function() { - - /** - * Properties of a SelectiveGapicGeneration. - * @memberof google.api - * @interface ISelectiveGapicGeneration - * @property {Array.|null} [methods] SelectiveGapicGeneration methods - * @property {boolean|null} [generateOmittedAsInternal] SelectiveGapicGeneration generateOmittedAsInternal - */ - - /** - * Constructs a new SelectiveGapicGeneration. - * @memberof google.api - * @classdesc Represents a SelectiveGapicGeneration. - * @implements ISelectiveGapicGeneration - * @constructor - * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set - */ - function SelectiveGapicGeneration(properties) { - this.methods = []; - 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]]; - } - - /** - * SelectiveGapicGeneration methods. - * @member {Array.} methods - * @memberof google.api.SelectiveGapicGeneration - * @instance - */ - SelectiveGapicGeneration.prototype.methods = $util.emptyArray; - - /** - * SelectiveGapicGeneration generateOmittedAsInternal. - * @member {boolean} generateOmittedAsInternal - * @memberof google.api.SelectiveGapicGeneration - * @instance - */ - SelectiveGapicGeneration.prototype.generateOmittedAsInternal = false; - - /** - * Creates a new SelectiveGapicGeneration instance using the specified properties. - * @function create - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {google.api.ISelectiveGapicGeneration=} [properties] Properties to set - * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration instance - */ - SelectiveGapicGeneration.create = function create(properties) { - return new SelectiveGapicGeneration(properties); - }; - - /** - * Encodes the specified SelectiveGapicGeneration message. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. - * @function encode - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SelectiveGapicGeneration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.methods != null && message.methods.length) - for (var i = 0; i < message.methods.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.methods[i]); - if (message.generateOmittedAsInternal != null && Object.hasOwnProperty.call(message, "generateOmittedAsInternal")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.generateOmittedAsInternal); - return writer; - }; - - /** - * Encodes the specified SelectiveGapicGeneration message, length delimited. Does not implicitly {@link google.api.SelectiveGapicGeneration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {google.api.ISelectiveGapicGeneration} message SelectiveGapicGeneration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SelectiveGapicGeneration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SelectiveGapicGeneration message from the specified reader or buffer. - * @function decode - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SelectiveGapicGeneration.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.SelectiveGapicGeneration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.methods && message.methods.length)) - message.methods = []; - message.methods.push(reader.string()); - break; - } - case 2: { - message.generateOmittedAsInternal = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SelectiveGapicGeneration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SelectiveGapicGeneration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SelectiveGapicGeneration message. - * @function verify - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SelectiveGapicGeneration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.methods != null && message.hasOwnProperty("methods")) { - if (!Array.isArray(message.methods)) - return "methods: array expected"; - for (var i = 0; i < message.methods.length; ++i) - if (!$util.isString(message.methods[i])) - return "methods: string[] expected"; - } - if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) - if (typeof message.generateOmittedAsInternal !== "boolean") - return "generateOmittedAsInternal: boolean expected"; - return null; - }; - - /** - * Creates a SelectiveGapicGeneration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {Object.} object Plain object - * @returns {google.api.SelectiveGapicGeneration} SelectiveGapicGeneration - */ - SelectiveGapicGeneration.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.SelectiveGapicGeneration) - return object; - var message = new $root.google.api.SelectiveGapicGeneration(); - if (object.methods) { - if (!Array.isArray(object.methods)) - throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected"); - message.methods = []; - for (var i = 0; i < object.methods.length; ++i) - message.methods[i] = String(object.methods[i]); - } - if (object.generateOmittedAsInternal != null) - message.generateOmittedAsInternal = Boolean(object.generateOmittedAsInternal); - return message; - }; - - /** - * Creates a plain object from a SelectiveGapicGeneration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {google.api.SelectiveGapicGeneration} message SelectiveGapicGeneration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SelectiveGapicGeneration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.methods = []; - if (options.defaults) - object.generateOmittedAsInternal = false; - if (message.methods && message.methods.length) { - object.methods = []; - for (var j = 0; j < message.methods.length; ++j) - object.methods[j] = message.methods[j]; - } - if (message.generateOmittedAsInternal != null && message.hasOwnProperty("generateOmittedAsInternal")) - object.generateOmittedAsInternal = message.generateOmittedAsInternal; - return object; - }; - - /** - * Converts this SelectiveGapicGeneration to JSON. - * @function toJSON - * @memberof google.api.SelectiveGapicGeneration - * @instance - * @returns {Object.} JSON object - */ - SelectiveGapicGeneration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SelectiveGapicGeneration - * @function getTypeUrl - * @memberof google.api.SelectiveGapicGeneration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SelectiveGapicGeneration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.SelectiveGapicGeneration"; - }; - - return SelectiveGapicGeneration; - })(); - - return api; - })(); - - google.protobuf = (function() { - - /** - * Namespace protobuf. - * @memberof google - * @namespace - */ - var protobuf = {}; - - protobuf.FileDescriptorSet = (function() { - - /** - * Properties of a FileDescriptorSet. - * @memberof google.protobuf - * @interface IFileDescriptorSet - * @property {Array.|null} [file] FileDescriptorSet file - */ - - /** - * Constructs a new FileDescriptorSet. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorSet. - * @implements IFileDescriptorSet - * @constructor - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - */ - function FileDescriptorSet(properties) { - this.file = []; - 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]]; - } - - /** - * FileDescriptorSet file. - * @member {Array.} file - * @memberof google.protobuf.FileDescriptorSet - * @instance - */ - FileDescriptorSet.prototype.file = $util.emptyArray; - - /** - * Creates a new FileDescriptorSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance - */ - FileDescriptorSet.create = function create(properties) { - return new FileDescriptorSet(properties); - }; - - /** - * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.file != null && message.file.length) - for (var i = 0; i < message.file.length; ++i) - $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.file && message.file.length)) - message.file = []; - message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorSet message. - * @function verify - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.file != null && message.hasOwnProperty("file")) { - if (!Array.isArray(message.file)) - return "file: array expected"; - for (var i = 0; i < message.file.length; ++i) { - var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); - if (error) - return "file." + error; - } - } - return null; - }; - - /** - * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet - */ - FileDescriptorSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorSet) - return object; - var message = new $root.google.protobuf.FileDescriptorSet(); - if (object.file) { - if (!Array.isArray(object.file)) - throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); - message.file = []; - for (var i = 0; i < object.file.length; ++i) { - if (typeof object.file[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); - message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.file = []; - if (message.file && message.file.length) { - object.file = []; - for (var j = 0; j < message.file.length; ++j) - object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); - } - return object; - }; - - /** - * Converts this FileDescriptorSet to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorSet - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorSet - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; - }; - - return FileDescriptorSet; - })(); - - /** - * Edition enum. - * @name google.protobuf.Edition - * @enum {number} - * @property {number} EDITION_UNKNOWN=0 EDITION_UNKNOWN value - * @property {number} EDITION_LEGACY=900 EDITION_LEGACY value - * @property {number} EDITION_PROTO2=998 EDITION_PROTO2 value - * @property {number} EDITION_PROTO3=999 EDITION_PROTO3 value - * @property {number} EDITION_2023=1000 EDITION_2023 value - * @property {number} EDITION_2024=1001 EDITION_2024 value - * @property {number} EDITION_1_TEST_ONLY=1 EDITION_1_TEST_ONLY value - * @property {number} EDITION_2_TEST_ONLY=2 EDITION_2_TEST_ONLY value - * @property {number} EDITION_99997_TEST_ONLY=99997 EDITION_99997_TEST_ONLY value - * @property {number} EDITION_99998_TEST_ONLY=99998 EDITION_99998_TEST_ONLY value - * @property {number} EDITION_99999_TEST_ONLY=99999 EDITION_99999_TEST_ONLY value - * @property {number} EDITION_MAX=2147483647 EDITION_MAX value - */ - protobuf.Edition = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "EDITION_UNKNOWN"] = 0; - values[valuesById[900] = "EDITION_LEGACY"] = 900; - values[valuesById[998] = "EDITION_PROTO2"] = 998; - values[valuesById[999] = "EDITION_PROTO3"] = 999; - values[valuesById[1000] = "EDITION_2023"] = 1000; - values[valuesById[1001] = "EDITION_2024"] = 1001; - values[valuesById[1] = "EDITION_1_TEST_ONLY"] = 1; - values[valuesById[2] = "EDITION_2_TEST_ONLY"] = 2; - values[valuesById[99997] = "EDITION_99997_TEST_ONLY"] = 99997; - values[valuesById[99998] = "EDITION_99998_TEST_ONLY"] = 99998; - values[valuesById[99999] = "EDITION_99999_TEST_ONLY"] = 99999; - values[valuesById[2147483647] = "EDITION_MAX"] = 2147483647; - return values; - })(); - - protobuf.FileDescriptorProto = (function() { - - /** - * Properties of a FileDescriptorProto. - * @memberof google.protobuf - * @interface IFileDescriptorProto - * @property {string|null} [name] FileDescriptorProto name - * @property {string|null} ["package"] FileDescriptorProto package - * @property {Array.|null} [dependency] FileDescriptorProto dependency - * @property {Array.|null} [publicDependency] FileDescriptorProto publicDependency - * @property {Array.|null} [weakDependency] FileDescriptorProto weakDependency - * @property {Array.|null} [optionDependency] FileDescriptorProto optionDependency - * @property {Array.|null} [messageType] FileDescriptorProto messageType - * @property {Array.|null} [enumType] FileDescriptorProto enumType - * @property {Array.|null} [service] FileDescriptorProto service - * @property {Array.|null} [extension] FileDescriptorProto extension - * @property {google.protobuf.IFileOptions|null} [options] FileDescriptorProto options - * @property {google.protobuf.ISourceCodeInfo|null} [sourceCodeInfo] FileDescriptorProto sourceCodeInfo - * @property {string|null} [syntax] FileDescriptorProto syntax - * @property {google.protobuf.Edition|null} [edition] FileDescriptorProto edition - */ - - /** - * Constructs a new FileDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FileDescriptorProto. - * @implements IFileDescriptorProto - * @constructor - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - */ - function FileDescriptorProto(properties) { - this.dependency = []; - this.publicDependency = []; - this.weakDependency = []; - this.optionDependency = []; - this.messageType = []; - this.enumType = []; - this.service = []; - this.extension = []; - 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]]; - } - - /** - * FileDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.name = ""; - - /** - * FileDescriptorProto package. - * @member {string} package - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype["package"] = ""; - - /** - * FileDescriptorProto dependency. - * @member {Array.} dependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.dependency = $util.emptyArray; - - /** - * FileDescriptorProto publicDependency. - * @member {Array.} publicDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.publicDependency = $util.emptyArray; - - /** - * FileDescriptorProto weakDependency. - * @member {Array.} weakDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.weakDependency = $util.emptyArray; - - /** - * FileDescriptorProto optionDependency. - * @member {Array.} optionDependency - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.optionDependency = $util.emptyArray; - - /** - * FileDescriptorProto messageType. - * @member {Array.} messageType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.messageType = $util.emptyArray; - - /** - * FileDescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * FileDescriptorProto service. - * @member {Array.} service - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.service = $util.emptyArray; - - /** - * FileDescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.extension = $util.emptyArray; - - /** - * FileDescriptorProto options. - * @member {google.protobuf.IFileOptions|null|undefined} options - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.options = null; - - /** - * FileDescriptorProto sourceCodeInfo. - * @member {google.protobuf.ISourceCodeInfo|null|undefined} sourceCodeInfo - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.sourceCodeInfo = null; - - /** - * FileDescriptorProto syntax. - * @member {string} syntax - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.syntax = ""; - - /** - * FileDescriptorProto edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FileDescriptorProto - * @instance - */ - FileDescriptorProto.prototype.edition = 0; - - /** - * Creates a new FileDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto instance - */ - FileDescriptorProto.create = function create(properties) { - return new FileDescriptorProto(properties); - }; - - /** - * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message["package"] != null && Object.hasOwnProperty.call(message, "package")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message["package"]); - if (message.dependency != null && message.dependency.length) - for (var i = 0; i < message.dependency.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.dependency[i]); - if (message.messageType != null && message.messageType.length) - for (var i = 0; i < message.messageType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.messageType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.service != null && message.service.length) - for (var i = 0; i < message.service.length; ++i) - $root.google.protobuf.ServiceDescriptorProto.encode(message.service[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FileOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.sourceCodeInfo != null && Object.hasOwnProperty.call(message, "sourceCodeInfo")) - $root.google.protobuf.SourceCodeInfo.encode(message.sourceCodeInfo, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.publicDependency != null && message.publicDependency.length) - for (var i = 0; i < message.publicDependency.length; ++i) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.publicDependency[i]); - if (message.weakDependency != null && message.weakDependency.length) - for (var i = 0; i < message.weakDependency.length; ++i) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.weakDependency[i]); - if (message.syntax != null && Object.hasOwnProperty.call(message, "syntax")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.syntax); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 14, wireType 0 =*/112).int32(message.edition); - if (message.optionDependency != null && message.optionDependency.length) - for (var i = 0; i < message.optionDependency.length; ++i) - writer.uint32(/* id 15, wireType 2 =*/122).string(message.optionDependency[i]); - return writer; - }; - - /** - * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.IFileDescriptorProto} message FileDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message["package"] = reader.string(); - break; - } - case 3: { - if (!(message.dependency && message.dependency.length)) - message.dependency = []; - message.dependency.push(reader.string()); - break; - } - case 10: { - if (!(message.publicDependency && message.publicDependency.length)) - message.publicDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.publicDependency.push(reader.int32()); - } else - message.publicDependency.push(reader.int32()); - break; - } - case 11: { - if (!(message.weakDependency && message.weakDependency.length)) - message.weakDependency = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.weakDependency.push(reader.int32()); - } else - message.weakDependency.push(reader.int32()); - break; - } - case 15: { - if (!(message.optionDependency && message.optionDependency.length)) - message.optionDependency = []; - message.optionDependency.push(reader.string()); - break; - } - case 4: { - if (!(message.messageType && message.messageType.length)) - message.messageType = []; - message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.service && message.service.length)) - message.service = []; - message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 8: { - message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); - break; - } - case 12: { - message.syntax = reader.string(); - break; - } - case 14: { - message.edition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileDescriptorProto message. - * @function verify - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message["package"] != null && message.hasOwnProperty("package")) - if (!$util.isString(message["package"])) - return "package: string expected"; - if (message.dependency != null && message.hasOwnProperty("dependency")) { - if (!Array.isArray(message.dependency)) - return "dependency: array expected"; - for (var i = 0; i < message.dependency.length; ++i) - if (!$util.isString(message.dependency[i])) - return "dependency: string[] expected"; - } - if (message.publicDependency != null && message.hasOwnProperty("publicDependency")) { - if (!Array.isArray(message.publicDependency)) - return "publicDependency: array expected"; - for (var i = 0; i < message.publicDependency.length; ++i) - if (!$util.isInteger(message.publicDependency[i])) - return "publicDependency: integer[] expected"; - } - if (message.weakDependency != null && message.hasOwnProperty("weakDependency")) { - if (!Array.isArray(message.weakDependency)) - return "weakDependency: array expected"; - for (var i = 0; i < message.weakDependency.length; ++i) - if (!$util.isInteger(message.weakDependency[i])) - return "weakDependency: integer[] expected"; - } - if (message.optionDependency != null && message.hasOwnProperty("optionDependency")) { - if (!Array.isArray(message.optionDependency)) - return "optionDependency: array expected"; - for (var i = 0; i < message.optionDependency.length; ++i) - if (!$util.isString(message.optionDependency[i])) - return "optionDependency: string[] expected"; - } - if (message.messageType != null && message.hasOwnProperty("messageType")) { - if (!Array.isArray(message.messageType)) - return "messageType: array expected"; - for (var i = 0; i < message.messageType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.messageType[i]); - if (error) - return "messageType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.service != null && message.hasOwnProperty("service")) { - if (!Array.isArray(message.service)) - return "service: array expected"; - for (var i = 0; i < message.service.length; ++i) { - var error = $root.google.protobuf.ServiceDescriptorProto.verify(message.service[i]); - if (error) - return "service." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FileOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) { - var error = $root.google.protobuf.SourceCodeInfo.verify(message.sourceCodeInfo); - if (error) - return "sourceCodeInfo." + error; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - if (!$util.isString(message.syntax)) - return "syntax: string expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileDescriptorProto} FileDescriptorProto - */ - FileDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileDescriptorProto) - return object; - var message = new $root.google.protobuf.FileDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object["package"] != null) - message["package"] = String(object["package"]); - if (object.dependency) { - if (!Array.isArray(object.dependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected"); - message.dependency = []; - for (var i = 0; i < object.dependency.length; ++i) - message.dependency[i] = String(object.dependency[i]); - } - if (object.publicDependency) { - if (!Array.isArray(object.publicDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected"); - message.publicDependency = []; - for (var i = 0; i < object.publicDependency.length; ++i) - message.publicDependency[i] = object.publicDependency[i] | 0; - } - if (object.weakDependency) { - if (!Array.isArray(object.weakDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected"); - message.weakDependency = []; - for (var i = 0; i < object.weakDependency.length; ++i) - message.weakDependency[i] = object.weakDependency[i] | 0; - } - if (object.optionDependency) { - if (!Array.isArray(object.optionDependency)) - throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected"); - message.optionDependency = []; - for (var i = 0; i < object.optionDependency.length; ++i) - message.optionDependency[i] = String(object.optionDependency[i]); - } - if (object.messageType) { - if (!Array.isArray(object.messageType)) - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected"); - message.messageType = []; - for (var i = 0; i < object.messageType.length; ++i) { - if (typeof object.messageType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected"); - message.messageType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.messageType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.service) { - if (!Array.isArray(object.service)) - throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected"); - message.service = []; - for (var i = 0; i < object.service.length; ++i) { - if (typeof object.service[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected"); - message.service[i] = $root.google.protobuf.ServiceDescriptorProto.fromObject(object.service[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FileOptions.fromObject(object.options); - } - if (object.sourceCodeInfo != null) { - if (typeof object.sourceCodeInfo !== "object") - throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected"); - message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.fromObject(object.sourceCodeInfo); - } - if (object.syntax != null) - message.syntax = String(object.syntax); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_LEGACY": - case 900: - message.edition = 900; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {google.protobuf.FileDescriptorProto} message FileDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.dependency = []; - object.messageType = []; - object.enumType = []; - object.service = []; - object.extension = []; - object.publicDependency = []; - object.weakDependency = []; - object.optionDependency = []; - } - if (options.defaults) { - object.name = ""; - object["package"] = ""; - object.options = null; - object.sourceCodeInfo = null; - object.syntax = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message["package"] != null && message.hasOwnProperty("package")) - object["package"] = message["package"]; - if (message.dependency && message.dependency.length) { - object.dependency = []; - for (var j = 0; j < message.dependency.length; ++j) - object.dependency[j] = message.dependency[j]; - } - if (message.messageType && message.messageType.length) { - object.messageType = []; - for (var j = 0; j < message.messageType.length; ++j) - object.messageType[j] = $root.google.protobuf.DescriptorProto.toObject(message.messageType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.service && message.service.length) { - object.service = []; - for (var j = 0; j < message.service.length; ++j) - object.service[j] = $root.google.protobuf.ServiceDescriptorProto.toObject(message.service[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FileOptions.toObject(message.options, options); - if (message.sourceCodeInfo != null && message.hasOwnProperty("sourceCodeInfo")) - object.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.toObject(message.sourceCodeInfo, options); - if (message.publicDependency && message.publicDependency.length) { - object.publicDependency = []; - for (var j = 0; j < message.publicDependency.length; ++j) - object.publicDependency[j] = message.publicDependency[j]; - } - if (message.weakDependency && message.weakDependency.length) { - object.weakDependency = []; - for (var j = 0; j < message.weakDependency.length; ++j) - object.weakDependency[j] = message.weakDependency[j]; - } - if (message.syntax != null && message.hasOwnProperty("syntax")) - object.syntax = message.syntax; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - if (message.optionDependency && message.optionDependency.length) { - object.optionDependency = []; - for (var j = 0; j < message.optionDependency.length; ++j) - object.optionDependency[j] = message.optionDependency[j]; - } - return object; - }; - - /** - * Converts this FileDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FileDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FileDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FileDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileDescriptorProto"; - }; - - return FileDescriptorProto; - })(); - - protobuf.DescriptorProto = (function() { - - /** - * Properties of a DescriptorProto. - * @memberof google.protobuf - * @interface IDescriptorProto - * @property {string|null} [name] DescriptorProto name - * @property {Array.|null} [field] DescriptorProto field - * @property {Array.|null} [extension] DescriptorProto extension - * @property {Array.|null} [nestedType] DescriptorProto nestedType - * @property {Array.|null} [enumType] DescriptorProto enumType - * @property {Array.|null} [extensionRange] DescriptorProto extensionRange - * @property {Array.|null} [oneofDecl] DescriptorProto oneofDecl - * @property {google.protobuf.IMessageOptions|null} [options] DescriptorProto options - * @property {Array.|null} [reservedRange] DescriptorProto reservedRange - * @property {Array.|null} [reservedName] DescriptorProto reservedName - * @property {google.protobuf.SymbolVisibility|null} [visibility] DescriptorProto visibility - */ - - /** - * Constructs a new DescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a DescriptorProto. - * @implements IDescriptorProto - * @constructor - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - */ - function DescriptorProto(properties) { - this.field = []; - this.extension = []; - this.nestedType = []; - this.enumType = []; - this.extensionRange = []; - this.oneofDecl = []; - this.reservedRange = []; - this.reservedName = []; - 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]]; - } - - /** - * DescriptorProto name. - * @member {string} name - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.name = ""; - - /** - * DescriptorProto field. - * @member {Array.} field - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.field = $util.emptyArray; - - /** - * DescriptorProto extension. - * @member {Array.} extension - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extension = $util.emptyArray; - - /** - * DescriptorProto nestedType. - * @member {Array.} nestedType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.nestedType = $util.emptyArray; - - /** - * DescriptorProto enumType. - * @member {Array.} enumType - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.enumType = $util.emptyArray; - - /** - * DescriptorProto extensionRange. - * @member {Array.} extensionRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.extensionRange = $util.emptyArray; - - /** - * DescriptorProto oneofDecl. - * @member {Array.} oneofDecl - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.oneofDecl = $util.emptyArray; - - /** - * DescriptorProto options. - * @member {google.protobuf.IMessageOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.options = null; - - /** - * DescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * DescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * DescriptorProto visibility. - * @member {google.protobuf.SymbolVisibility} visibility - * @memberof google.protobuf.DescriptorProto - * @instance - */ - DescriptorProto.prototype.visibility = 0; - - /** - * Creates a new DescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto} DescriptorProto instance - */ - DescriptorProto.create = function create(properties) { - return new DescriptorProto(properties); - }; - - /** - * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.field != null && message.field.length) - for (var i = 0; i < message.field.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.field[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nestedType != null && message.nestedType.length) - for (var i = 0; i < message.nestedType.length; ++i) - $root.google.protobuf.DescriptorProto.encode(message.nestedType[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.enumType != null && message.enumType.length) - for (var i = 0; i < message.enumType.length; ++i) - $root.google.protobuf.EnumDescriptorProto.encode(message.enumType[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.extensionRange != null && message.extensionRange.length) - for (var i = 0; i < message.extensionRange.length; ++i) - $root.google.protobuf.DescriptorProto.ExtensionRange.encode(message.extensionRange[i], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.extension != null && message.extension.length) - for (var i = 0; i < message.extension.length; ++i) - $root.google.protobuf.FieldDescriptorProto.encode(message.extension[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MessageOptions.encode(message.options, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.oneofDecl != null && message.oneofDecl.length) - for (var i = 0; i < message.oneofDecl.length; ++i) - $root.google.protobuf.OneofDescriptorProto.encode(message.oneofDecl[i], writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.DescriptorProto.ReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.reservedName[i]); - if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) - writer.uint32(/* id 11, wireType 0 =*/88).int32(message.visibility); - return writer; - }; - - /** - * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.IDescriptorProto} message DescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.field && message.field.length)) - message.field = []; - message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 6: { - if (!(message.extension && message.extension.length)) - message.extension = []; - message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - if (!(message.nestedType && message.nestedType.length)) - message.nestedType = []; - message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); - break; - } - case 4: { - if (!(message.enumType && message.enumType.length)) - message.enumType = []; - message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.extensionRange && message.extensionRange.length)) - message.extensionRange = []; - message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); - break; - } - case 8: { - if (!(message.oneofDecl && message.oneofDecl.length)) - message.oneofDecl = []; - message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 7: { - message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); - break; - } - case 9: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); - break; - } - case 10: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - case 11: { - message.visibility = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto} DescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DescriptorProto message. - * @function verify - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.field != null && message.hasOwnProperty("field")) { - if (!Array.isArray(message.field)) - return "field: array expected"; - for (var i = 0; i < message.field.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); - if (error) - return "field." + error; - } - } - if (message.extension != null && message.hasOwnProperty("extension")) { - if (!Array.isArray(message.extension)) - return "extension: array expected"; - for (var i = 0; i < message.extension.length; ++i) { - var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); - if (error) - return "extension." + error; - } - } - if (message.nestedType != null && message.hasOwnProperty("nestedType")) { - if (!Array.isArray(message.nestedType)) - return "nestedType: array expected"; - for (var i = 0; i < message.nestedType.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); - if (error) - return "nestedType." + error; - } - } - if (message.enumType != null && message.hasOwnProperty("enumType")) { - if (!Array.isArray(message.enumType)) - return "enumType: array expected"; - for (var i = 0; i < message.enumType.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); - if (error) - return "enumType." + error; - } - } - if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { - if (!Array.isArray(message.extensionRange)) - return "extensionRange: array expected"; - for (var i = 0; i < message.extensionRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); - if (error) - return "extensionRange." + error; - } - } - if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { - if (!Array.isArray(message.oneofDecl)) - return "oneofDecl: array expected"; - for (var i = 0; i < message.oneofDecl.length; ++i) { - var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); - if (error) - return "oneofDecl." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MessageOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - if (message.visibility != null && message.hasOwnProperty("visibility")) - switch (message.visibility) { - default: - return "visibility: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto} DescriptorProto - */ - DescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto) - return object; - var message = new $root.google.protobuf.DescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.field) { - if (!Array.isArray(object.field)) - throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); - message.field = []; - for (var i = 0; i < object.field.length; ++i) { - if (typeof object.field[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); - message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); - } - } - if (object.extension) { - if (!Array.isArray(object.extension)) - throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); - message.extension = []; - for (var i = 0; i < object.extension.length; ++i) { - if (typeof object.extension[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); - message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); - } - } - if (object.nestedType) { - if (!Array.isArray(object.nestedType)) - throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); - message.nestedType = []; - for (var i = 0; i < object.nestedType.length; ++i) { - if (typeof object.nestedType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); - message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); - } - } - if (object.enumType) { - if (!Array.isArray(object.enumType)) - throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); - message.enumType = []; - for (var i = 0; i < object.enumType.length; ++i) { - if (typeof object.enumType[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); - message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); - } - } - if (object.extensionRange) { - if (!Array.isArray(object.extensionRange)) - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); - message.extensionRange = []; - for (var i = 0; i < object.extensionRange.length; ++i) { - if (typeof object.extensionRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); - message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); - } - } - if (object.oneofDecl) { - if (!Array.isArray(object.oneofDecl)) - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); - message.oneofDecl = []; - for (var i = 0; i < object.oneofDecl.length; ++i) { - if (typeof object.oneofDecl[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); - message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - switch (object.visibility) { - default: - if (typeof object.visibility === "number") { - message.visibility = object.visibility; - break; - } - break; - case "VISIBILITY_UNSET": - case 0: - message.visibility = 0; - break; - case "VISIBILITY_LOCAL": - case 1: - message.visibility = 1; - break; - case "VISIBILITY_EXPORT": - case 2: - message.visibility = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto - * @static - * @param {google.protobuf.DescriptorProto} message DescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.field = []; - object.nestedType = []; - object.enumType = []; - object.extensionRange = []; - object.extension = []; - object.oneofDecl = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.field && message.field.length) { - object.field = []; - for (var j = 0; j < message.field.length; ++j) - object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); - } - if (message.nestedType && message.nestedType.length) { - object.nestedType = []; - for (var j = 0; j < message.nestedType.length; ++j) - object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); - } - if (message.enumType && message.enumType.length) { - object.enumType = []; - for (var j = 0; j < message.enumType.length; ++j) - object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); - } - if (message.extensionRange && message.extensionRange.length) { - object.extensionRange = []; - for (var j = 0; j < message.extensionRange.length; ++j) - object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); - } - if (message.extension && message.extension.length) { - object.extension = []; - for (var j = 0; j < message.extension.length; ++j) - object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); - if (message.oneofDecl && message.oneofDecl.length) { - object.oneofDecl = []; - for (var j = 0; j < message.oneofDecl.length; ++j) - object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); - } - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - if (message.visibility != null && message.hasOwnProperty("visibility")) - object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; - return object; - }; - - /** - * Converts this DescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto - * @instance - * @returns {Object.} JSON object - */ - DescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto"; - }; - - DescriptorProto.ExtensionRange = (function() { - - /** - * Properties of an ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @interface IExtensionRange - * @property {number|null} [start] ExtensionRange start - * @property {number|null} [end] ExtensionRange end - * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options - */ - - /** - * Constructs a new ExtensionRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents an ExtensionRange. - * @implements IExtensionRange - * @constructor - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - */ - function ExtensionRange(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]]; - } - - /** - * ExtensionRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.start = 0; - - /** - * ExtensionRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.end = 0; - - /** - * ExtensionRange options. - * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - */ - ExtensionRange.prototype.options = null; - - /** - * Creates a new ExtensionRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance - */ - ExtensionRange.create = function create(properties) { - return new ExtensionRange(properties); - }; - - /** - * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange - */ - ExtensionRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); - message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - object.options = null; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ExtensionRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @instance - * @returns {Object.} JSON object - */ - ExtensionRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ExtensionRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; - }; - - return ExtensionRange; - })(); - - DescriptorProto.ReservedRange = (function() { - - /** - * Properties of a ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @interface IReservedRange - * @property {number|null} [start] ReservedRange start - * @property {number|null} [end] ReservedRange end - */ - - /** - * Constructs a new ReservedRange. - * @memberof google.protobuf.DescriptorProto - * @classdesc Represents a ReservedRange. - * @implements IReservedRange - * @constructor - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - */ - function ReservedRange(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]]; - } - - /** - * ReservedRange start. - * @member {number} start - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.start = 0; - - /** - * ReservedRange end. - * @member {number} end - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - */ - ReservedRange.prototype.end = 0; - - /** - * Creates a new ReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance - */ - ReservedRange.create = function create(properties) { - return new ReservedRange(properties); - }; - - /** - * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReservedRange message. - * @function verify - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange - */ - ReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) - return object; - var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this ReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @instance - * @returns {Object.} JSON object - */ - ReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReservedRange - * @function getTypeUrl - * @memberof google.protobuf.DescriptorProto.ReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; - }; - - return ReservedRange; - })(); - - return DescriptorProto; - })(); - - protobuf.ExtensionRangeOptions = (function() { - - /** - * Properties of an ExtensionRangeOptions. - * @memberof google.protobuf - * @interface IExtensionRangeOptions - * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption - * @property {Array.|null} [declaration] ExtensionRangeOptions declaration - * @property {google.protobuf.IFeatureSet|null} [features] ExtensionRangeOptions features - * @property {google.protobuf.ExtensionRangeOptions.VerificationState|null} [verification] ExtensionRangeOptions verification - */ - - /** - * Constructs a new ExtensionRangeOptions. - * @memberof google.protobuf - * @classdesc Represents an ExtensionRangeOptions. - * @implements IExtensionRangeOptions - * @constructor - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - */ - function ExtensionRangeOptions(properties) { - this.uninterpretedOption = []; - this.declaration = []; - 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]]; - } - - /** - * ExtensionRangeOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ExtensionRangeOptions declaration. - * @member {Array.} declaration - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.declaration = $util.emptyArray; - - /** - * ExtensionRangeOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.features = null; - - /** - * ExtensionRangeOptions verification. - * @member {google.protobuf.ExtensionRangeOptions.VerificationState} verification - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - */ - ExtensionRangeOptions.prototype.verification = 1; - - /** - * Creates a new ExtensionRangeOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions instance - */ - ExtensionRangeOptions.create = function create(properties) { - return new ExtensionRangeOptions(properties); - }; - - /** - * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.declaration != null && message.declaration.length) - for (var i = 0; i < message.declaration.length; ++i) - $root.google.protobuf.ExtensionRangeOptions.Declaration.encode(message.declaration[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.verification != null && Object.hasOwnProperty.call(message, "verification")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.verification); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.IExtensionRangeOptions} message ExtensionRangeOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ExtensionRangeOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 2: { - if (!(message.declaration && message.declaration.length)) - message.declaration = []; - message.declaration.push($root.google.protobuf.ExtensionRangeOptions.Declaration.decode(reader, reader.uint32())); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.verification = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ExtensionRangeOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ExtensionRangeOptions message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ExtensionRangeOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message.declaration != null && message.hasOwnProperty("declaration")) { - if (!Array.isArray(message.declaration)) - return "declaration: array expected"; - for (var i = 0; i < message.declaration.length; ++i) { - var error = $root.google.protobuf.ExtensionRangeOptions.Declaration.verify(message.declaration[i]); - if (error) - return "declaration." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.verification != null && message.hasOwnProperty("verification")) - switch (message.verification) { - default: - return "verification: enum value expected"; - case 0: - case 1: - break; - } - return null; - }; - - /** - * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions} ExtensionRangeOptions - */ - ExtensionRangeOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions(); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object.declaration) { - if (!Array.isArray(object.declaration)) - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected"); - message.declaration = []; - for (var i = 0; i < object.declaration.length; ++i) { - if (typeof object.declaration[i] !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected"); - message.declaration[i] = $root.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(object.declaration[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - switch (object.verification) { - case "DECLARATION": - case 0: - message.verification = 0; - break; - default: - if (typeof object.verification === "number") { - message.verification = object.verification; - break; - } - break; - case "UNVERIFIED": - case 1: - message.verification = 1; - break; - } - return message; - }; - - /** - * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {google.protobuf.ExtensionRangeOptions} message ExtensionRangeOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ExtensionRangeOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.declaration = []; - object.uninterpretedOption = []; - } - if (options.defaults) { - object.verification = options.enums === String ? "UNVERIFIED" : 1; - object.features = null; - } - if (message.declaration && message.declaration.length) { - object.declaration = []; - for (var j = 0; j < message.declaration.length; ++j) - object.declaration[j] = $root.google.protobuf.ExtensionRangeOptions.Declaration.toObject(message.declaration[j], options); - } - if (message.verification != null && message.hasOwnProperty("verification")) - object.verification = options.enums === String ? $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] === undefined ? message.verification : $root.google.protobuf.ExtensionRangeOptions.VerificationState[message.verification] : message.verification; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this ExtensionRangeOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions - * @instance - * @returns {Object.} JSON object - */ - ExtensionRangeOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ExtensionRangeOptions - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ExtensionRangeOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions"; - }; - - ExtensionRangeOptions.Declaration = (function() { - - /** - * Properties of a Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @interface IDeclaration - * @property {number|null} [number] Declaration number - * @property {string|null} [fullName] Declaration fullName - * @property {string|null} [type] Declaration type - * @property {boolean|null} [reserved] Declaration reserved - * @property {boolean|null} [repeated] Declaration repeated - */ - - /** - * Constructs a new Declaration. - * @memberof google.protobuf.ExtensionRangeOptions - * @classdesc Represents a Declaration. - * @implements IDeclaration - * @constructor - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - */ - function Declaration(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]]; - } - - /** - * Declaration number. - * @member {number} number - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.number = 0; - - /** - * Declaration fullName. - * @member {string} fullName - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.fullName = ""; - - /** - * Declaration type. - * @member {string} type - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.type = ""; - - /** - * Declaration reserved. - * @member {boolean} reserved - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.reserved = false; - - /** - * Declaration repeated. - * @member {boolean} repeated - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - */ - Declaration.prototype.repeated = false; - - /** - * Creates a new Declaration instance using the specified properties. - * @function create - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration=} [properties] Properties to set - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration instance - */ - Declaration.create = function create(properties) { - return new Declaration(properties); - }; - - /** - * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.number); - if (message.fullName != null && Object.hasOwnProperty.call(message, "fullName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.fullName); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); - if (message.reserved != null && Object.hasOwnProperty.call(message, "reserved")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.reserved); - if (message.repeated != null && Object.hasOwnProperty.call(message, "repeated")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.repeated); - return writer; - }; - - /** - * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.IDeclaration} message Declaration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Declaration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Declaration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.number = reader.int32(); - break; - } - case 2: { - message.fullName = reader.string(); - break; - } - case 3: { - message.type = reader.string(); - break; - } - case 5: { - message.reserved = reader.bool(); - break; - } - case 6: { - message.repeated = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Declaration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Declaration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Declaration message. - * @function verify - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Declaration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.fullName != null && message.hasOwnProperty("fullName")) - if (!$util.isString(message.fullName)) - return "fullName: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.reserved != null && message.hasOwnProperty("reserved")) - if (typeof message.reserved !== "boolean") - return "reserved: boolean expected"; - if (message.repeated != null && message.hasOwnProperty("repeated")) - if (typeof message.repeated !== "boolean") - return "repeated: boolean expected"; - return null; - }; - - /** - * Creates a Declaration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ExtensionRangeOptions.Declaration} Declaration - */ - Declaration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ExtensionRangeOptions.Declaration) - return object; - var message = new $root.google.protobuf.ExtensionRangeOptions.Declaration(); - if (object.number != null) - message.number = object.number | 0; - if (object.fullName != null) - message.fullName = String(object.fullName); - if (object.type != null) - message.type = String(object.type); - if (object.reserved != null) - message.reserved = Boolean(object.reserved); - if (object.repeated != null) - message.repeated = Boolean(object.repeated); - return message; - }; - - /** - * Creates a plain object from a Declaration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {google.protobuf.ExtensionRangeOptions.Declaration} message Declaration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Declaration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.number = 0; - object.fullName = ""; - object.type = ""; - object.reserved = false; - object.repeated = false; - } - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.fullName != null && message.hasOwnProperty("fullName")) - object.fullName = message.fullName; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.reserved != null && message.hasOwnProperty("reserved")) - object.reserved = message.reserved; - if (message.repeated != null && message.hasOwnProperty("repeated")) - object.repeated = message.repeated; - return object; - }; - - /** - * Converts this Declaration to JSON. - * @function toJSON - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @instance - * @returns {Object.} JSON object - */ - Declaration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Declaration - * @function getTypeUrl - * @memberof google.protobuf.ExtensionRangeOptions.Declaration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Declaration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ExtensionRangeOptions.Declaration"; - }; - - return Declaration; - })(); - - /** - * VerificationState enum. - * @name google.protobuf.ExtensionRangeOptions.VerificationState - * @enum {number} - * @property {number} DECLARATION=0 DECLARATION value - * @property {number} UNVERIFIED=1 UNVERIFIED value - */ - ExtensionRangeOptions.VerificationState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DECLARATION"] = 0; - values[valuesById[1] = "UNVERIFIED"] = 1; - return values; - })(); - - return ExtensionRangeOptions; - })(); - - protobuf.FieldDescriptorProto = (function() { - - /** - * Properties of a FieldDescriptorProto. - * @memberof google.protobuf - * @interface IFieldDescriptorProto - * @property {string|null} [name] FieldDescriptorProto name - * @property {number|null} [number] FieldDescriptorProto number - * @property {google.protobuf.FieldDescriptorProto.Label|null} [label] FieldDescriptorProto label - * @property {google.protobuf.FieldDescriptorProto.Type|null} [type] FieldDescriptorProto type - * @property {string|null} [typeName] FieldDescriptorProto typeName - * @property {string|null} [extendee] FieldDescriptorProto extendee - * @property {string|null} [defaultValue] FieldDescriptorProto defaultValue - * @property {number|null} [oneofIndex] FieldDescriptorProto oneofIndex - * @property {string|null} [jsonName] FieldDescriptorProto jsonName - * @property {google.protobuf.IFieldOptions|null} [options] FieldDescriptorProto options - * @property {boolean|null} [proto3Optional] FieldDescriptorProto proto3Optional - */ - - /** - * Constructs a new FieldDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a FieldDescriptorProto. - * @implements IFieldDescriptorProto - * @constructor - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - */ - function FieldDescriptorProto(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]]; - } - - /** - * FieldDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.name = ""; - - /** - * FieldDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.number = 0; - - /** - * FieldDescriptorProto label. - * @member {google.protobuf.FieldDescriptorProto.Label} label - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.label = 1; - - /** - * FieldDescriptorProto type. - * @member {google.protobuf.FieldDescriptorProto.Type} type - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.type = 1; - - /** - * FieldDescriptorProto typeName. - * @member {string} typeName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.typeName = ""; - - /** - * FieldDescriptorProto extendee. - * @member {string} extendee - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.extendee = ""; - - /** - * FieldDescriptorProto defaultValue. - * @member {string} defaultValue - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.defaultValue = ""; - - /** - * FieldDescriptorProto oneofIndex. - * @member {number} oneofIndex - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.oneofIndex = 0; - - /** - * FieldDescriptorProto jsonName. - * @member {string} jsonName - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.jsonName = ""; - - /** - * FieldDescriptorProto options. - * @member {google.protobuf.IFieldOptions|null|undefined} options - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.options = null; - - /** - * FieldDescriptorProto proto3Optional. - * @member {boolean} proto3Optional - * @memberof google.protobuf.FieldDescriptorProto - * @instance - */ - FieldDescriptorProto.prototype.proto3Optional = false; - - /** - * Creates a new FieldDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto instance - */ - FieldDescriptorProto.create = function create(properties) { - return new FieldDescriptorProto(properties); - }; - - /** - * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.extendee != null && Object.hasOwnProperty.call(message, "extendee")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.extendee); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.number); - if (message.label != null && Object.hasOwnProperty.call(message, "label")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.label); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.type); - if (message.typeName != null && Object.hasOwnProperty.call(message, "typeName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.typeName); - if (message.defaultValue != null && Object.hasOwnProperty.call(message, "defaultValue")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.defaultValue); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.FieldOptions.encode(message.options, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.oneofIndex != null && Object.hasOwnProperty.call(message, "oneofIndex")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.oneofIndex); - if (message.jsonName != null && Object.hasOwnProperty.call(message, "jsonName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.jsonName); - if (message.proto3Optional != null && Object.hasOwnProperty.call(message, "proto3Optional")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.proto3Optional); - return writer; - }; - - /** - * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.IFieldDescriptorProto} message FieldDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 3: { - message.number = reader.int32(); - break; - } - case 4: { - message.label = reader.int32(); - break; - } - case 5: { - message.type = reader.int32(); - break; - } - case 6: { - message.typeName = reader.string(); - break; - } - case 2: { - message.extendee = reader.string(); - break; - } - case 7: { - message.defaultValue = reader.string(); - break; - } - case 9: { - message.oneofIndex = reader.int32(); - break; - } - case 10: { - message.jsonName = reader.string(); - break; - } - case 8: { - message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); - break; - } - case 17: { - message.proto3Optional = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldDescriptorProto message. - * @function verify - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.label != null && message.hasOwnProperty("label")) - switch (message.label) { - default: - return "label: enum value expected"; - case 1: - case 3: - case 2: - break; - } - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - case 10: - case 11: - case 12: - case 13: - case 14: - case 15: - case 16: - case 17: - case 18: - break; - } - if (message.typeName != null && message.hasOwnProperty("typeName")) - if (!$util.isString(message.typeName)) - return "typeName: string expected"; - if (message.extendee != null && message.hasOwnProperty("extendee")) - if (!$util.isString(message.extendee)) - return "extendee: string expected"; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - if (!$util.isString(message.defaultValue)) - return "defaultValue: string expected"; - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - if (!$util.isInteger(message.oneofIndex)) - return "oneofIndex: integer expected"; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - if (!$util.isString(message.jsonName)) - return "jsonName: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.FieldOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - if (typeof message.proto3Optional !== "boolean") - return "proto3Optional: boolean expected"; - return null; - }; - - /** - * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto - */ - FieldDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldDescriptorProto) - return object; - var message = new $root.google.protobuf.FieldDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - switch (object.label) { - default: - if (typeof object.label === "number") { - message.label = object.label; - break; - } - break; - case "LABEL_OPTIONAL": - case 1: - message.label = 1; - break; - case "LABEL_REPEATED": - case 3: - message.label = 3; - break; - case "LABEL_REQUIRED": - case 2: - message.label = 2; - break; - } - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_DOUBLE": - case 1: - message.type = 1; - break; - case "TYPE_FLOAT": - case 2: - message.type = 2; - break; - case "TYPE_INT64": - case 3: - message.type = 3; - break; - case "TYPE_UINT64": - case 4: - message.type = 4; - break; - case "TYPE_INT32": - case 5: - message.type = 5; - break; - case "TYPE_FIXED64": - case 6: - message.type = 6; - break; - case "TYPE_FIXED32": - case 7: - message.type = 7; - break; - case "TYPE_BOOL": - case 8: - message.type = 8; - break; - case "TYPE_STRING": - case 9: - message.type = 9; - break; - case "TYPE_GROUP": - case 10: - message.type = 10; - break; - case "TYPE_MESSAGE": - case 11: - message.type = 11; - break; - case "TYPE_BYTES": - case 12: - message.type = 12; - break; - case "TYPE_UINT32": - case 13: - message.type = 13; - break; - case "TYPE_ENUM": - case 14: - message.type = 14; - break; - case "TYPE_SFIXED32": - case 15: - message.type = 15; - break; - case "TYPE_SFIXED64": - case 16: - message.type = 16; - break; - case "TYPE_SINT32": - case 17: - message.type = 17; - break; - case "TYPE_SINT64": - case 18: - message.type = 18; - break; - } - if (object.typeName != null) - message.typeName = String(object.typeName); - if (object.extendee != null) - message.extendee = String(object.extendee); - if (object.defaultValue != null) - message.defaultValue = String(object.defaultValue); - if (object.oneofIndex != null) - message.oneofIndex = object.oneofIndex | 0; - if (object.jsonName != null) - message.jsonName = String(object.jsonName); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.FieldOptions.fromObject(object.options); - } - if (object.proto3Optional != null) - message.proto3Optional = Boolean(object.proto3Optional); - return message; - }; - - /** - * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {google.protobuf.FieldDescriptorProto} message FieldDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.extendee = ""; - object.number = 0; - object.label = options.enums === String ? "LABEL_OPTIONAL" : 1; - object.type = options.enums === String ? "TYPE_DOUBLE" : 1; - object.typeName = ""; - object.defaultValue = ""; - object.options = null; - object.oneofIndex = 0; - object.jsonName = ""; - object.proto3Optional = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.extendee != null && message.hasOwnProperty("extendee")) - object.extendee = message.extendee; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.label != null && message.hasOwnProperty("label")) - object.label = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Label[message.label] === undefined ? message.label : $root.google.protobuf.FieldDescriptorProto.Label[message.label] : message.label; - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.protobuf.FieldDescriptorProto.Type[message.type] === undefined ? message.type : $root.google.protobuf.FieldDescriptorProto.Type[message.type] : message.type; - if (message.typeName != null && message.hasOwnProperty("typeName")) - object.typeName = message.typeName; - if (message.defaultValue != null && message.hasOwnProperty("defaultValue")) - object.defaultValue = message.defaultValue; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.FieldOptions.toObject(message.options, options); - if (message.oneofIndex != null && message.hasOwnProperty("oneofIndex")) - object.oneofIndex = message.oneofIndex; - if (message.jsonName != null && message.hasOwnProperty("jsonName")) - object.jsonName = message.jsonName; - if (message.proto3Optional != null && message.hasOwnProperty("proto3Optional")) - object.proto3Optional = message.proto3Optional; - return object; - }; - - /** - * Converts this FieldDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.FieldDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - FieldDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.FieldDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldDescriptorProto"; - }; - - /** - * Type enum. - * @name google.protobuf.FieldDescriptorProto.Type - * @enum {number} - * @property {number} TYPE_DOUBLE=1 TYPE_DOUBLE value - * @property {number} TYPE_FLOAT=2 TYPE_FLOAT value - * @property {number} TYPE_INT64=3 TYPE_INT64 value - * @property {number} TYPE_UINT64=4 TYPE_UINT64 value - * @property {number} TYPE_INT32=5 TYPE_INT32 value - * @property {number} TYPE_FIXED64=6 TYPE_FIXED64 value - * @property {number} TYPE_FIXED32=7 TYPE_FIXED32 value - * @property {number} TYPE_BOOL=8 TYPE_BOOL value - * @property {number} TYPE_STRING=9 TYPE_STRING value - * @property {number} TYPE_GROUP=10 TYPE_GROUP value - * @property {number} TYPE_MESSAGE=11 TYPE_MESSAGE value - * @property {number} TYPE_BYTES=12 TYPE_BYTES value - * @property {number} TYPE_UINT32=13 TYPE_UINT32 value - * @property {number} TYPE_ENUM=14 TYPE_ENUM value - * @property {number} TYPE_SFIXED32=15 TYPE_SFIXED32 value - * @property {number} TYPE_SFIXED64=16 TYPE_SFIXED64 value - * @property {number} TYPE_SINT32=17 TYPE_SINT32 value - * @property {number} TYPE_SINT64=18 TYPE_SINT64 value - */ - FieldDescriptorProto.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "TYPE_DOUBLE"] = 1; - values[valuesById[2] = "TYPE_FLOAT"] = 2; - values[valuesById[3] = "TYPE_INT64"] = 3; - values[valuesById[4] = "TYPE_UINT64"] = 4; - values[valuesById[5] = "TYPE_INT32"] = 5; - values[valuesById[6] = "TYPE_FIXED64"] = 6; - values[valuesById[7] = "TYPE_FIXED32"] = 7; - values[valuesById[8] = "TYPE_BOOL"] = 8; - values[valuesById[9] = "TYPE_STRING"] = 9; - values[valuesById[10] = "TYPE_GROUP"] = 10; - values[valuesById[11] = "TYPE_MESSAGE"] = 11; - values[valuesById[12] = "TYPE_BYTES"] = 12; - values[valuesById[13] = "TYPE_UINT32"] = 13; - values[valuesById[14] = "TYPE_ENUM"] = 14; - values[valuesById[15] = "TYPE_SFIXED32"] = 15; - values[valuesById[16] = "TYPE_SFIXED64"] = 16; - values[valuesById[17] = "TYPE_SINT32"] = 17; - values[valuesById[18] = "TYPE_SINT64"] = 18; - return values; - })(); - - /** - * Label enum. - * @name google.protobuf.FieldDescriptorProto.Label - * @enum {number} - * @property {number} LABEL_OPTIONAL=1 LABEL_OPTIONAL value - * @property {number} LABEL_REPEATED=3 LABEL_REPEATED value - * @property {number} LABEL_REQUIRED=2 LABEL_REQUIRED value - */ - FieldDescriptorProto.Label = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "LABEL_OPTIONAL"] = 1; - values[valuesById[3] = "LABEL_REPEATED"] = 3; - values[valuesById[2] = "LABEL_REQUIRED"] = 2; - return values; - })(); - - return FieldDescriptorProto; - })(); - - protobuf.OneofDescriptorProto = (function() { - - /** - * Properties of an OneofDescriptorProto. - * @memberof google.protobuf - * @interface IOneofDescriptorProto - * @property {string|null} [name] OneofDescriptorProto name - * @property {google.protobuf.IOneofOptions|null} [options] OneofDescriptorProto options - */ - - /** - * Constructs a new OneofDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an OneofDescriptorProto. - * @implements IOneofDescriptorProto - * @constructor - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - */ - function OneofDescriptorProto(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]]; - } - - /** - * OneofDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.name = ""; - - /** - * OneofDescriptorProto options. - * @member {google.protobuf.IOneofOptions|null|undefined} options - * @memberof google.protobuf.OneofDescriptorProto - * @instance - */ - OneofDescriptorProto.prototype.options = null; - - /** - * Creates a new OneofDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto instance - */ - OneofDescriptorProto.create = function create(properties) { - return new OneofDescriptorProto(properties); - }; - - /** - * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.OneofOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.IOneofDescriptorProto} message OneofDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofDescriptorProto message. - * @function verify - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.OneofOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto - */ - OneofDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofDescriptorProto) - return object; - var message = new $root.google.protobuf.OneofDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this OneofDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.OneofDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - OneofDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.OneofDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; - }; - - return OneofDescriptorProto; - })(); - - protobuf.EnumDescriptorProto = (function() { - - /** - * Properties of an EnumDescriptorProto. - * @memberof google.protobuf - * @interface IEnumDescriptorProto - * @property {string|null} [name] EnumDescriptorProto name - * @property {Array.|null} [value] EnumDescriptorProto value - * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options - * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange - * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName - * @property {google.protobuf.SymbolVisibility|null} [visibility] EnumDescriptorProto visibility - */ - - /** - * Constructs a new EnumDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumDescriptorProto. - * @implements IEnumDescriptorProto - * @constructor - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - */ - function EnumDescriptorProto(properties) { - this.value = []; - this.reservedRange = []; - this.reservedName = []; - 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]]; - } - - /** - * EnumDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.name = ""; - - /** - * EnumDescriptorProto value. - * @member {Array.} value - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.value = $util.emptyArray; - - /** - * EnumDescriptorProto options. - * @member {google.protobuf.IEnumOptions|null|undefined} options - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.options = null; - - /** - * EnumDescriptorProto reservedRange. - * @member {Array.} reservedRange - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; - - /** - * EnumDescriptorProto reservedName. - * @member {Array.} reservedName - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.reservedName = $util.emptyArray; - - /** - * EnumDescriptorProto visibility. - * @member {google.protobuf.SymbolVisibility} visibility - * @memberof google.protobuf.EnumDescriptorProto - * @instance - */ - EnumDescriptorProto.prototype.visibility = 0; - - /** - * Creates a new EnumDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance - */ - EnumDescriptorProto.create = function create(properties) { - return new EnumDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.value != null && message.value.length) - for (var i = 0; i < message.value.length; ++i) - $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.reservedRange != null && message.reservedRange.length) - for (var i = 0; i < message.reservedRange.length; ++i) - $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.reservedName != null && message.reservedName.length) - for (var i = 0; i < message.reservedName.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); - if (message.visibility != null && Object.hasOwnProperty.call(message, "visibility")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.visibility); - return writer; - }; - - /** - * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.value && message.value.length)) - message.value = []; - message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.reservedRange && message.reservedRange.length)) - message.reservedRange = []; - message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); - break; - } - case 5: { - if (!(message.reservedName && message.reservedName.length)) - message.reservedName = []; - message.reservedName.push(reader.string()); - break; - } - case 6: { - message.visibility = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.value != null && message.hasOwnProperty("value")) { - if (!Array.isArray(message.value)) - return "value: array expected"; - for (var i = 0; i < message.value.length; ++i) { - var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); - if (error) - return "value." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { - if (!Array.isArray(message.reservedRange)) - return "reservedRange: array expected"; - for (var i = 0; i < message.reservedRange.length; ++i) { - var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); - if (error) - return "reservedRange." + error; - } - } - if (message.reservedName != null && message.hasOwnProperty("reservedName")) { - if (!Array.isArray(message.reservedName)) - return "reservedName: array expected"; - for (var i = 0; i < message.reservedName.length; ++i) - if (!$util.isString(message.reservedName[i])) - return "reservedName: string[] expected"; - } - if (message.visibility != null && message.hasOwnProperty("visibility")) - switch (message.visibility) { - default: - return "visibility: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto - */ - EnumDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.value) { - if (!Array.isArray(object.value)) - throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); - message.value = []; - for (var i = 0; i < object.value.length; ++i) { - if (typeof object.value[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); - message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); - } - if (object.reservedRange) { - if (!Array.isArray(object.reservedRange)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); - message.reservedRange = []; - for (var i = 0; i < object.reservedRange.length; ++i) { - if (typeof object.reservedRange[i] !== "object") - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); - message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); - } - } - if (object.reservedName) { - if (!Array.isArray(object.reservedName)) - throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); - message.reservedName = []; - for (var i = 0; i < object.reservedName.length; ++i) - message.reservedName[i] = String(object.reservedName[i]); - } - switch (object.visibility) { - default: - if (typeof object.visibility === "number") { - message.visibility = object.visibility; - break; - } - break; - case "VISIBILITY_UNSET": - case 0: - message.visibility = 0; - break; - case "VISIBILITY_LOCAL": - case 1: - message.visibility = 1; - break; - case "VISIBILITY_EXPORT": - case 2: - message.visibility = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.value = []; - object.reservedRange = []; - object.reservedName = []; - } - if (options.defaults) { - object.name = ""; - object.options = null; - object.visibility = options.enums === String ? "VISIBILITY_UNSET" : 0; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value && message.value.length) { - object.value = []; - for (var j = 0; j < message.value.length; ++j) - object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); - if (message.reservedRange && message.reservedRange.length) { - object.reservedRange = []; - for (var j = 0; j < message.reservedRange.length; ++j) - object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); - } - if (message.reservedName && message.reservedName.length) { - object.reservedName = []; - for (var j = 0; j < message.reservedName.length; ++j) - object.reservedName[j] = message.reservedName[j]; - } - if (message.visibility != null && message.hasOwnProperty("visibility")) - object.visibility = options.enums === String ? $root.google.protobuf.SymbolVisibility[message.visibility] === undefined ? message.visibility : $root.google.protobuf.SymbolVisibility[message.visibility] : message.visibility; - return object; - }; - - /** - * Converts this EnumDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; - }; - - EnumDescriptorProto.EnumReservedRange = (function() { - - /** - * Properties of an EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @interface IEnumReservedRange - * @property {number|null} [start] EnumReservedRange start - * @property {number|null} [end] EnumReservedRange end - */ - - /** - * Constructs a new EnumReservedRange. - * @memberof google.protobuf.EnumDescriptorProto - * @classdesc Represents an EnumReservedRange. - * @implements IEnumReservedRange - * @constructor - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - */ - function EnumReservedRange(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]]; - } - - /** - * EnumReservedRange start. - * @member {number} start - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.start = 0; - - /** - * EnumReservedRange end. - * @member {number} end - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - */ - EnumReservedRange.prototype.end = 0; - - /** - * Creates a new EnumReservedRange instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance - */ - EnumReservedRange.create = function create(properties) { - return new EnumReservedRange(properties); - }; - - /** - * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.start != null && Object.hasOwnProperty.call(message, "start")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); - return writer; - }; - - /** - * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.start = reader.int32(); - break; - } - case 2: { - message.end = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumReservedRange message. - * @function verify - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumReservedRange.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.start != null && message.hasOwnProperty("start")) - if (!$util.isInteger(message.start)) - return "start: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - return null; - }; - - /** - * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange - */ - EnumReservedRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) - return object; - var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); - if (object.start != null) - message.start = object.start | 0; - if (object.end != null) - message.end = object.end | 0; - return message; - }; - - /** - * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumReservedRange.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.start = 0; - object.end = 0; - } - if (message.start != null && message.hasOwnProperty("start")) - object.start = message.start; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - return object; - }; - - /** - * Converts this EnumReservedRange to JSON. - * @function toJSON - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @instance - * @returns {Object.} JSON object - */ - EnumReservedRange.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumReservedRange - * @function getTypeUrl - * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; - }; - - return EnumReservedRange; - })(); - - return EnumDescriptorProto; - })(); - - protobuf.EnumValueDescriptorProto = (function() { - - /** - * Properties of an EnumValueDescriptorProto. - * @memberof google.protobuf - * @interface IEnumValueDescriptorProto - * @property {string|null} [name] EnumValueDescriptorProto name - * @property {number|null} [number] EnumValueDescriptorProto number - * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options - */ - - /** - * Constructs a new EnumValueDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents an EnumValueDescriptorProto. - * @implements IEnumValueDescriptorProto - * @constructor - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - */ - function EnumValueDescriptorProto(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]]; - } - - /** - * EnumValueDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.name = ""; - - /** - * EnumValueDescriptorProto number. - * @member {number} number - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.number = 0; - - /** - * EnumValueDescriptorProto options. - * @member {google.protobuf.IEnumValueOptions|null|undefined} options - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - */ - EnumValueDescriptorProto.prototype.options = null; - - /** - * Creates a new EnumValueDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance - */ - EnumValueDescriptorProto.create = function create(properties) { - return new EnumValueDescriptorProto(properties); - }; - - /** - * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.number != null && Object.hasOwnProperty.call(message, "number")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.number = reader.int32(); - break; - } - case 3: { - message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueDescriptorProto message. - * @function verify - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.number != null && message.hasOwnProperty("number")) - if (!$util.isInteger(message.number)) - return "number: integer expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.EnumValueOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto - */ - EnumValueDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) - return object; - var message = new $root.google.protobuf.EnumValueDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.number != null) - message.number = object.number | 0; - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.number = 0; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.number != null && message.hasOwnProperty("number")) - object.number = message.number; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this EnumValueDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - EnumValueDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.EnumValueDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; - }; - - return EnumValueDescriptorProto; - })(); - - protobuf.ServiceDescriptorProto = (function() { - - /** - * Properties of a ServiceDescriptorProto. - * @memberof google.protobuf - * @interface IServiceDescriptorProto - * @property {string|null} [name] ServiceDescriptorProto name - * @property {Array.|null} [method] ServiceDescriptorProto method - * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options - */ - - /** - * Constructs a new ServiceDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a ServiceDescriptorProto. - * @implements IServiceDescriptorProto - * @constructor - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - */ - function ServiceDescriptorProto(properties) { - this.method = []; - 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]]; - } - - /** - * ServiceDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.name = ""; - - /** - * ServiceDescriptorProto method. - * @member {Array.} method - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.method = $util.emptyArray; - - /** - * ServiceDescriptorProto options. - * @member {google.protobuf.IServiceOptions|null|undefined} options - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - */ - ServiceDescriptorProto.prototype.options = null; - - /** - * Creates a new ServiceDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance - */ - ServiceDescriptorProto.create = function create(properties) { - return new ServiceDescriptorProto(properties); - }; - - /** - * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.method != null && message.method.length) - for (var i = 0; i < message.method.length; ++i) - $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - if (!(message.method && message.method.length)) - message.method = []; - message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); - break; - } - case 3: { - message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceDescriptorProto message. - * @function verify - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.method != null && message.hasOwnProperty("method")) { - if (!Array.isArray(message.method)) - return "method: array expected"; - for (var i = 0; i < message.method.length; ++i) { - var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); - if (error) - return "method." + error; - } - } - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.ServiceOptions.verify(message.options); - if (error) - return "options." + error; - } - return null; - }; - - /** - * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto - */ - ServiceDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceDescriptorProto) - return object; - var message = new $root.google.protobuf.ServiceDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.method) { - if (!Array.isArray(object.method)) - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); - message.method = []; - for (var i = 0; i < object.method.length; ++i) { - if (typeof object.method[i] !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); - message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); - } - } - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); - } - return message; - }; - - /** - * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.method = []; - if (options.defaults) { - object.name = ""; - object.options = null; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.method && message.method.length) { - object.method = []; - for (var j = 0; j < message.method.length; ++j) - object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); - } - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); - return object; - }; - - /** - * Converts this ServiceDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - ServiceDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.ServiceDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; - }; - - return ServiceDescriptorProto; - })(); - - protobuf.MethodDescriptorProto = (function() { - - /** - * Properties of a MethodDescriptorProto. - * @memberof google.protobuf - * @interface IMethodDescriptorProto - * @property {string|null} [name] MethodDescriptorProto name - * @property {string|null} [inputType] MethodDescriptorProto inputType - * @property {string|null} [outputType] MethodDescriptorProto outputType - * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options - * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming - * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming - */ - - /** - * Constructs a new MethodDescriptorProto. - * @memberof google.protobuf - * @classdesc Represents a MethodDescriptorProto. - * @implements IMethodDescriptorProto - * @constructor - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - */ - function MethodDescriptorProto(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]]; - } - - /** - * MethodDescriptorProto name. - * @member {string} name - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.name = ""; - - /** - * MethodDescriptorProto inputType. - * @member {string} inputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.inputType = ""; - - /** - * MethodDescriptorProto outputType. - * @member {string} outputType - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.outputType = ""; - - /** - * MethodDescriptorProto options. - * @member {google.protobuf.IMethodOptions|null|undefined} options - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.options = null; - - /** - * MethodDescriptorProto clientStreaming. - * @member {boolean} clientStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.clientStreaming = false; - - /** - * MethodDescriptorProto serverStreaming. - * @member {boolean} serverStreaming - * @memberof google.protobuf.MethodDescriptorProto - * @instance - */ - MethodDescriptorProto.prototype.serverStreaming = false; - - /** - * Creates a new MethodDescriptorProto instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance - */ - MethodDescriptorProto.create = function create(properties) { - return new MethodDescriptorProto(properties); - }; - - /** - * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); - if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); - if (message.options != null && Object.hasOwnProperty.call(message, "options")) - $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); - if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); - return writer; - }; - - /** - * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 2: { - message.inputType = reader.string(); - break; - } - case 3: { - message.outputType = reader.string(); - break; - } - case 4: { - message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); - break; - } - case 5: { - message.clientStreaming = reader.bool(); - break; - } - case 6: { - message.serverStreaming = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodDescriptorProto message. - * @function verify - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodDescriptorProto.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.inputType != null && message.hasOwnProperty("inputType")) - if (!$util.isString(message.inputType)) - return "inputType: string expected"; - if (message.outputType != null && message.hasOwnProperty("outputType")) - if (!$util.isString(message.outputType)) - return "outputType: string expected"; - if (message.options != null && message.hasOwnProperty("options")) { - var error = $root.google.protobuf.MethodOptions.verify(message.options); - if (error) - return "options." + error; - } - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - if (typeof message.clientStreaming !== "boolean") - return "clientStreaming: boolean expected"; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - if (typeof message.serverStreaming !== "boolean") - return "serverStreaming: boolean expected"; - return null; - }; - - /** - * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto - */ - MethodDescriptorProto.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodDescriptorProto) - return object; - var message = new $root.google.protobuf.MethodDescriptorProto(); - if (object.name != null) - message.name = String(object.name); - if (object.inputType != null) - message.inputType = String(object.inputType); - if (object.outputType != null) - message.outputType = String(object.outputType); - if (object.options != null) { - if (typeof object.options !== "object") - throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); - message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); - } - if (object.clientStreaming != null) - message.clientStreaming = Boolean(object.clientStreaming); - if (object.serverStreaming != null) - message.serverStreaming = Boolean(object.serverStreaming); - return message; - }; - - /** - * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodDescriptorProto.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.name = ""; - object.inputType = ""; - object.outputType = ""; - object.options = null; - object.clientStreaming = false; - object.serverStreaming = false; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.inputType != null && message.hasOwnProperty("inputType")) - object.inputType = message.inputType; - if (message.outputType != null && message.hasOwnProperty("outputType")) - object.outputType = message.outputType; - if (message.options != null && message.hasOwnProperty("options")) - object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); - if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) - object.clientStreaming = message.clientStreaming; - if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) - object.serverStreaming = message.serverStreaming; - return object; - }; - - /** - * Converts this MethodDescriptorProto to JSON. - * @function toJSON - * @memberof google.protobuf.MethodDescriptorProto - * @instance - * @returns {Object.} JSON object - */ - MethodDescriptorProto.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodDescriptorProto - * @function getTypeUrl - * @memberof google.protobuf.MethodDescriptorProto - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; - }; - - return MethodDescriptorProto; - })(); - - protobuf.FileOptions = (function() { - - /** - * Properties of a FileOptions. - * @memberof google.protobuf - * @interface IFileOptions - * @property {string|null} [javaPackage] FileOptions javaPackage - * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname - * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles - * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash - * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 - * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor - * @property {string|null} [goPackage] FileOptions goPackage - * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices - * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices - * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices - * @property {boolean|null} [deprecated] FileOptions deprecated - * @property {boolean|null} [ccEnableArenas] FileOptions ccEnableArenas - * @property {string|null} [objcClassPrefix] FileOptions objcClassPrefix - * @property {string|null} [csharpNamespace] FileOptions csharpNamespace - * @property {string|null} [swiftPrefix] FileOptions swiftPrefix - * @property {string|null} [phpClassPrefix] FileOptions phpClassPrefix - * @property {string|null} [phpNamespace] FileOptions phpNamespace - * @property {string|null} [phpMetadataNamespace] FileOptions phpMetadataNamespace - * @property {string|null} [rubyPackage] FileOptions rubyPackage - * @property {google.protobuf.IFeatureSet|null} [features] FileOptions features - * @property {Array.|null} [uninterpretedOption] FileOptions uninterpretedOption - * @property {Array.|null} [".google.api.resourceDefinition"] FileOptions .google.api.resourceDefinition - */ - - /** - * Constructs a new FileOptions. - * @memberof google.protobuf - * @classdesc Represents a FileOptions. - * @implements IFileOptions - * @constructor - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - */ - function FileOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.resourceDefinition"] = []; - 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]]; - } - - /** - * FileOptions javaPackage. - * @member {string} javaPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaPackage = ""; - - /** - * FileOptions javaOuterClassname. - * @member {string} javaOuterClassname - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaOuterClassname = ""; - - /** - * FileOptions javaMultipleFiles. - * @member {boolean} javaMultipleFiles - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaMultipleFiles = false; - - /** - * FileOptions javaGenerateEqualsAndHash. - * @member {boolean} javaGenerateEqualsAndHash - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenerateEqualsAndHash = false; - - /** - * FileOptions javaStringCheckUtf8. - * @member {boolean} javaStringCheckUtf8 - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaStringCheckUtf8 = false; - - /** - * FileOptions optimizeFor. - * @member {google.protobuf.FileOptions.OptimizeMode} optimizeFor - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.optimizeFor = 1; - - /** - * FileOptions goPackage. - * @member {string} goPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.goPackage = ""; - - /** - * FileOptions ccGenericServices. - * @member {boolean} ccGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccGenericServices = false; - - /** - * FileOptions javaGenericServices. - * @member {boolean} javaGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.javaGenericServices = false; - - /** - * FileOptions pyGenericServices. - * @member {boolean} pyGenericServices - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.pyGenericServices = false; - - /** - * FileOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.deprecated = false; - - /** - * FileOptions ccEnableArenas. - * @member {boolean} ccEnableArenas - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.ccEnableArenas = true; - - /** - * FileOptions objcClassPrefix. - * @member {string} objcClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.objcClassPrefix = ""; - - /** - * FileOptions csharpNamespace. - * @member {string} csharpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.csharpNamespace = ""; - - /** - * FileOptions swiftPrefix. - * @member {string} swiftPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.swiftPrefix = ""; - - /** - * FileOptions phpClassPrefix. - * @member {string} phpClassPrefix - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpClassPrefix = ""; - - /** - * FileOptions phpNamespace. - * @member {string} phpNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpNamespace = ""; - - /** - * FileOptions phpMetadataNamespace. - * @member {string} phpMetadataNamespace - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.phpMetadataNamespace = ""; - - /** - * FileOptions rubyPackage. - * @member {string} rubyPackage - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.rubyPackage = ""; - - /** - * FileOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.features = null; - - /** - * FileOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FileOptions .google.api.resourceDefinition. - * @member {Array.} .google.api.resourceDefinition - * @memberof google.protobuf.FileOptions - * @instance - */ - FileOptions.prototype[".google.api.resourceDefinition"] = $util.emptyArray; - - /** - * Creates a new FileOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions=} [properties] Properties to set - * @returns {google.protobuf.FileOptions} FileOptions instance - */ - FileOptions.create = function create(properties) { - return new FileOptions(properties); - }; - - /** - * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.javaPackage != null && Object.hasOwnProperty.call(message, "javaPackage")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.javaPackage); - if (message.javaOuterClassname != null && Object.hasOwnProperty.call(message, "javaOuterClassname")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.javaOuterClassname); - if (message.optimizeFor != null && Object.hasOwnProperty.call(message, "optimizeFor")) - writer.uint32(/* id 9, wireType 0 =*/72).int32(message.optimizeFor); - if (message.javaMultipleFiles != null && Object.hasOwnProperty.call(message, "javaMultipleFiles")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.javaMultipleFiles); - if (message.goPackage != null && Object.hasOwnProperty.call(message, "goPackage")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.goPackage); - if (message.ccGenericServices != null && Object.hasOwnProperty.call(message, "ccGenericServices")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.ccGenericServices); - if (message.javaGenericServices != null && Object.hasOwnProperty.call(message, "javaGenericServices")) - writer.uint32(/* id 17, wireType 0 =*/136).bool(message.javaGenericServices); - if (message.pyGenericServices != null && Object.hasOwnProperty.call(message, "pyGenericServices")) - writer.uint32(/* id 18, wireType 0 =*/144).bool(message.pyGenericServices); - if (message.javaGenerateEqualsAndHash != null && Object.hasOwnProperty.call(message, "javaGenerateEqualsAndHash")) - writer.uint32(/* id 20, wireType 0 =*/160).bool(message.javaGenerateEqualsAndHash); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 23, wireType 0 =*/184).bool(message.deprecated); - if (message.javaStringCheckUtf8 != null && Object.hasOwnProperty.call(message, "javaStringCheckUtf8")) - writer.uint32(/* id 27, wireType 0 =*/216).bool(message.javaStringCheckUtf8); - if (message.ccEnableArenas != null && Object.hasOwnProperty.call(message, "ccEnableArenas")) - writer.uint32(/* id 31, wireType 0 =*/248).bool(message.ccEnableArenas); - if (message.objcClassPrefix != null && Object.hasOwnProperty.call(message, "objcClassPrefix")) - writer.uint32(/* id 36, wireType 2 =*/290).string(message.objcClassPrefix); - if (message.csharpNamespace != null && Object.hasOwnProperty.call(message, "csharpNamespace")) - writer.uint32(/* id 37, wireType 2 =*/298).string(message.csharpNamespace); - if (message.swiftPrefix != null && Object.hasOwnProperty.call(message, "swiftPrefix")) - writer.uint32(/* id 39, wireType 2 =*/314).string(message.swiftPrefix); - if (message.phpClassPrefix != null && Object.hasOwnProperty.call(message, "phpClassPrefix")) - writer.uint32(/* id 40, wireType 2 =*/322).string(message.phpClassPrefix); - if (message.phpNamespace != null && Object.hasOwnProperty.call(message, "phpNamespace")) - writer.uint32(/* id 41, wireType 2 =*/330).string(message.phpNamespace); - if (message.phpMetadataNamespace != null && Object.hasOwnProperty.call(message, "phpMetadataNamespace")) - writer.uint32(/* id 44, wireType 2 =*/354).string(message.phpMetadataNamespace); - if (message.rubyPackage != null && Object.hasOwnProperty.call(message, "rubyPackage")) - writer.uint32(/* id 45, wireType 2 =*/362).string(message.rubyPackage); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resourceDefinition"] != null && message[".google.api.resourceDefinition"].length) - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resourceDefinition"][i], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.IFileOptions} message FileOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FileOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.javaPackage = reader.string(); - break; - } - case 8: { - message.javaOuterClassname = reader.string(); - break; - } - case 10: { - message.javaMultipleFiles = reader.bool(); - break; - } - case 20: { - message.javaGenerateEqualsAndHash = reader.bool(); - break; - } - case 27: { - message.javaStringCheckUtf8 = reader.bool(); - break; - } - case 9: { - message.optimizeFor = reader.int32(); - break; - } - case 11: { - message.goPackage = reader.string(); - break; - } - case 16: { - message.ccGenericServices = reader.bool(); - break; - } - case 17: { - message.javaGenericServices = reader.bool(); - break; - } - case 18: { - message.pyGenericServices = reader.bool(); - break; - } - case 23: { - message.deprecated = reader.bool(); - break; - } - case 31: { - message.ccEnableArenas = reader.bool(); - break; - } - case 36: { - message.objcClassPrefix = reader.string(); - break; - } - case 37: { - message.csharpNamespace = reader.string(); - break; - } - case 39: { - message.swiftPrefix = reader.string(); - break; - } - case 40: { - message.phpClassPrefix = reader.string(); - break; - } - case 41: { - message.phpNamespace = reader.string(); - break; - } - case 44: { - message.phpMetadataNamespace = reader.string(); - break; - } - case 45: { - message.rubyPackage = reader.string(); - break; - } - case 50: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - if (!(message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length)) - message[".google.api.resourceDefinition"] = []; - message[".google.api.resourceDefinition"].push($root.google.api.ResourceDescriptor.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FileOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FileOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FileOptions} FileOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FileOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FileOptions message. - * @function verify - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FileOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - if (!$util.isString(message.javaPackage)) - return "javaPackage: string expected"; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - if (!$util.isString(message.javaOuterClassname)) - return "javaOuterClassname: string expected"; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - if (typeof message.javaMultipleFiles !== "boolean") - return "javaMultipleFiles: boolean expected"; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - if (typeof message.javaGenerateEqualsAndHash !== "boolean") - return "javaGenerateEqualsAndHash: boolean expected"; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - if (typeof message.javaStringCheckUtf8 !== "boolean") - return "javaStringCheckUtf8: boolean expected"; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - switch (message.optimizeFor) { - default: - return "optimizeFor: enum value expected"; - case 1: - case 2: - case 3: - break; - } - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - if (!$util.isString(message.goPackage)) - return "goPackage: string expected"; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - if (typeof message.ccGenericServices !== "boolean") - return "ccGenericServices: boolean expected"; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - if (typeof message.javaGenericServices !== "boolean") - return "javaGenericServices: boolean expected"; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - if (typeof message.pyGenericServices !== "boolean") - return "pyGenericServices: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - if (typeof message.ccEnableArenas !== "boolean") - return "ccEnableArenas: boolean expected"; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - if (!$util.isString(message.objcClassPrefix)) - return "objcClassPrefix: string expected"; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - if (!$util.isString(message.csharpNamespace)) - return "csharpNamespace: string expected"; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - if (!$util.isString(message.swiftPrefix)) - return "swiftPrefix: string expected"; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - if (!$util.isString(message.phpClassPrefix)) - return "phpClassPrefix: string expected"; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - if (!$util.isString(message.phpNamespace)) - return "phpNamespace: string expected"; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - if (!$util.isString(message.phpMetadataNamespace)) - return "phpMetadataNamespace: string expected"; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - if (!$util.isString(message.rubyPackage)) - return "rubyPackage: string expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resourceDefinition"] != null && message.hasOwnProperty(".google.api.resourceDefinition")) { - if (!Array.isArray(message[".google.api.resourceDefinition"])) - return ".google.api.resourceDefinition: array expected"; - for (var i = 0; i < message[".google.api.resourceDefinition"].length; ++i) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resourceDefinition"][i]); - if (error) - return ".google.api.resourceDefinition." + error; - } - } - return null; - }; - - /** - * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FileOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FileOptions} FileOptions - */ - FileOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FileOptions) - return object; - var message = new $root.google.protobuf.FileOptions(); - if (object.javaPackage != null) - message.javaPackage = String(object.javaPackage); - if (object.javaOuterClassname != null) - message.javaOuterClassname = String(object.javaOuterClassname); - if (object.javaMultipleFiles != null) - message.javaMultipleFiles = Boolean(object.javaMultipleFiles); - if (object.javaGenerateEqualsAndHash != null) - message.javaGenerateEqualsAndHash = Boolean(object.javaGenerateEqualsAndHash); - if (object.javaStringCheckUtf8 != null) - message.javaStringCheckUtf8 = Boolean(object.javaStringCheckUtf8); - switch (object.optimizeFor) { - default: - if (typeof object.optimizeFor === "number") { - message.optimizeFor = object.optimizeFor; - break; - } - break; - case "SPEED": - case 1: - message.optimizeFor = 1; - break; - case "CODE_SIZE": - case 2: - message.optimizeFor = 2; - break; - case "LITE_RUNTIME": - case 3: - message.optimizeFor = 3; - break; - } - if (object.goPackage != null) - message.goPackage = String(object.goPackage); - if (object.ccGenericServices != null) - message.ccGenericServices = Boolean(object.ccGenericServices); - if (object.javaGenericServices != null) - message.javaGenericServices = Boolean(object.javaGenericServices); - if (object.pyGenericServices != null) - message.pyGenericServices = Boolean(object.pyGenericServices); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.ccEnableArenas != null) - message.ccEnableArenas = Boolean(object.ccEnableArenas); - if (object.objcClassPrefix != null) - message.objcClassPrefix = String(object.objcClassPrefix); - if (object.csharpNamespace != null) - message.csharpNamespace = String(object.csharpNamespace); - if (object.swiftPrefix != null) - message.swiftPrefix = String(object.swiftPrefix); - if (object.phpClassPrefix != null) - message.phpClassPrefix = String(object.phpClassPrefix); - if (object.phpNamespace != null) - message.phpNamespace = String(object.phpNamespace); - if (object.phpMetadataNamespace != null) - message.phpMetadataNamespace = String(object.phpMetadataNamespace); - if (object.rubyPackage != null) - message.rubyPackage = String(object.rubyPackage); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FileOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resourceDefinition"]) { - if (!Array.isArray(object[".google.api.resourceDefinition"])) - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected"); - message[".google.api.resourceDefinition"] = []; - for (var i = 0; i < object[".google.api.resourceDefinition"].length; ++i) { - if (typeof object[".google.api.resourceDefinition"][i] !== "object") - throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected"); - message[".google.api.resourceDefinition"][i] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resourceDefinition"][i]); - } - } - return message; - }; - - /** - * Creates a plain object from a FileOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FileOptions - * @static - * @param {google.protobuf.FileOptions} message FileOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FileOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.resourceDefinition"] = []; - } - if (options.defaults) { - object.javaPackage = ""; - object.javaOuterClassname = ""; - object.optimizeFor = options.enums === String ? "SPEED" : 1; - object.javaMultipleFiles = false; - object.goPackage = ""; - object.ccGenericServices = false; - object.javaGenericServices = false; - object.pyGenericServices = false; - object.javaGenerateEqualsAndHash = false; - object.deprecated = false; - object.javaStringCheckUtf8 = false; - object.ccEnableArenas = true; - object.objcClassPrefix = ""; - object.csharpNamespace = ""; - object.swiftPrefix = ""; - object.phpClassPrefix = ""; - object.phpNamespace = ""; - object.phpMetadataNamespace = ""; - object.rubyPackage = ""; - object.features = null; - } - if (message.javaPackage != null && message.hasOwnProperty("javaPackage")) - object.javaPackage = message.javaPackage; - if (message.javaOuterClassname != null && message.hasOwnProperty("javaOuterClassname")) - object.javaOuterClassname = message.javaOuterClassname; - if (message.optimizeFor != null && message.hasOwnProperty("optimizeFor")) - object.optimizeFor = options.enums === String ? $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] === undefined ? message.optimizeFor : $root.google.protobuf.FileOptions.OptimizeMode[message.optimizeFor] : message.optimizeFor; - if (message.javaMultipleFiles != null && message.hasOwnProperty("javaMultipleFiles")) - object.javaMultipleFiles = message.javaMultipleFiles; - if (message.goPackage != null && message.hasOwnProperty("goPackage")) - object.goPackage = message.goPackage; - if (message.ccGenericServices != null && message.hasOwnProperty("ccGenericServices")) - object.ccGenericServices = message.ccGenericServices; - if (message.javaGenericServices != null && message.hasOwnProperty("javaGenericServices")) - object.javaGenericServices = message.javaGenericServices; - if (message.pyGenericServices != null && message.hasOwnProperty("pyGenericServices")) - object.pyGenericServices = message.pyGenericServices; - if (message.javaGenerateEqualsAndHash != null && message.hasOwnProperty("javaGenerateEqualsAndHash")) - object.javaGenerateEqualsAndHash = message.javaGenerateEqualsAndHash; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.javaStringCheckUtf8 != null && message.hasOwnProperty("javaStringCheckUtf8")) - object.javaStringCheckUtf8 = message.javaStringCheckUtf8; - if (message.ccEnableArenas != null && message.hasOwnProperty("ccEnableArenas")) - object.ccEnableArenas = message.ccEnableArenas; - if (message.objcClassPrefix != null && message.hasOwnProperty("objcClassPrefix")) - object.objcClassPrefix = message.objcClassPrefix; - if (message.csharpNamespace != null && message.hasOwnProperty("csharpNamespace")) - object.csharpNamespace = message.csharpNamespace; - if (message.swiftPrefix != null && message.hasOwnProperty("swiftPrefix")) - object.swiftPrefix = message.swiftPrefix; - if (message.phpClassPrefix != null && message.hasOwnProperty("phpClassPrefix")) - object.phpClassPrefix = message.phpClassPrefix; - if (message.phpNamespace != null && message.hasOwnProperty("phpNamespace")) - object.phpNamespace = message.phpNamespace; - if (message.phpMetadataNamespace != null && message.hasOwnProperty("phpMetadataNamespace")) - object.phpMetadataNamespace = message.phpMetadataNamespace; - if (message.rubyPackage != null && message.hasOwnProperty("rubyPackage")) - object.rubyPackage = message.rubyPackage; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resourceDefinition"] && message[".google.api.resourceDefinition"].length) { - object[".google.api.resourceDefinition"] = []; - for (var j = 0; j < message[".google.api.resourceDefinition"].length; ++j) - object[".google.api.resourceDefinition"][j] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resourceDefinition"][j], options); - } - return object; - }; - - /** - * Converts this FileOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FileOptions - * @instance - * @returns {Object.} JSON object - */ - FileOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FileOptions - * @function getTypeUrl - * @memberof google.protobuf.FileOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FileOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FileOptions"; - }; - - /** - * OptimizeMode enum. - * @name google.protobuf.FileOptions.OptimizeMode - * @enum {number} - * @property {number} SPEED=1 SPEED value - * @property {number} CODE_SIZE=2 CODE_SIZE value - * @property {number} LITE_RUNTIME=3 LITE_RUNTIME value - */ - FileOptions.OptimizeMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[1] = "SPEED"] = 1; - values[valuesById[2] = "CODE_SIZE"] = 2; - values[valuesById[3] = "LITE_RUNTIME"] = 3; - return values; - })(); - - return FileOptions; - })(); - - protobuf.MessageOptions = (function() { - - /** - * Properties of a MessageOptions. - * @memberof google.protobuf - * @interface IMessageOptions - * @property {boolean|null} [messageSetWireFormat] MessageOptions messageSetWireFormat - * @property {boolean|null} [noStandardDescriptorAccessor] MessageOptions noStandardDescriptorAccessor - * @property {boolean|null} [deprecated] MessageOptions deprecated - * @property {boolean|null} [mapEntry] MessageOptions mapEntry - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] MessageOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] MessageOptions features - * @property {Array.|null} [uninterpretedOption] MessageOptions uninterpretedOption - * @property {google.api.IResourceDescriptor|null} [".google.api.resource"] MessageOptions .google.api.resource - */ - - /** - * Constructs a new MessageOptions. - * @memberof google.protobuf - * @classdesc Represents a MessageOptions. - * @implements IMessageOptions - * @constructor - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - */ - function MessageOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } - - /** - * MessageOptions messageSetWireFormat. - * @member {boolean} messageSetWireFormat - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.messageSetWireFormat = false; - - /** - * MessageOptions noStandardDescriptorAccessor. - * @member {boolean} noStandardDescriptorAccessor - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.noStandardDescriptorAccessor = false; - - /** - * MessageOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecated = false; - - /** - * MessageOptions mapEntry. - * @member {boolean} mapEntry - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.mapEntry = false; - - /** - * MessageOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * MessageOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.features = null; - - /** - * MessageOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MessageOptions .google.api.resource. - * @member {google.api.IResourceDescriptor|null|undefined} .google.api.resource - * @memberof google.protobuf.MessageOptions - * @instance - */ - MessageOptions.prototype[".google.api.resource"] = null; - - /** - * Creates a new MessageOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions=} [properties] Properties to set - * @returns {google.protobuf.MessageOptions} MessageOptions instance - */ - MessageOptions.create = function create(properties) { - return new MessageOptions(properties); - }; - - /** - * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.messageSetWireFormat != null && Object.hasOwnProperty.call(message, "messageSetWireFormat")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.messageSetWireFormat); - if (message.noStandardDescriptorAccessor != null && Object.hasOwnProperty.call(message, "noStandardDescriptorAccessor")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.noStandardDescriptorAccessor); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.mapEntry != null && Object.hasOwnProperty.call(message, "mapEntry")) - writer.uint32(/* id 7, wireType 0 =*/56).bool(message.mapEntry); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 11, wireType 0 =*/88).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.resource"] != null && Object.hasOwnProperty.call(message, ".google.api.resource")) - $root.google.api.ResourceDescriptor.encode(message[".google.api.resource"], writer.uint32(/* id 1053, wireType 2 =*/8426).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.IMessageOptions} message MessageOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MessageOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.messageSetWireFormat = reader.bool(); - break; - } - case 2: { - message.noStandardDescriptorAccessor = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 7: { - message.mapEntry = reader.bool(); - break; - } - case 11: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 12: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1053: { - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MessageOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MessageOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MessageOptions} MessageOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MessageOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MessageOptions message. - * @function verify - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MessageOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - if (typeof message.messageSetWireFormat !== "boolean") - return "messageSetWireFormat: boolean expected"; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - if (typeof message.noStandardDescriptorAccessor !== "boolean") - return "noStandardDescriptorAccessor: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - if (typeof message.mapEntry !== "boolean") - return "mapEntry: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) { - var error = $root.google.api.ResourceDescriptor.verify(message[".google.api.resource"]); - if (error) - return ".google.api.resource." + error; - } - return null; - }; - - /** - * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MessageOptions} MessageOptions - */ - MessageOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MessageOptions) - return object; - var message = new $root.google.protobuf.MessageOptions(); - if (object.messageSetWireFormat != null) - message.messageSetWireFormat = Boolean(object.messageSetWireFormat); - if (object.noStandardDescriptorAccessor != null) - message.noStandardDescriptorAccessor = Boolean(object.noStandardDescriptorAccessor); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.mapEntry != null) - message.mapEntry = Boolean(object.mapEntry); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MessageOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.resource"] != null) { - if (typeof object[".google.api.resource"] !== "object") - throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected"); - message[".google.api.resource"] = $root.google.api.ResourceDescriptor.fromObject(object[".google.api.resource"]); - } - return message; - }; - - /** - * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MessageOptions - * @static - * @param {google.protobuf.MessageOptions} message MessageOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MessageOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.messageSetWireFormat = false; - object.noStandardDescriptorAccessor = false; - object.deprecated = false; - object.mapEntry = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - object[".google.api.resource"] = null; - } - if (message.messageSetWireFormat != null && message.hasOwnProperty("messageSetWireFormat")) - object.messageSetWireFormat = message.messageSetWireFormat; - if (message.noStandardDescriptorAccessor != null && message.hasOwnProperty("noStandardDescriptorAccessor")) - object.noStandardDescriptorAccessor = message.noStandardDescriptorAccessor; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.mapEntry != null && message.hasOwnProperty("mapEntry")) - object.mapEntry = message.mapEntry; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.resource"] != null && message.hasOwnProperty(".google.api.resource")) - object[".google.api.resource"] = $root.google.api.ResourceDescriptor.toObject(message[".google.api.resource"], options); - return object; - }; - - /** - * Converts this MessageOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MessageOptions - * @instance - * @returns {Object.} JSON object - */ - MessageOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MessageOptions - * @function getTypeUrl - * @memberof google.protobuf.MessageOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MessageOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MessageOptions"; - }; - - return MessageOptions; - })(); - - protobuf.FieldOptions = (function() { - - /** - * Properties of a FieldOptions. - * @memberof google.protobuf - * @interface IFieldOptions - * @property {google.protobuf.FieldOptions.CType|null} [ctype] FieldOptions ctype - * @property {boolean|null} [packed] FieldOptions packed - * @property {google.protobuf.FieldOptions.JSType|null} [jstype] FieldOptions jstype - * @property {boolean|null} [lazy] FieldOptions lazy - * @property {boolean|null} [unverifiedLazy] FieldOptions unverifiedLazy - * @property {boolean|null} [deprecated] FieldOptions deprecated - * @property {boolean|null} [weak] FieldOptions weak - * @property {boolean|null} [debugRedact] FieldOptions debugRedact - * @property {google.protobuf.FieldOptions.OptionRetention|null} [retention] FieldOptions retention - * @property {Array.|null} [targets] FieldOptions targets - * @property {Array.|null} [editionDefaults] FieldOptions editionDefaults - * @property {google.protobuf.IFeatureSet|null} [features] FieldOptions features - * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] FieldOptions featureSupport - * @property {Array.|null} [uninterpretedOption] FieldOptions uninterpretedOption - * @property {Array.|null} [".google.api.fieldBehavior"] FieldOptions .google.api.fieldBehavior - * @property {google.api.IResourceReference|null} [".google.api.resourceReference"] FieldOptions .google.api.resourceReference - */ - - /** - * Constructs a new FieldOptions. - * @memberof google.protobuf - * @classdesc Represents a FieldOptions. - * @implements IFieldOptions - * @constructor - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - */ - function FieldOptions(properties) { - this.targets = []; - this.editionDefaults = []; - this.uninterpretedOption = []; - this[".google.api.fieldBehavior"] = []; - 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]]; - } - - /** - * FieldOptions ctype. - * @member {google.protobuf.FieldOptions.CType} ctype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.ctype = 0; - - /** - * FieldOptions packed. - * @member {boolean} packed - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.packed = false; - - /** - * FieldOptions jstype. - * @member {google.protobuf.FieldOptions.JSType} jstype - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.jstype = 0; - - /** - * FieldOptions lazy. - * @member {boolean} lazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.lazy = false; - - /** - * FieldOptions unverifiedLazy. - * @member {boolean} unverifiedLazy - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.unverifiedLazy = false; - - /** - * FieldOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.deprecated = false; - - /** - * FieldOptions weak. - * @member {boolean} weak - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.weak = false; - - /** - * FieldOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.debugRedact = false; - - /** - * FieldOptions retention. - * @member {google.protobuf.FieldOptions.OptionRetention} retention - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.retention = 0; - - /** - * FieldOptions targets. - * @member {Array.} targets - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.targets = $util.emptyArray; - - /** - * FieldOptions editionDefaults. - * @member {Array.} editionDefaults - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.editionDefaults = $util.emptyArray; - - /** - * FieldOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.features = null; - - /** - * FieldOptions featureSupport. - * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.featureSupport = null; - - /** - * FieldOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * FieldOptions .google.api.fieldBehavior. - * @member {Array.} .google.api.fieldBehavior - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.fieldBehavior"] = $util.emptyArray; - - /** - * FieldOptions .google.api.resourceReference. - * @member {google.api.IResourceReference|null|undefined} .google.api.resourceReference - * @memberof google.protobuf.FieldOptions - * @instance - */ - FieldOptions.prototype[".google.api.resourceReference"] = null; - - /** - * Creates a new FieldOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions} FieldOptions instance - */ - FieldOptions.create = function create(properties) { - return new FieldOptions(properties); - }; - - /** - * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.ctype != null && Object.hasOwnProperty.call(message, "ctype")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.ctype); - if (message.packed != null && Object.hasOwnProperty.call(message, "packed")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.packed); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.lazy != null && Object.hasOwnProperty.call(message, "lazy")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.lazy); - if (message.jstype != null && Object.hasOwnProperty.call(message, "jstype")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jstype); - if (message.weak != null && Object.hasOwnProperty.call(message, "weak")) - writer.uint32(/* id 10, wireType 0 =*/80).bool(message.weak); - if (message.unverifiedLazy != null && Object.hasOwnProperty.call(message, "unverifiedLazy")) - writer.uint32(/* id 15, wireType 0 =*/120).bool(message.unverifiedLazy); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 16, wireType 0 =*/128).bool(message.debugRedact); - if (message.retention != null && Object.hasOwnProperty.call(message, "retention")) - writer.uint32(/* id 17, wireType 0 =*/136).int32(message.retention); - if (message.targets != null && message.targets.length) - for (var i = 0; i < message.targets.length; ++i) - writer.uint32(/* id 19, wireType 0 =*/152).int32(message.targets[i]); - if (message.editionDefaults != null && message.editionDefaults.length) - for (var i = 0; i < message.editionDefaults.length; ++i) - $root.google.protobuf.FieldOptions.EditionDefault.encode(message.editionDefaults[i], writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); - if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) - $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 22, wireType 2 =*/178).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.fieldBehavior"] != null && message[".google.api.fieldBehavior"].length) - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - writer.uint32(/* id 1052, wireType 0 =*/8416).int32(message[".google.api.fieldBehavior"][i]); - if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) - $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.ctype = reader.int32(); - break; - } - case 2: { - message.packed = reader.bool(); - break; - } - case 6: { - message.jstype = reader.int32(); - break; - } - case 5: { - message.lazy = reader.bool(); - break; - } - case 15: { - message.unverifiedLazy = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 10: { - message.weak = reader.bool(); - break; - } - case 16: { - message.debugRedact = reader.bool(); - break; - } - case 17: { - message.retention = reader.int32(); - break; - } - case 19: { - if (!(message.targets && message.targets.length)) - message.targets = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.targets.push(reader.int32()); - } else - message.targets.push(reader.int32()); - break; - } - case 20: { - if (!(message.editionDefaults && message.editionDefaults.length)) - message.editionDefaults = []; - message.editionDefaults.push($root.google.protobuf.FieldOptions.EditionDefault.decode(reader, reader.uint32())); - break; - } - case 21: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 22: { - message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1052: { - if (!(message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length)) - message[".google.api.fieldBehavior"] = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message[".google.api.fieldBehavior"].push(reader.int32()); - } else - message[".google.api.fieldBehavior"].push(reader.int32()); - break; - } - case 1055: { - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions} FieldOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldOptions message. - * @function verify - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.ctype != null && message.hasOwnProperty("ctype")) - switch (message.ctype) { - default: - return "ctype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.packed != null && message.hasOwnProperty("packed")) - if (typeof message.packed !== "boolean") - return "packed: boolean expected"; - if (message.jstype != null && message.hasOwnProperty("jstype")) - switch (message.jstype) { - default: - return "jstype: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.lazy != null && message.hasOwnProperty("lazy")) - if (typeof message.lazy !== "boolean") - return "lazy: boolean expected"; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - if (typeof message.unverifiedLazy !== "boolean") - return "unverifiedLazy: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.weak != null && message.hasOwnProperty("weak")) - if (typeof message.weak !== "boolean") - return "weak: boolean expected"; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.retention != null && message.hasOwnProperty("retention")) - switch (message.retention) { - default: - return "retention: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.targets != null && message.hasOwnProperty("targets")) { - if (!Array.isArray(message.targets)) - return "targets: array expected"; - for (var i = 0; i < message.targets.length; ++i) - switch (message.targets[i]) { - default: - return "targets: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - case 9: - break; - } - } - if (message.editionDefaults != null && message.hasOwnProperty("editionDefaults")) { - if (!Array.isArray(message.editionDefaults)) - return "editionDefaults: array expected"; - for (var i = 0; i < message.editionDefaults.length; ++i) { - var error = $root.google.protobuf.FieldOptions.EditionDefault.verify(message.editionDefaults[i]); - if (error) - return "editionDefaults." + error; - } - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { - var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); - if (error) - return "featureSupport." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.fieldBehavior"] != null && message.hasOwnProperty(".google.api.fieldBehavior")) { - if (!Array.isArray(message[".google.api.fieldBehavior"])) - return ".google.api.fieldBehavior: array expected"; - for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) - switch (message[".google.api.fieldBehavior"][i]) { - default: - return ".google.api.fieldBehavior: enum value[] expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - case 8: - break; - } - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) { - var error = $root.google.api.ResourceReference.verify(message[".google.api.resourceReference"]); - if (error) - return ".google.api.resourceReference." + error; - } - return null; - }; - - /** - * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions} FieldOptions - */ - FieldOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions) - return object; - var message = new $root.google.protobuf.FieldOptions(); - switch (object.ctype) { - default: - if (typeof object.ctype === "number") { - message.ctype = object.ctype; - break; - } - break; - case "STRING": - case 0: - message.ctype = 0; - break; - case "CORD": - case 1: - message.ctype = 1; - break; - case "STRING_PIECE": - case 2: - message.ctype = 2; - break; - } - if (object.packed != null) - message.packed = Boolean(object.packed); - switch (object.jstype) { - default: - if (typeof object.jstype === "number") { - message.jstype = object.jstype; - break; - } - break; - case "JS_NORMAL": - case 0: - message.jstype = 0; - break; - case "JS_STRING": - case 1: - message.jstype = 1; - break; - case "JS_NUMBER": - case 2: - message.jstype = 2; - break; - } - if (object.lazy != null) - message.lazy = Boolean(object.lazy); - if (object.unverifiedLazy != null) - message.unverifiedLazy = Boolean(object.unverifiedLazy); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.weak != null) - message.weak = Boolean(object.weak); - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - switch (object.retention) { - default: - if (typeof object.retention === "number") { - message.retention = object.retention; - break; - } - break; - case "RETENTION_UNKNOWN": - case 0: - message.retention = 0; - break; - case "RETENTION_RUNTIME": - case 1: - message.retention = 1; - break; - case "RETENTION_SOURCE": - case 2: - message.retention = 2; - break; - } - if (object.targets) { - if (!Array.isArray(object.targets)) - throw TypeError(".google.protobuf.FieldOptions.targets: array expected"); - message.targets = []; - for (var i = 0; i < object.targets.length; ++i) - switch (object.targets[i]) { - default: - if (typeof object.targets[i] === "number") { - message.targets[i] = object.targets[i]; - break; - } - case "TARGET_TYPE_UNKNOWN": - case 0: - message.targets[i] = 0; - break; - case "TARGET_TYPE_FILE": - case 1: - message.targets[i] = 1; - break; - case "TARGET_TYPE_EXTENSION_RANGE": - case 2: - message.targets[i] = 2; - break; - case "TARGET_TYPE_MESSAGE": - case 3: - message.targets[i] = 3; - break; - case "TARGET_TYPE_FIELD": - case 4: - message.targets[i] = 4; - break; - case "TARGET_TYPE_ONEOF": - case 5: - message.targets[i] = 5; - break; - case "TARGET_TYPE_ENUM": - case 6: - message.targets[i] = 6; - break; - case "TARGET_TYPE_ENUM_ENTRY": - case 7: - message.targets[i] = 7; - break; - case "TARGET_TYPE_SERVICE": - case 8: - message.targets[i] = 8; - break; - case "TARGET_TYPE_METHOD": - case 9: - message.targets[i] = 9; - break; - } - } - if (object.editionDefaults) { - if (!Array.isArray(object.editionDefaults)) - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected"); - message.editionDefaults = []; - for (var i = 0; i < object.editionDefaults.length; ++i) { - if (typeof object.editionDefaults[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected"); - message.editionDefaults[i] = $root.google.protobuf.FieldOptions.EditionDefault.fromObject(object.editionDefaults[i]); - } - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.FieldOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.featureSupport != null) { - if (typeof object.featureSupport !== "object") - throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected"); - message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.fieldBehavior"]) { - if (!Array.isArray(object[".google.api.fieldBehavior"])) - throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected"); - message[".google.api.fieldBehavior"] = []; - for (var i = 0; i < object[".google.api.fieldBehavior"].length; ++i) - switch (object[".google.api.fieldBehavior"][i]) { - default: - if (typeof object[".google.api.fieldBehavior"][i] === "number") { - message[".google.api.fieldBehavior"][i] = object[".google.api.fieldBehavior"][i]; - break; - } - case "FIELD_BEHAVIOR_UNSPECIFIED": - case 0: - message[".google.api.fieldBehavior"][i] = 0; - break; - case "OPTIONAL": - case 1: - message[".google.api.fieldBehavior"][i] = 1; - break; - case "REQUIRED": - case 2: - message[".google.api.fieldBehavior"][i] = 2; - break; - case "OUTPUT_ONLY": - case 3: - message[".google.api.fieldBehavior"][i] = 3; - break; - case "INPUT_ONLY": - case 4: - message[".google.api.fieldBehavior"][i] = 4; - break; - case "IMMUTABLE": - case 5: - message[".google.api.fieldBehavior"][i] = 5; - break; - case "UNORDERED_LIST": - case 6: - message[".google.api.fieldBehavior"][i] = 6; - break; - case "NON_EMPTY_DEFAULT": - case 7: - message[".google.api.fieldBehavior"][i] = 7; - break; - case "IDENTIFIER": - case 8: - message[".google.api.fieldBehavior"][i] = 8; - break; - } - } - if (object[".google.api.resourceReference"] != null) { - if (typeof object[".google.api.resourceReference"] !== "object") - throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected"); - message[".google.api.resourceReference"] = $root.google.api.ResourceReference.fromObject(object[".google.api.resourceReference"]); - } - return message; - }; - - /** - * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions - * @static - * @param {google.protobuf.FieldOptions} message FieldOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.targets = []; - object.editionDefaults = []; - object.uninterpretedOption = []; - object[".google.api.fieldBehavior"] = []; - } - if (options.defaults) { - object.ctype = options.enums === String ? "STRING" : 0; - object.packed = false; - object.deprecated = false; - object.lazy = false; - object.jstype = options.enums === String ? "JS_NORMAL" : 0; - object.weak = false; - object.unverifiedLazy = false; - object.debugRedact = false; - object.retention = options.enums === String ? "RETENTION_UNKNOWN" : 0; - object.features = null; - object.featureSupport = null; - object[".google.api.resourceReference"] = null; - } - if (message.ctype != null && message.hasOwnProperty("ctype")) - object.ctype = options.enums === String ? $root.google.protobuf.FieldOptions.CType[message.ctype] === undefined ? message.ctype : $root.google.protobuf.FieldOptions.CType[message.ctype] : message.ctype; - if (message.packed != null && message.hasOwnProperty("packed")) - object.packed = message.packed; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.lazy != null && message.hasOwnProperty("lazy")) - object.lazy = message.lazy; - if (message.jstype != null && message.hasOwnProperty("jstype")) - object.jstype = options.enums === String ? $root.google.protobuf.FieldOptions.JSType[message.jstype] === undefined ? message.jstype : $root.google.protobuf.FieldOptions.JSType[message.jstype] : message.jstype; - if (message.weak != null && message.hasOwnProperty("weak")) - object.weak = message.weak; - if (message.unverifiedLazy != null && message.hasOwnProperty("unverifiedLazy")) - object.unverifiedLazy = message.unverifiedLazy; - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.retention != null && message.hasOwnProperty("retention")) - object.retention = options.enums === String ? $root.google.protobuf.FieldOptions.OptionRetention[message.retention] === undefined ? message.retention : $root.google.protobuf.FieldOptions.OptionRetention[message.retention] : message.retention; - if (message.targets && message.targets.length) { - object.targets = []; - for (var j = 0; j < message.targets.length; ++j) - object.targets[j] = options.enums === String ? $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] === undefined ? message.targets[j] : $root.google.protobuf.FieldOptions.OptionTargetType[message.targets[j]] : message.targets[j]; - } - if (message.editionDefaults && message.editionDefaults.length) { - object.editionDefaults = []; - for (var j = 0; j < message.editionDefaults.length; ++j) - object.editionDefaults[j] = $root.google.protobuf.FieldOptions.EditionDefault.toObject(message.editionDefaults[j], options); - } - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) - object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.fieldBehavior"] && message[".google.api.fieldBehavior"].length) { - object[".google.api.fieldBehavior"] = []; - for (var j = 0; j < message[".google.api.fieldBehavior"].length; ++j) - object[".google.api.fieldBehavior"][j] = options.enums === String ? $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] === undefined ? message[".google.api.fieldBehavior"][j] : $root.google.api.FieldBehavior[message[".google.api.fieldBehavior"][j]] : message[".google.api.fieldBehavior"][j]; - } - if (message[".google.api.resourceReference"] != null && message.hasOwnProperty(".google.api.resourceReference")) - object[".google.api.resourceReference"] = $root.google.api.ResourceReference.toObject(message[".google.api.resourceReference"], options); - return object; - }; - - /** - * Converts this FieldOptions to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions - * @instance - * @returns {Object.} JSON object - */ - FieldOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldOptions - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions"; - }; - - /** - * CType enum. - * @name google.protobuf.FieldOptions.CType - * @enum {number} - * @property {number} STRING=0 STRING value - * @property {number} CORD=1 CORD value - * @property {number} STRING_PIECE=2 STRING_PIECE value - */ - FieldOptions.CType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STRING"] = 0; - values[valuesById[1] = "CORD"] = 1; - values[valuesById[2] = "STRING_PIECE"] = 2; - return values; - })(); - - /** - * JSType enum. - * @name google.protobuf.FieldOptions.JSType - * @enum {number} - * @property {number} JS_NORMAL=0 JS_NORMAL value - * @property {number} JS_STRING=1 JS_STRING value - * @property {number} JS_NUMBER=2 JS_NUMBER value - */ - FieldOptions.JSType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JS_NORMAL"] = 0; - values[valuesById[1] = "JS_STRING"] = 1; - values[valuesById[2] = "JS_NUMBER"] = 2; - return values; - })(); - - /** - * OptionRetention enum. - * @name google.protobuf.FieldOptions.OptionRetention - * @enum {number} - * @property {number} RETENTION_UNKNOWN=0 RETENTION_UNKNOWN value - * @property {number} RETENTION_RUNTIME=1 RETENTION_RUNTIME value - * @property {number} RETENTION_SOURCE=2 RETENTION_SOURCE value - */ - FieldOptions.OptionRetention = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "RETENTION_UNKNOWN"] = 0; - values[valuesById[1] = "RETENTION_RUNTIME"] = 1; - values[valuesById[2] = "RETENTION_SOURCE"] = 2; - return values; - })(); - - /** - * OptionTargetType enum. - * @name google.protobuf.FieldOptions.OptionTargetType - * @enum {number} - * @property {number} TARGET_TYPE_UNKNOWN=0 TARGET_TYPE_UNKNOWN value - * @property {number} TARGET_TYPE_FILE=1 TARGET_TYPE_FILE value - * @property {number} TARGET_TYPE_EXTENSION_RANGE=2 TARGET_TYPE_EXTENSION_RANGE value - * @property {number} TARGET_TYPE_MESSAGE=3 TARGET_TYPE_MESSAGE value - * @property {number} TARGET_TYPE_FIELD=4 TARGET_TYPE_FIELD value - * @property {number} TARGET_TYPE_ONEOF=5 TARGET_TYPE_ONEOF value - * @property {number} TARGET_TYPE_ENUM=6 TARGET_TYPE_ENUM value - * @property {number} TARGET_TYPE_ENUM_ENTRY=7 TARGET_TYPE_ENUM_ENTRY value - * @property {number} TARGET_TYPE_SERVICE=8 TARGET_TYPE_SERVICE value - * @property {number} TARGET_TYPE_METHOD=9 TARGET_TYPE_METHOD value - */ - FieldOptions.OptionTargetType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TARGET_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "TARGET_TYPE_FILE"] = 1; - values[valuesById[2] = "TARGET_TYPE_EXTENSION_RANGE"] = 2; - values[valuesById[3] = "TARGET_TYPE_MESSAGE"] = 3; - values[valuesById[4] = "TARGET_TYPE_FIELD"] = 4; - values[valuesById[5] = "TARGET_TYPE_ONEOF"] = 5; - values[valuesById[6] = "TARGET_TYPE_ENUM"] = 6; - values[valuesById[7] = "TARGET_TYPE_ENUM_ENTRY"] = 7; - values[valuesById[8] = "TARGET_TYPE_SERVICE"] = 8; - values[valuesById[9] = "TARGET_TYPE_METHOD"] = 9; - return values; - })(); - - FieldOptions.EditionDefault = (function() { - - /** - * Properties of an EditionDefault. - * @memberof google.protobuf.FieldOptions - * @interface IEditionDefault - * @property {google.protobuf.Edition|null} [edition] EditionDefault edition - * @property {string|null} [value] EditionDefault value - */ - - /** - * Constructs a new EditionDefault. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents an EditionDefault. - * @implements IEditionDefault - * @constructor - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - */ - function EditionDefault(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]]; - } - - /** - * EditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.edition = 0; - - /** - * EditionDefault value. - * @member {string} value - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - */ - EditionDefault.prototype.value = ""; - - /** - * Creates a new EditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault instance - */ - EditionDefault.create = function create(properties) { - return new EditionDefault(properties); - }; - - /** - * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.value); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - return writer; - }; - - /** - * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.IEditionDefault} message EditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.EditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 2: { - message.value = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EditionDefault message. - * @function verify - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.value != null && message.hasOwnProperty("value")) - if (!$util.isString(message.value)) - return "value: string expected"; - return null; - }; - - /** - * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.EditionDefault} EditionDefault - */ - EditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.EditionDefault) - return object; - var message = new $root.google.protobuf.FieldOptions.EditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_LEGACY": - case 900: - message.edition = 900; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.value != null) - message.value = String(object.value); - return message; - }; - - /** - * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {google.protobuf.FieldOptions.EditionDefault} message EditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.value = ""; - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.value != null && message.hasOwnProperty("value")) - object.value = message.value; - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - return object; - }; - - /** - * Converts this EditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.EditionDefault - * @instance - * @returns {Object.} JSON object - */ - EditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.EditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.EditionDefault"; - }; - - return EditionDefault; - })(); - - FieldOptions.FeatureSupport = (function() { - - /** - * Properties of a FeatureSupport. - * @memberof google.protobuf.FieldOptions - * @interface IFeatureSupport - * @property {google.protobuf.Edition|null} [editionIntroduced] FeatureSupport editionIntroduced - * @property {google.protobuf.Edition|null} [editionDeprecated] FeatureSupport editionDeprecated - * @property {string|null} [deprecationWarning] FeatureSupport deprecationWarning - * @property {google.protobuf.Edition|null} [editionRemoved] FeatureSupport editionRemoved - */ - - /** - * Constructs a new FeatureSupport. - * @memberof google.protobuf.FieldOptions - * @classdesc Represents a FeatureSupport. - * @implements IFeatureSupport - * @constructor - * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set - */ - function FeatureSupport(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]]; - } - - /** - * FeatureSupport editionIntroduced. - * @member {google.protobuf.Edition} editionIntroduced - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @instance - */ - FeatureSupport.prototype.editionIntroduced = 0; - - /** - * FeatureSupport editionDeprecated. - * @member {google.protobuf.Edition} editionDeprecated - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @instance - */ - FeatureSupport.prototype.editionDeprecated = 0; - - /** - * FeatureSupport deprecationWarning. - * @member {string} deprecationWarning - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @instance - */ - FeatureSupport.prototype.deprecationWarning = ""; - - /** - * FeatureSupport editionRemoved. - * @member {google.protobuf.Edition} editionRemoved - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @instance - */ - FeatureSupport.prototype.editionRemoved = 0; - - /** - * Creates a new FeatureSupport instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {google.protobuf.FieldOptions.IFeatureSupport=} [properties] Properties to set - * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport instance - */ - FeatureSupport.create = function create(properties) { - return new FeatureSupport(properties); - }; - - /** - * Encodes the specified FeatureSupport message. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSupport.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.editionIntroduced != null && Object.hasOwnProperty.call(message, "editionIntroduced")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.editionIntroduced); - if (message.editionDeprecated != null && Object.hasOwnProperty.call(message, "editionDeprecated")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.editionDeprecated); - if (message.deprecationWarning != null && Object.hasOwnProperty.call(message, "deprecationWarning")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.deprecationWarning); - if (message.editionRemoved != null && Object.hasOwnProperty.call(message, "editionRemoved")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.editionRemoved); - return writer; - }; - - /** - * Encodes the specified FeatureSupport message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.FeatureSupport.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {google.protobuf.FieldOptions.IFeatureSupport} message FeatureSupport message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSupport.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSupport message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSupport.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions.FeatureSupport(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.editionIntroduced = reader.int32(); - break; - } - case 2: { - message.editionDeprecated = reader.int32(); - break; - } - case 3: { - message.deprecationWarning = reader.string(); - break; - } - case 4: { - message.editionRemoved = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSupport message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSupport.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSupport message. - * @function verify - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSupport.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) - switch (message.editionIntroduced) { - default: - return "editionIntroduced: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) - switch (message.editionDeprecated) { - default: - return "editionDeprecated: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) - if (!$util.isString(message.deprecationWarning)) - return "deprecationWarning: string expected"; - if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) - switch (message.editionRemoved) { - default: - return "editionRemoved: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSupport message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldOptions.FeatureSupport} FeatureSupport - */ - FeatureSupport.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldOptions.FeatureSupport) - return object; - var message = new $root.google.protobuf.FieldOptions.FeatureSupport(); - switch (object.editionIntroduced) { - default: - if (typeof object.editionIntroduced === "number") { - message.editionIntroduced = object.editionIntroduced; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.editionIntroduced = 0; - break; - case "EDITION_LEGACY": - case 900: - message.editionIntroduced = 900; - break; - case "EDITION_PROTO2": - case 998: - message.editionIntroduced = 998; - break; - case "EDITION_PROTO3": - case 999: - message.editionIntroduced = 999; - break; - case "EDITION_2023": - case 1000: - message.editionIntroduced = 1000; - break; - case "EDITION_2024": - case 1001: - message.editionIntroduced = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.editionIntroduced = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.editionIntroduced = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.editionIntroduced = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.editionIntroduced = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.editionIntroduced = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.editionIntroduced = 2147483647; - break; - } - switch (object.editionDeprecated) { - default: - if (typeof object.editionDeprecated === "number") { - message.editionDeprecated = object.editionDeprecated; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.editionDeprecated = 0; - break; - case "EDITION_LEGACY": - case 900: - message.editionDeprecated = 900; - break; - case "EDITION_PROTO2": - case 998: - message.editionDeprecated = 998; - break; - case "EDITION_PROTO3": - case 999: - message.editionDeprecated = 999; - break; - case "EDITION_2023": - case 1000: - message.editionDeprecated = 1000; - break; - case "EDITION_2024": - case 1001: - message.editionDeprecated = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.editionDeprecated = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.editionDeprecated = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.editionDeprecated = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.editionDeprecated = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.editionDeprecated = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.editionDeprecated = 2147483647; - break; - } - if (object.deprecationWarning != null) - message.deprecationWarning = String(object.deprecationWarning); - switch (object.editionRemoved) { - default: - if (typeof object.editionRemoved === "number") { - message.editionRemoved = object.editionRemoved; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.editionRemoved = 0; - break; - case "EDITION_LEGACY": - case 900: - message.editionRemoved = 900; - break; - case "EDITION_PROTO2": - case 998: - message.editionRemoved = 998; - break; - case "EDITION_PROTO3": - case 999: - message.editionRemoved = 999; - break; - case "EDITION_2023": - case 1000: - message.editionRemoved = 1000; - break; - case "EDITION_2024": - case 1001: - message.editionRemoved = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.editionRemoved = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.editionRemoved = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.editionRemoved = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.editionRemoved = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.editionRemoved = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.editionRemoved = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSupport message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {google.protobuf.FieldOptions.FeatureSupport} message FeatureSupport - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSupport.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.editionIntroduced = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.editionDeprecated = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.deprecationWarning = ""; - object.editionRemoved = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.editionIntroduced != null && message.hasOwnProperty("editionIntroduced")) - object.editionIntroduced = options.enums === String ? $root.google.protobuf.Edition[message.editionIntroduced] === undefined ? message.editionIntroduced : $root.google.protobuf.Edition[message.editionIntroduced] : message.editionIntroduced; - if (message.editionDeprecated != null && message.hasOwnProperty("editionDeprecated")) - object.editionDeprecated = options.enums === String ? $root.google.protobuf.Edition[message.editionDeprecated] === undefined ? message.editionDeprecated : $root.google.protobuf.Edition[message.editionDeprecated] : message.editionDeprecated; - if (message.deprecationWarning != null && message.hasOwnProperty("deprecationWarning")) - object.deprecationWarning = message.deprecationWarning; - if (message.editionRemoved != null && message.hasOwnProperty("editionRemoved")) - object.editionRemoved = options.enums === String ? $root.google.protobuf.Edition[message.editionRemoved] === undefined ? message.editionRemoved : $root.google.protobuf.Edition[message.editionRemoved] : message.editionRemoved; - return object; - }; - - /** - * Converts this FeatureSupport to JSON. - * @function toJSON - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @instance - * @returns {Object.} JSON object - */ - FeatureSupport.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSupport - * @function getTypeUrl - * @memberof google.protobuf.FieldOptions.FeatureSupport - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSupport.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldOptions.FeatureSupport"; - }; - - return FeatureSupport; - })(); - - return FieldOptions; - })(); - - protobuf.OneofOptions = (function() { - - /** - * Properties of an OneofOptions. - * @memberof google.protobuf - * @interface IOneofOptions - * @property {google.protobuf.IFeatureSet|null} [features] OneofOptions features - * @property {Array.|null} [uninterpretedOption] OneofOptions uninterpretedOption - */ - - /** - * Constructs a new OneofOptions. - * @memberof google.protobuf - * @classdesc Represents an OneofOptions. - * @implements IOneofOptions - * @constructor - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - */ - function OneofOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } - - /** - * OneofOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.features = null; - - /** - * OneofOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.OneofOptions - * @instance - */ - OneofOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new OneofOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions=} [properties] Properties to set - * @returns {google.protobuf.OneofOptions} OneofOptions instance - */ - OneofOptions.create = function create(properties) { - return new OneofOptions(properties); - }; - - /** - * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.IOneofOptions} message OneofOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - OneofOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an OneofOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.OneofOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.OneofOptions} OneofOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - OneofOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an OneofOptions message. - * @function verify - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - OneofOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.OneofOptions} OneofOptions - */ - OneofOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.OneofOptions) - return object; - var message = new $root.google.protobuf.OneofOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.OneofOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.OneofOptions - * @static - * @param {google.protobuf.OneofOptions} message OneofOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - OneofOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) - object.features = null; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this OneofOptions to JSON. - * @function toJSON - * @memberof google.protobuf.OneofOptions - * @instance - * @returns {Object.} JSON object - */ - OneofOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for OneofOptions - * @function getTypeUrl - * @memberof google.protobuf.OneofOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - OneofOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.OneofOptions"; - }; - - return OneofOptions; - })(); - - protobuf.EnumOptions = (function() { - - /** - * Properties of an EnumOptions. - * @memberof google.protobuf - * @interface IEnumOptions - * @property {boolean|null} [allowAlias] EnumOptions allowAlias - * @property {boolean|null} [deprecated] EnumOptions deprecated - * @property {boolean|null} [deprecatedLegacyJsonFieldConflicts] EnumOptions deprecatedLegacyJsonFieldConflicts - * @property {google.protobuf.IFeatureSet|null} [features] EnumOptions features - * @property {Array.|null} [uninterpretedOption] EnumOptions uninterpretedOption - */ - - /** - * Constructs a new EnumOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumOptions. - * @implements IEnumOptions - * @constructor - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - */ - function EnumOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } - - /** - * EnumOptions allowAlias. - * @member {boolean} allowAlias - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.allowAlias = false; - - /** - * EnumOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecated = false; - - /** - * EnumOptions deprecatedLegacyJsonFieldConflicts. - * @member {boolean} deprecatedLegacyJsonFieldConflicts - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.deprecatedLegacyJsonFieldConflicts = false; - - /** - * EnumOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.features = null; - - /** - * EnumOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumOptions - * @instance - */ - EnumOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumOptions} EnumOptions instance - */ - EnumOptions.create = function create(properties) { - return new EnumOptions(properties); - }; - - /** - * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.allowAlias != null && Object.hasOwnProperty.call(message, "allowAlias")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.allowAlias); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.deprecated); - if (message.deprecatedLegacyJsonFieldConflicts != null && Object.hasOwnProperty.call(message, "deprecatedLegacyJsonFieldConflicts")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.deprecatedLegacyJsonFieldConflicts); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.IEnumOptions} message EnumOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - message.allowAlias = reader.bool(); - break; - } - case 3: { - message.deprecated = reader.bool(); - break; - } - case 6: { - message.deprecatedLegacyJsonFieldConflicts = reader.bool(); - break; - } - case 7: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumOptions} EnumOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumOptions message. - * @function verify - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - if (typeof message.allowAlias !== "boolean") - return "allowAlias: boolean expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - if (typeof message.deprecatedLegacyJsonFieldConflicts !== "boolean") - return "deprecatedLegacyJsonFieldConflicts: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumOptions} EnumOptions - */ - EnumOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumOptions) - return object; - var message = new $root.google.protobuf.EnumOptions(); - if (object.allowAlias != null) - message.allowAlias = Boolean(object.allowAlias); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.deprecatedLegacyJsonFieldConflicts != null) - message.deprecatedLegacyJsonFieldConflicts = Boolean(object.deprecatedLegacyJsonFieldConflicts); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumOptions - * @static - * @param {google.protobuf.EnumOptions} message EnumOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.allowAlias = false; - object.deprecated = false; - object.deprecatedLegacyJsonFieldConflicts = false; - object.features = null; - } - if (message.allowAlias != null && message.hasOwnProperty("allowAlias")) - object.allowAlias = message.allowAlias; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.deprecatedLegacyJsonFieldConflicts != null && message.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")) - object.deprecatedLegacyJsonFieldConflicts = message.deprecatedLegacyJsonFieldConflicts; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumOptions - * @instance - * @returns {Object.} JSON object - */ - EnumOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumOptions"; - }; - - return EnumOptions; - })(); - - protobuf.EnumValueOptions = (function() { - - /** - * Properties of an EnumValueOptions. - * @memberof google.protobuf - * @interface IEnumValueOptions - * @property {boolean|null} [deprecated] EnumValueOptions deprecated - * @property {google.protobuf.IFeatureSet|null} [features] EnumValueOptions features - * @property {boolean|null} [debugRedact] EnumValueOptions debugRedact - * @property {google.protobuf.FieldOptions.IFeatureSupport|null} [featureSupport] EnumValueOptions featureSupport - * @property {Array.|null} [uninterpretedOption] EnumValueOptions uninterpretedOption - */ - - /** - * Constructs a new EnumValueOptions. - * @memberof google.protobuf - * @classdesc Represents an EnumValueOptions. - * @implements IEnumValueOptions - * @constructor - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - */ - function EnumValueOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } - - /** - * EnumValueOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.deprecated = false; - - /** - * EnumValueOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.features = null; - - /** - * EnumValueOptions debugRedact. - * @member {boolean} debugRedact - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.debugRedact = false; - - /** - * EnumValueOptions featureSupport. - * @member {google.protobuf.FieldOptions.IFeatureSupport|null|undefined} featureSupport - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.featureSupport = null; - - /** - * EnumValueOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.EnumValueOptions - * @instance - */ - EnumValueOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * Creates a new EnumValueOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions=} [properties] Properties to set - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions instance - */ - EnumValueOptions.create = function create(properties) { - return new EnumValueOptions(properties); - }; - - /** - * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.debugRedact != null && Object.hasOwnProperty.call(message, "debugRedact")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.debugRedact); - if (message.featureSupport != null && Object.hasOwnProperty.call(message, "featureSupport")) - $root.google.protobuf.FieldOptions.FeatureSupport.encode(message.featureSupport, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.IEnumValueOptions} message EnumValueOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - EnumValueOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.deprecated = reader.bool(); - break; - } - case 2: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 3: { - message.debugRedact = reader.bool(); - break; - } - case 4: { - message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - EnumValueOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an EnumValueOptions message. - * @function verify - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - EnumValueOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - if (typeof message.debugRedact !== "boolean") - return "debugRedact: boolean expected"; - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) { - var error = $root.google.protobuf.FieldOptions.FeatureSupport.verify(message.featureSupport); - if (error) - return "featureSupport." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - return null; - }; - - /** - * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.EnumValueOptions} EnumValueOptions - */ - EnumValueOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.EnumValueOptions) - return object; - var message = new $root.google.protobuf.EnumValueOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.debugRedact != null) - message.debugRedact = Boolean(object.debugRedact); - if (object.featureSupport != null) { - if (typeof object.featureSupport !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected"); - message.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.fromObject(object.featureSupport); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - return message; - }; - - /** - * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {google.protobuf.EnumValueOptions} message EnumValueOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - EnumValueOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object.debugRedact = false; - object.featureSupport = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.debugRedact != null && message.hasOwnProperty("debugRedact")) - object.debugRedact = message.debugRedact; - if (message.featureSupport != null && message.hasOwnProperty("featureSupport")) - object.featureSupport = $root.google.protobuf.FieldOptions.FeatureSupport.toObject(message.featureSupport, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - return object; - }; - - /** - * Converts this EnumValueOptions to JSON. - * @function toJSON - * @memberof google.protobuf.EnumValueOptions - * @instance - * @returns {Object.} JSON object - */ - EnumValueOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for EnumValueOptions - * @function getTypeUrl - * @memberof google.protobuf.EnumValueOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - EnumValueOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.EnumValueOptions"; - }; - - return EnumValueOptions; - })(); - - protobuf.ServiceOptions = (function() { - - /** - * Properties of a ServiceOptions. - * @memberof google.protobuf - * @interface IServiceOptions - * @property {google.protobuf.IFeatureSet|null} [features] ServiceOptions features - * @property {boolean|null} [deprecated] ServiceOptions deprecated - * @property {Array.|null} [uninterpretedOption] ServiceOptions uninterpretedOption - * @property {string|null} [".google.api.defaultHost"] ServiceOptions .google.api.defaultHost - * @property {string|null} [".google.api.oauthScopes"] ServiceOptions .google.api.oauthScopes - * @property {string|null} [".google.api.apiVersion"] ServiceOptions .google.api.apiVersion - */ - - /** - * Constructs a new ServiceOptions. - * @memberof google.protobuf - * @classdesc Represents a ServiceOptions. - * @implements IServiceOptions - * @constructor - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - */ - function ServiceOptions(properties) { - this.uninterpretedOption = []; - 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]]; - } - - /** - * ServiceOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.features = null; - - /** - * ServiceOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.deprecated = false; - - /** - * ServiceOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * ServiceOptions .google.api.defaultHost. - * @member {string} .google.api.defaultHost - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.defaultHost"] = ""; - - /** - * ServiceOptions .google.api.oauthScopes. - * @member {string} .google.api.oauthScopes - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.oauthScopes"] = ""; - - /** - * ServiceOptions .google.api.apiVersion. - * @member {string} .google.api.apiVersion - * @memberof google.protobuf.ServiceOptions - * @instance - */ - ServiceOptions.prototype[".google.api.apiVersion"] = ""; - - /** - * Creates a new ServiceOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions=} [properties] Properties to set - * @returns {google.protobuf.ServiceOptions} ServiceOptions instance - */ - ServiceOptions.create = function create(properties) { - return new ServiceOptions(properties); - }; - - /** - * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 34, wireType 2 =*/274).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.defaultHost"] != null && Object.hasOwnProperty.call(message, ".google.api.defaultHost")) - writer.uint32(/* id 1049, wireType 2 =*/8394).string(message[".google.api.defaultHost"]); - if (message[".google.api.oauthScopes"] != null && Object.hasOwnProperty.call(message, ".google.api.oauthScopes")) - writer.uint32(/* id 1050, wireType 2 =*/8402).string(message[".google.api.oauthScopes"]); - if (message[".google.api.apiVersion"] != null && Object.hasOwnProperty.call(message, ".google.api.apiVersion")) - writer.uint32(/* id 525000001, wireType 2 =*/4200000010).string(message[".google.api.apiVersion"]); - return writer; - }; - - /** - * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 34: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 33: { - message.deprecated = reader.bool(); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 1049: { - message[".google.api.defaultHost"] = reader.string(); - break; - } - case 1050: { - message[".google.api.oauthScopes"] = reader.string(); - break; - } - case 525000001: { - message[".google.api.apiVersion"] = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.ServiceOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.ServiceOptions} ServiceOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ServiceOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ServiceOptions message. - * @function verify - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ServiceOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - if (!$util.isString(message[".google.api.defaultHost"])) - return ".google.api.defaultHost: string expected"; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - if (!$util.isString(message[".google.api.oauthScopes"])) - return ".google.api.oauthScopes: string expected"; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - if (!$util.isString(message[".google.api.apiVersion"])) - return ".google.api.apiVersion: string expected"; - return null; - }; - - /** - * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.ServiceOptions} ServiceOptions - */ - ServiceOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.ServiceOptions) - return object; - var message = new $root.google.protobuf.ServiceOptions(); - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.ServiceOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.defaultHost"] != null) - message[".google.api.defaultHost"] = String(object[".google.api.defaultHost"]); - if (object[".google.api.oauthScopes"] != null) - message[".google.api.oauthScopes"] = String(object[".google.api.oauthScopes"]); - if (object[".google.api.apiVersion"] != null) - message[".google.api.apiVersion"] = String(object[".google.api.apiVersion"]); - return message; - }; - - /** - * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.ServiceOptions - * @static - * @param {google.protobuf.ServiceOptions} message ServiceOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ServiceOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.uninterpretedOption = []; - if (options.defaults) { - object.deprecated = false; - object.features = null; - object[".google.api.defaultHost"] = ""; - object[".google.api.oauthScopes"] = ""; - object[".google.api.apiVersion"] = ""; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.defaultHost"] != null && message.hasOwnProperty(".google.api.defaultHost")) - object[".google.api.defaultHost"] = message[".google.api.defaultHost"]; - if (message[".google.api.oauthScopes"] != null && message.hasOwnProperty(".google.api.oauthScopes")) - object[".google.api.oauthScopes"] = message[".google.api.oauthScopes"]; - if (message[".google.api.apiVersion"] != null && message.hasOwnProperty(".google.api.apiVersion")) - object[".google.api.apiVersion"] = message[".google.api.apiVersion"]; - return object; - }; - - /** - * Converts this ServiceOptions to JSON. - * @function toJSON - * @memberof google.protobuf.ServiceOptions - * @instance - * @returns {Object.} JSON object - */ - ServiceOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ServiceOptions - * @function getTypeUrl - * @memberof google.protobuf.ServiceOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.ServiceOptions"; - }; - - return ServiceOptions; - })(); - - protobuf.MethodOptions = (function() { - - /** - * Properties of a MethodOptions. - * @memberof google.protobuf - * @interface IMethodOptions - * @property {boolean|null} [deprecated] MethodOptions deprecated - * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel - * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features - * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption - * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http - * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature - */ - - /** - * Constructs a new MethodOptions. - * @memberof google.protobuf - * @classdesc Represents a MethodOptions. - * @implements IMethodOptions - * @constructor - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - */ - function MethodOptions(properties) { - this.uninterpretedOption = []; - this[".google.api.methodSignature"] = []; - 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]]; - } - - /** - * MethodOptions deprecated. - * @member {boolean} deprecated - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.deprecated = false; - - /** - * MethodOptions idempotencyLevel. - * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.idempotencyLevel = 0; - - /** - * MethodOptions features. - * @member {google.protobuf.IFeatureSet|null|undefined} features - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.features = null; - - /** - * MethodOptions uninterpretedOption. - * @member {Array.} uninterpretedOption - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype.uninterpretedOption = $util.emptyArray; - - /** - * MethodOptions .google.api.http. - * @member {google.api.IHttpRule|null|undefined} .google.api.http - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.http"] = null; - - /** - * MethodOptions .google.api.methodSignature. - * @member {Array.} .google.api.methodSignature - * @memberof google.protobuf.MethodOptions - * @instance - */ - MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; - - /** - * Creates a new MethodOptions instance using the specified properties. - * @function create - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions=} [properties] Properties to set - * @returns {google.protobuf.MethodOptions} MethodOptions instance - */ - MethodOptions.create = function create(properties) { - return new MethodOptions(properties); - }; - - /** - * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encode - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) - writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); - if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) - writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); - if (message.features != null && Object.hasOwnProperty.call(message, "features")) - $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); - if (message.uninterpretedOption != null && message.uninterpretedOption.length) - for (var i = 0; i < message.uninterpretedOption.length; ++i) - $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); - if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); - if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) - $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 33: { - message.deprecated = reader.bool(); - break; - } - case 34: { - message.idempotencyLevel = reader.int32(); - break; - } - case 35: { - message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 999: { - if (!(message.uninterpretedOption && message.uninterpretedOption.length)) - message.uninterpretedOption = []; - message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); - break; - } - case 72295728: { - message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); - break; - } - case 1051: { - if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) - message[".google.api.methodSignature"] = []; - message[".google.api.methodSignature"].push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MethodOptions message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.MethodOptions - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.MethodOptions} MethodOptions - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MethodOptions.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a MethodOptions message. - * @function verify - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - MethodOptions.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - if (typeof message.deprecated !== "boolean") - return "deprecated: boolean expected"; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - switch (message.idempotencyLevel) { - default: - return "idempotencyLevel: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.features != null && message.hasOwnProperty("features")) { - var error = $root.google.protobuf.FeatureSet.verify(message.features); - if (error) - return "features." + error; - } - if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { - if (!Array.isArray(message.uninterpretedOption)) - return "uninterpretedOption: array expected"; - for (var i = 0; i < message.uninterpretedOption.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); - if (error) - return "uninterpretedOption." + error; - } - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { - var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); - if (error) - return ".google.api.http." + error; - } - if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { - if (!Array.isArray(message[".google.api.methodSignature"])) - return ".google.api.methodSignature: array expected"; - for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) - if (!$util.isString(message[".google.api.methodSignature"][i])) - return ".google.api.methodSignature: string[] expected"; - } - return null; - }; - - /** - * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.MethodOptions} MethodOptions - */ - MethodOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.MethodOptions) - return object; - var message = new $root.google.protobuf.MethodOptions(); - if (object.deprecated != null) - message.deprecated = Boolean(object.deprecated); - switch (object.idempotencyLevel) { - default: - if (typeof object.idempotencyLevel === "number") { - message.idempotencyLevel = object.idempotencyLevel; - break; - } - break; - case "IDEMPOTENCY_UNKNOWN": - case 0: - message.idempotencyLevel = 0; - break; - case "NO_SIDE_EFFECTS": - case 1: - message.idempotencyLevel = 1; - break; - case "IDEMPOTENT": - case 2: - message.idempotencyLevel = 2; - break; - } - if (object.features != null) { - if (typeof object.features !== "object") - throw TypeError(".google.protobuf.MethodOptions.features: object expected"); - message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); - } - if (object.uninterpretedOption) { - if (!Array.isArray(object.uninterpretedOption)) - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); - message.uninterpretedOption = []; - for (var i = 0; i < object.uninterpretedOption.length; ++i) { - if (typeof object.uninterpretedOption[i] !== "object") - throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); - message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); - } - } - if (object[".google.api.http"] != null) { - if (typeof object[".google.api.http"] !== "object") - throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); - message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); - } - if (object[".google.api.methodSignature"]) { - if (!Array.isArray(object[".google.api.methodSignature"])) - throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); - message[".google.api.methodSignature"] = []; - for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) - message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); - } - return message; - }; - - /** - * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.MethodOptions - * @static - * @param {google.protobuf.MethodOptions} message MethodOptions - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - MethodOptions.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.uninterpretedOption = []; - object[".google.api.methodSignature"] = []; - } - if (options.defaults) { - object.deprecated = false; - object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; - object.features = null; - object[".google.api.http"] = null; - } - if (message.deprecated != null && message.hasOwnProperty("deprecated")) - object.deprecated = message.deprecated; - if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) - object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; - if (message.features != null && message.hasOwnProperty("features")) - object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); - if (message.uninterpretedOption && message.uninterpretedOption.length) { - object.uninterpretedOption = []; - for (var j = 0; j < message.uninterpretedOption.length; ++j) - object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); - } - if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { - object[".google.api.methodSignature"] = []; - for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) - object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; - } - if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) - object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); - return object; - }; - - /** - * Converts this MethodOptions to JSON. - * @function toJSON - * @memberof google.protobuf.MethodOptions - * @instance - * @returns {Object.} JSON object - */ - MethodOptions.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MethodOptions - * @function getTypeUrl - * @memberof google.protobuf.MethodOptions - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.MethodOptions"; - }; - - /** - * IdempotencyLevel enum. - * @name google.protobuf.MethodOptions.IdempotencyLevel - * @enum {number} - * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value - * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value - * @property {number} IDEMPOTENT=2 IDEMPOTENT value - */ - MethodOptions.IdempotencyLevel = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; - values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; - values[valuesById[2] = "IDEMPOTENT"] = 2; - return values; - })(); - - return MethodOptions; - })(); - - protobuf.UninterpretedOption = (function() { - - /** - * Properties of an UninterpretedOption. - * @memberof google.protobuf - * @interface IUninterpretedOption - * @property {Array.|null} [name] UninterpretedOption name - * @property {string|null} [identifierValue] UninterpretedOption identifierValue - * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue - * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue - * @property {number|null} [doubleValue] UninterpretedOption doubleValue - * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue - * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue - */ - - /** - * Constructs a new UninterpretedOption. - * @memberof google.protobuf - * @classdesc Represents an UninterpretedOption. - * @implements IUninterpretedOption - * @constructor - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - */ - function UninterpretedOption(properties) { - this.name = []; - 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]]; - } - - /** - * UninterpretedOption name. - * @member {Array.} name - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.name = $util.emptyArray; - - /** - * UninterpretedOption identifierValue. - * @member {string} identifierValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.identifierValue = ""; - - /** - * UninterpretedOption positiveIntValue. - * @member {number|Long} positiveIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; - - /** - * UninterpretedOption negativeIntValue. - * @member {number|Long} negativeIntValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * UninterpretedOption doubleValue. - * @member {number} doubleValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.doubleValue = 0; - - /** - * UninterpretedOption stringValue. - * @member {Uint8Array} stringValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.stringValue = $util.newBuffer([]); - - /** - * UninterpretedOption aggregateValue. - * @member {string} aggregateValue - * @memberof google.protobuf.UninterpretedOption - * @instance - */ - UninterpretedOption.prototype.aggregateValue = ""; - - /** - * Creates a new UninterpretedOption instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance - */ - UninterpretedOption.create = function create(properties) { - return new UninterpretedOption(properties); - }; - - /** - * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && message.name.length) - for (var i = 0; i < message.name.length; ++i) - $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); - if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) - writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); - if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) - writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); - if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) - writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); - return writer; - }; - - /** - * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 2: { - if (!(message.name && message.name.length)) - message.name = []; - message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); - break; - } - case 3: { - message.identifierValue = reader.string(); - break; - } - case 4: { - message.positiveIntValue = reader.uint64(); - break; - } - case 5: { - message.negativeIntValue = reader.int64(); - break; - } - case 6: { - message.doubleValue = reader.double(); - break; - } - case 7: { - message.stringValue = reader.bytes(); - break; - } - case 8: { - message.aggregateValue = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an UninterpretedOption message. - * @function verify - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - UninterpretedOption.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) { - if (!Array.isArray(message.name)) - return "name: array expected"; - for (var i = 0; i < message.name.length; ++i) { - var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); - if (error) - return "name." + error; - } - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - if (!$util.isString(message.identifierValue)) - return "identifierValue: string expected"; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) - return "positiveIntValue: integer|Long expected"; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) - return "negativeIntValue: integer|Long expected"; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) - return "stringValue: buffer expected"; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - if (!$util.isString(message.aggregateValue)) - return "aggregateValue: string expected"; - return null; - }; - - /** - * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption} UninterpretedOption - */ - UninterpretedOption.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption) - return object; - var message = new $root.google.protobuf.UninterpretedOption(); - if (object.name) { - if (!Array.isArray(object.name)) - throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); - message.name = []; - for (var i = 0; i < object.name.length; ++i) { - if (typeof object.name[i] !== "object") - throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); - message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); - } - } - if (object.identifierValue != null) - message.identifierValue = String(object.identifierValue); - if (object.positiveIntValue != null) - if ($util.Long) - (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; - else if (typeof object.positiveIntValue === "string") - message.positiveIntValue = parseInt(object.positiveIntValue, 10); - else if (typeof object.positiveIntValue === "number") - message.positiveIntValue = object.positiveIntValue; - else if (typeof object.positiveIntValue === "object") - message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); - if (object.negativeIntValue != null) - if ($util.Long) - (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; - else if (typeof object.negativeIntValue === "string") - message.negativeIntValue = parseInt(object.negativeIntValue, 10); - else if (typeof object.negativeIntValue === "number") - message.negativeIntValue = object.negativeIntValue; - else if (typeof object.negativeIntValue === "object") - message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - if (object.stringValue != null) - if (typeof object.stringValue === "string") - $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); - else if (object.stringValue.length >= 0) - message.stringValue = object.stringValue; - if (object.aggregateValue != null) - message.aggregateValue = String(object.aggregateValue); - return message; - }; - - /** - * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {google.protobuf.UninterpretedOption} message UninterpretedOption - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - UninterpretedOption.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.name = []; - if (options.defaults) { - object.identifierValue = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, true); - object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.positiveIntValue = options.longs === String ? "0" : 0; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.negativeIntValue = options.longs === String ? "0" : 0; - object.doubleValue = 0; - if (options.bytes === String) - object.stringValue = ""; - else { - object.stringValue = []; - if (options.bytes !== Array) - object.stringValue = $util.newBuffer(object.stringValue); - } - object.aggregateValue = ""; - } - if (message.name && message.name.length) { - object.name = []; - for (var j = 0; j < message.name.length; ++j) - object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); - } - if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) - object.identifierValue = message.identifierValue; - if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) - if (typeof message.positiveIntValue === "number") - object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; - else - object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; - if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) - if (typeof message.negativeIntValue === "number") - object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; - else - object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (message.stringValue != null && message.hasOwnProperty("stringValue")) - object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; - if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) - object.aggregateValue = message.aggregateValue; - return object; - }; - - /** - * Converts this UninterpretedOption to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption - * @instance - * @returns {Object.} JSON object - */ - UninterpretedOption.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for UninterpretedOption - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; - }; - - UninterpretedOption.NamePart = (function() { - - /** - * Properties of a NamePart. - * @memberof google.protobuf.UninterpretedOption - * @interface INamePart - * @property {string} namePart NamePart namePart - * @property {boolean} isExtension NamePart isExtension - */ - - /** - * Constructs a new NamePart. - * @memberof google.protobuf.UninterpretedOption - * @classdesc Represents a NamePart. - * @implements INamePart - * @constructor - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - */ - function NamePart(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]]; - } - - /** - * NamePart namePart. - * @member {string} namePart - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.namePart = ""; - - /** - * NamePart isExtension. - * @member {boolean} isExtension - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - */ - NamePart.prototype.isExtension = false; - - /** - * Creates a new NamePart instance using the specified properties. - * @function create - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance - */ - NamePart.create = function create(properties) { - return new NamePart(properties); - }; - - /** - * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); - return writer; - }; - - /** - * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - NamePart.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a NamePart message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.namePart = reader.string(); - break; - } - case 2: { - message.isExtension = reader.bool(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - if (!message.hasOwnProperty("namePart")) - throw $util.ProtocolError("missing required 'namePart'", { instance: message }); - if (!message.hasOwnProperty("isExtension")) - throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); - return message; - }; - - /** - * Decodes a NamePart message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - NamePart.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a NamePart message. - * @function verify - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - NamePart.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (!$util.isString(message.namePart)) - return "namePart: string expected"; - if (typeof message.isExtension !== "boolean") - return "isExtension: boolean expected"; - return null; - }; - - /** - * Creates a NamePart message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart - */ - NamePart.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) - return object; - var message = new $root.google.protobuf.UninterpretedOption.NamePart(); - if (object.namePart != null) - message.namePart = String(object.namePart); - if (object.isExtension != null) - message.isExtension = Boolean(object.isExtension); - return message; - }; - - /** - * Creates a plain object from a NamePart message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - NamePart.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.namePart = ""; - object.isExtension = false; - } - if (message.namePart != null && message.hasOwnProperty("namePart")) - object.namePart = message.namePart; - if (message.isExtension != null && message.hasOwnProperty("isExtension")) - object.isExtension = message.isExtension; - return object; - }; - - /** - * Converts this NamePart to JSON. - * @function toJSON - * @memberof google.protobuf.UninterpretedOption.NamePart - * @instance - * @returns {Object.} JSON object - */ - NamePart.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for NamePart - * @function getTypeUrl - * @memberof google.protobuf.UninterpretedOption.NamePart - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; - }; - - return NamePart; - })(); - - return UninterpretedOption; - })(); - - protobuf.FeatureSet = (function() { - - /** - * Properties of a FeatureSet. - * @memberof google.protobuf - * @interface IFeatureSet - * @property {google.protobuf.FeatureSet.FieldPresence|null} [fieldPresence] FeatureSet fieldPresence - * @property {google.protobuf.FeatureSet.EnumType|null} [enumType] FeatureSet enumType - * @property {google.protobuf.FeatureSet.RepeatedFieldEncoding|null} [repeatedFieldEncoding] FeatureSet repeatedFieldEncoding - * @property {google.protobuf.FeatureSet.Utf8Validation|null} [utf8Validation] FeatureSet utf8Validation - * @property {google.protobuf.FeatureSet.MessageEncoding|null} [messageEncoding] FeatureSet messageEncoding - * @property {google.protobuf.FeatureSet.JsonFormat|null} [jsonFormat] FeatureSet jsonFormat - * @property {google.protobuf.FeatureSet.EnforceNamingStyle|null} [enforceNamingStyle] FeatureSet enforceNamingStyle - * @property {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility|null} [defaultSymbolVisibility] FeatureSet defaultSymbolVisibility - */ - - /** - * Constructs a new FeatureSet. - * @memberof google.protobuf - * @classdesc Represents a FeatureSet. - * @implements IFeatureSet - * @constructor - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - */ - function FeatureSet(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]]; - } - - /** - * FeatureSet fieldPresence. - * @member {google.protobuf.FeatureSet.FieldPresence} fieldPresence - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.fieldPresence = 0; - - /** - * FeatureSet enumType. - * @member {google.protobuf.FeatureSet.EnumType} enumType - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enumType = 0; - - /** - * FeatureSet repeatedFieldEncoding. - * @member {google.protobuf.FeatureSet.RepeatedFieldEncoding} repeatedFieldEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.repeatedFieldEncoding = 0; - - /** - * FeatureSet utf8Validation. - * @member {google.protobuf.FeatureSet.Utf8Validation} utf8Validation - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.utf8Validation = 0; - - /** - * FeatureSet messageEncoding. - * @member {google.protobuf.FeatureSet.MessageEncoding} messageEncoding - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.messageEncoding = 0; - - /** - * FeatureSet jsonFormat. - * @member {google.protobuf.FeatureSet.JsonFormat} jsonFormat - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.jsonFormat = 0; - - /** - * FeatureSet enforceNamingStyle. - * @member {google.protobuf.FeatureSet.EnforceNamingStyle} enforceNamingStyle - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.enforceNamingStyle = 0; - - /** - * FeatureSet defaultSymbolVisibility. - * @member {google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility} defaultSymbolVisibility - * @memberof google.protobuf.FeatureSet - * @instance - */ - FeatureSet.prototype.defaultSymbolVisibility = 0; - - /** - * Creates a new FeatureSet instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet} FeatureSet instance - */ - FeatureSet.create = function create(properties) { - return new FeatureSet(properties); - }; - - /** - * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldPresence != null && Object.hasOwnProperty.call(message, "fieldPresence")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.fieldPresence); - if (message.enumType != null && Object.hasOwnProperty.call(message, "enumType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.enumType); - if (message.repeatedFieldEncoding != null && Object.hasOwnProperty.call(message, "repeatedFieldEncoding")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.repeatedFieldEncoding); - if (message.utf8Validation != null && Object.hasOwnProperty.call(message, "utf8Validation")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.utf8Validation); - if (message.messageEncoding != null && Object.hasOwnProperty.call(message, "messageEncoding")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.messageEncoding); - if (message.jsonFormat != null && Object.hasOwnProperty.call(message, "jsonFormat")) - writer.uint32(/* id 6, wireType 0 =*/48).int32(message.jsonFormat); - if (message.enforceNamingStyle != null && Object.hasOwnProperty.call(message, "enforceNamingStyle")) - writer.uint32(/* id 7, wireType 0 =*/56).int32(message.enforceNamingStyle); - if (message.defaultSymbolVisibility != null && Object.hasOwnProperty.call(message, "defaultSymbolVisibility")) - writer.uint32(/* id 8, wireType 0 =*/64).int32(message.defaultSymbolVisibility); - return writer; - }; - - /** - * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.IFeatureSet} message FeatureSet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.fieldPresence = reader.int32(); - break; - } - case 2: { - message.enumType = reader.int32(); - break; - } - case 3: { - message.repeatedFieldEncoding = reader.int32(); - break; - } - case 4: { - message.utf8Validation = reader.int32(); - break; - } - case 5: { - message.messageEncoding = reader.int32(); - break; - } - case 6: { - message.jsonFormat = reader.int32(); - break; - } - case 7: { - message.enforceNamingStyle = reader.int32(); - break; - } - case 8: { - message.defaultSymbolVisibility = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet} FeatureSet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSet message. - * @function verify - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - switch (message.fieldPresence) { - default: - return "fieldPresence: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.enumType != null && message.hasOwnProperty("enumType")) - switch (message.enumType) { - default: - return "enumType: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - switch (message.repeatedFieldEncoding) { - default: - return "repeatedFieldEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - switch (message.utf8Validation) { - default: - return "utf8Validation: enum value expected"; - case 0: - case 2: - case 3: - break; - } - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - switch (message.messageEncoding) { - default: - return "messageEncoding: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - switch (message.jsonFormat) { - default: - return "jsonFormat: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) - switch (message.enforceNamingStyle) { - default: - return "enforceNamingStyle: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) - switch (message.defaultSymbolVisibility) { - default: - return "defaultSymbolVisibility: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - return null; - }; - - /** - * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet} FeatureSet - */ - FeatureSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet) - return object; - var message = new $root.google.protobuf.FeatureSet(); - switch (object.fieldPresence) { - default: - if (typeof object.fieldPresence === "number") { - message.fieldPresence = object.fieldPresence; - break; - } - break; - case "FIELD_PRESENCE_UNKNOWN": - case 0: - message.fieldPresence = 0; - break; - case "EXPLICIT": - case 1: - message.fieldPresence = 1; - break; - case "IMPLICIT": - case 2: - message.fieldPresence = 2; - break; - case "LEGACY_REQUIRED": - case 3: - message.fieldPresence = 3; - break; - } - switch (object.enumType) { - default: - if (typeof object.enumType === "number") { - message.enumType = object.enumType; - break; - } - break; - case "ENUM_TYPE_UNKNOWN": - case 0: - message.enumType = 0; - break; - case "OPEN": - case 1: - message.enumType = 1; - break; - case "CLOSED": - case 2: - message.enumType = 2; - break; - } - switch (object.repeatedFieldEncoding) { - default: - if (typeof object.repeatedFieldEncoding === "number") { - message.repeatedFieldEncoding = object.repeatedFieldEncoding; - break; - } - break; - case "REPEATED_FIELD_ENCODING_UNKNOWN": - case 0: - message.repeatedFieldEncoding = 0; - break; - case "PACKED": - case 1: - message.repeatedFieldEncoding = 1; - break; - case "EXPANDED": - case 2: - message.repeatedFieldEncoding = 2; - break; - } - switch (object.utf8Validation) { - default: - if (typeof object.utf8Validation === "number") { - message.utf8Validation = object.utf8Validation; - break; - } - break; - case "UTF8_VALIDATION_UNKNOWN": - case 0: - message.utf8Validation = 0; - break; - case "VERIFY": - case 2: - message.utf8Validation = 2; - break; - case "NONE": - case 3: - message.utf8Validation = 3; - break; - } - switch (object.messageEncoding) { - default: - if (typeof object.messageEncoding === "number") { - message.messageEncoding = object.messageEncoding; - break; - } - break; - case "MESSAGE_ENCODING_UNKNOWN": - case 0: - message.messageEncoding = 0; - break; - case "LENGTH_PREFIXED": - case 1: - message.messageEncoding = 1; - break; - case "DELIMITED": - case 2: - message.messageEncoding = 2; - break; - } - switch (object.jsonFormat) { - default: - if (typeof object.jsonFormat === "number") { - message.jsonFormat = object.jsonFormat; - break; - } - break; - case "JSON_FORMAT_UNKNOWN": - case 0: - message.jsonFormat = 0; - break; - case "ALLOW": - case 1: - message.jsonFormat = 1; - break; - case "LEGACY_BEST_EFFORT": - case 2: - message.jsonFormat = 2; - break; - } - switch (object.enforceNamingStyle) { - default: - if (typeof object.enforceNamingStyle === "number") { - message.enforceNamingStyle = object.enforceNamingStyle; - break; - } - break; - case "ENFORCE_NAMING_STYLE_UNKNOWN": - case 0: - message.enforceNamingStyle = 0; - break; - case "STYLE2024": - case 1: - message.enforceNamingStyle = 1; - break; - case "STYLE_LEGACY": - case 2: - message.enforceNamingStyle = 2; - break; - } - switch (object.defaultSymbolVisibility) { - default: - if (typeof object.defaultSymbolVisibility === "number") { - message.defaultSymbolVisibility = object.defaultSymbolVisibility; - break; - } - break; - case "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": - case 0: - message.defaultSymbolVisibility = 0; - break; - case "EXPORT_ALL": - case 1: - message.defaultSymbolVisibility = 1; - break; - case "EXPORT_TOP_LEVEL": - case 2: - message.defaultSymbolVisibility = 2; - break; - case "LOCAL_ALL": - case 3: - message.defaultSymbolVisibility = 3; - break; - case "STRICT": - case 4: - message.defaultSymbolVisibility = 4; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet - * @static - * @param {google.protobuf.FeatureSet} message FeatureSet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.fieldPresence = options.enums === String ? "FIELD_PRESENCE_UNKNOWN" : 0; - object.enumType = options.enums === String ? "ENUM_TYPE_UNKNOWN" : 0; - object.repeatedFieldEncoding = options.enums === String ? "REPEATED_FIELD_ENCODING_UNKNOWN" : 0; - object.utf8Validation = options.enums === String ? "UTF8_VALIDATION_UNKNOWN" : 0; - object.messageEncoding = options.enums === String ? "MESSAGE_ENCODING_UNKNOWN" : 0; - object.jsonFormat = options.enums === String ? "JSON_FORMAT_UNKNOWN" : 0; - object.enforceNamingStyle = options.enums === String ? "ENFORCE_NAMING_STYLE_UNKNOWN" : 0; - object.defaultSymbolVisibility = options.enums === String ? "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN" : 0; - } - if (message.fieldPresence != null && message.hasOwnProperty("fieldPresence")) - object.fieldPresence = options.enums === String ? $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] === undefined ? message.fieldPresence : $root.google.protobuf.FeatureSet.FieldPresence[message.fieldPresence] : message.fieldPresence; - if (message.enumType != null && message.hasOwnProperty("enumType")) - object.enumType = options.enums === String ? $root.google.protobuf.FeatureSet.EnumType[message.enumType] === undefined ? message.enumType : $root.google.protobuf.FeatureSet.EnumType[message.enumType] : message.enumType; - if (message.repeatedFieldEncoding != null && message.hasOwnProperty("repeatedFieldEncoding")) - object.repeatedFieldEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] === undefined ? message.repeatedFieldEncoding : $root.google.protobuf.FeatureSet.RepeatedFieldEncoding[message.repeatedFieldEncoding] : message.repeatedFieldEncoding; - if (message.utf8Validation != null && message.hasOwnProperty("utf8Validation")) - object.utf8Validation = options.enums === String ? $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] === undefined ? message.utf8Validation : $root.google.protobuf.FeatureSet.Utf8Validation[message.utf8Validation] : message.utf8Validation; - if (message.messageEncoding != null && message.hasOwnProperty("messageEncoding")) - object.messageEncoding = options.enums === String ? $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] === undefined ? message.messageEncoding : $root.google.protobuf.FeatureSet.MessageEncoding[message.messageEncoding] : message.messageEncoding; - if (message.jsonFormat != null && message.hasOwnProperty("jsonFormat")) - object.jsonFormat = options.enums === String ? $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] === undefined ? message.jsonFormat : $root.google.protobuf.FeatureSet.JsonFormat[message.jsonFormat] : message.jsonFormat; - if (message.enforceNamingStyle != null && message.hasOwnProperty("enforceNamingStyle")) - object.enforceNamingStyle = options.enums === String ? $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] === undefined ? message.enforceNamingStyle : $root.google.protobuf.FeatureSet.EnforceNamingStyle[message.enforceNamingStyle] : message.enforceNamingStyle; - if (message.defaultSymbolVisibility != null && message.hasOwnProperty("defaultSymbolVisibility")) - object.defaultSymbolVisibility = options.enums === String ? $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] === undefined ? message.defaultSymbolVisibility : $root.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[message.defaultSymbolVisibility] : message.defaultSymbolVisibility; - return object; - }; - - /** - * Converts this FeatureSet to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet - * @instance - * @returns {Object.} JSON object - */ - FeatureSet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSet - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet"; - }; - - /** - * FieldPresence enum. - * @name google.protobuf.FeatureSet.FieldPresence - * @enum {number} - * @property {number} FIELD_PRESENCE_UNKNOWN=0 FIELD_PRESENCE_UNKNOWN value - * @property {number} EXPLICIT=1 EXPLICIT value - * @property {number} IMPLICIT=2 IMPLICIT value - * @property {number} LEGACY_REQUIRED=3 LEGACY_REQUIRED value - */ - FeatureSet.FieldPresence = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "FIELD_PRESENCE_UNKNOWN"] = 0; - values[valuesById[1] = "EXPLICIT"] = 1; - values[valuesById[2] = "IMPLICIT"] = 2; - values[valuesById[3] = "LEGACY_REQUIRED"] = 3; - return values; - })(); - - /** - * EnumType enum. - * @name google.protobuf.FeatureSet.EnumType - * @enum {number} - * @property {number} ENUM_TYPE_UNKNOWN=0 ENUM_TYPE_UNKNOWN value - * @property {number} OPEN=1 OPEN value - * @property {number} CLOSED=2 CLOSED value - */ - FeatureSet.EnumType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENUM_TYPE_UNKNOWN"] = 0; - values[valuesById[1] = "OPEN"] = 1; - values[valuesById[2] = "CLOSED"] = 2; - return values; - })(); - - /** - * RepeatedFieldEncoding enum. - * @name google.protobuf.FeatureSet.RepeatedFieldEncoding - * @enum {number} - * @property {number} REPEATED_FIELD_ENCODING_UNKNOWN=0 REPEATED_FIELD_ENCODING_UNKNOWN value - * @property {number} PACKED=1 PACKED value - * @property {number} EXPANDED=2 EXPANDED value - */ - FeatureSet.RepeatedFieldEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "REPEATED_FIELD_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "PACKED"] = 1; - values[valuesById[2] = "EXPANDED"] = 2; - return values; - })(); - - /** - * Utf8Validation enum. - * @name google.protobuf.FeatureSet.Utf8Validation - * @enum {number} - * @property {number} UTF8_VALIDATION_UNKNOWN=0 UTF8_VALIDATION_UNKNOWN value - * @property {number} VERIFY=2 VERIFY value - * @property {number} NONE=3 NONE value - */ - FeatureSet.Utf8Validation = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "UTF8_VALIDATION_UNKNOWN"] = 0; - values[valuesById[2] = "VERIFY"] = 2; - values[valuesById[3] = "NONE"] = 3; - return values; - })(); - - /** - * MessageEncoding enum. - * @name google.protobuf.FeatureSet.MessageEncoding - * @enum {number} - * @property {number} MESSAGE_ENCODING_UNKNOWN=0 MESSAGE_ENCODING_UNKNOWN value - * @property {number} LENGTH_PREFIXED=1 LENGTH_PREFIXED value - * @property {number} DELIMITED=2 DELIMITED value - */ - FeatureSet.MessageEncoding = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MESSAGE_ENCODING_UNKNOWN"] = 0; - values[valuesById[1] = "LENGTH_PREFIXED"] = 1; - values[valuesById[2] = "DELIMITED"] = 2; - return values; - })(); - - /** - * JsonFormat enum. - * @name google.protobuf.FeatureSet.JsonFormat - * @enum {number} - * @property {number} JSON_FORMAT_UNKNOWN=0 JSON_FORMAT_UNKNOWN value - * @property {number} ALLOW=1 ALLOW value - * @property {number} LEGACY_BEST_EFFORT=2 LEGACY_BEST_EFFORT value - */ - FeatureSet.JsonFormat = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "JSON_FORMAT_UNKNOWN"] = 0; - values[valuesById[1] = "ALLOW"] = 1; - values[valuesById[2] = "LEGACY_BEST_EFFORT"] = 2; - return values; - })(); - - /** - * EnforceNamingStyle enum. - * @name google.protobuf.FeatureSet.EnforceNamingStyle - * @enum {number} - * @property {number} ENFORCE_NAMING_STYLE_UNKNOWN=0 ENFORCE_NAMING_STYLE_UNKNOWN value - * @property {number} STYLE2024=1 STYLE2024 value - * @property {number} STYLE_LEGACY=2 STYLE_LEGACY value - */ - FeatureSet.EnforceNamingStyle = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "ENFORCE_NAMING_STYLE_UNKNOWN"] = 0; - values[valuesById[1] = "STYLE2024"] = 1; - values[valuesById[2] = "STYLE_LEGACY"] = 2; - return values; - })(); - - FeatureSet.VisibilityFeature = (function() { - - /** - * Properties of a VisibilityFeature. - * @memberof google.protobuf.FeatureSet - * @interface IVisibilityFeature - */ - - /** - * Constructs a new VisibilityFeature. - * @memberof google.protobuf.FeatureSet - * @classdesc Represents a VisibilityFeature. - * @implements IVisibilityFeature - * @constructor - * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set - */ - function VisibilityFeature(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 VisibilityFeature instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {google.protobuf.FeatureSet.IVisibilityFeature=} [properties] Properties to set - * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature instance - */ - VisibilityFeature.create = function create(properties) { - return new VisibilityFeature(properties); - }; - - /** - * Encodes the specified VisibilityFeature message. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VisibilityFeature.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified VisibilityFeature message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.VisibilityFeature.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {google.protobuf.FeatureSet.IVisibilityFeature} message VisibilityFeature message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - VisibilityFeature.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a VisibilityFeature message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VisibilityFeature.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSet.VisibilityFeature(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a VisibilityFeature message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - VisibilityFeature.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a VisibilityFeature message. - * @function verify - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - VisibilityFeature.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates a VisibilityFeature message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSet.VisibilityFeature} VisibilityFeature - */ - VisibilityFeature.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSet.VisibilityFeature) - return object; - return new $root.google.protobuf.FeatureSet.VisibilityFeature(); - }; - - /** - * Creates a plain object from a VisibilityFeature message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {google.protobuf.FeatureSet.VisibilityFeature} message VisibilityFeature - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - VisibilityFeature.toObject = function toObject() { - return {}; - }; - - /** - * Converts this VisibilityFeature to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @instance - * @returns {Object.} JSON object - */ - VisibilityFeature.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for VisibilityFeature - * @function getTypeUrl - * @memberof google.protobuf.FeatureSet.VisibilityFeature - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - VisibilityFeature.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSet.VisibilityFeature"; - }; - - /** - * DefaultSymbolVisibility enum. - * @name google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility - * @enum {number} - * @property {number} DEFAULT_SYMBOL_VISIBILITY_UNKNOWN=0 DEFAULT_SYMBOL_VISIBILITY_UNKNOWN value - * @property {number} EXPORT_ALL=1 EXPORT_ALL value - * @property {number} EXPORT_TOP_LEVEL=2 EXPORT_TOP_LEVEL value - * @property {number} LOCAL_ALL=3 LOCAL_ALL value - * @property {number} STRICT=4 STRICT value - */ - VisibilityFeature.DefaultSymbolVisibility = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"] = 0; - values[valuesById[1] = "EXPORT_ALL"] = 1; - values[valuesById[2] = "EXPORT_TOP_LEVEL"] = 2; - values[valuesById[3] = "LOCAL_ALL"] = 3; - values[valuesById[4] = "STRICT"] = 4; - return values; - })(); - - return VisibilityFeature; - })(); - - return FeatureSet; - })(); - - protobuf.FeatureSetDefaults = (function() { - - /** - * Properties of a FeatureSetDefaults. - * @memberof google.protobuf - * @interface IFeatureSetDefaults - * @property {Array.|null} [defaults] FeatureSetDefaults defaults - * @property {google.protobuf.Edition|null} [minimumEdition] FeatureSetDefaults minimumEdition - * @property {google.protobuf.Edition|null} [maximumEdition] FeatureSetDefaults maximumEdition - */ - - /** - * Constructs a new FeatureSetDefaults. - * @memberof google.protobuf - * @classdesc Represents a FeatureSetDefaults. - * @implements IFeatureSetDefaults - * @constructor - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - */ - function FeatureSetDefaults(properties) { - this.defaults = []; - 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]]; - } - - /** - * FeatureSetDefaults defaults. - * @member {Array.} defaults - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.defaults = $util.emptyArray; - - /** - * FeatureSetDefaults minimumEdition. - * @member {google.protobuf.Edition} minimumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.minimumEdition = 0; - - /** - * FeatureSetDefaults maximumEdition. - * @member {google.protobuf.Edition} maximumEdition - * @memberof google.protobuf.FeatureSetDefaults - * @instance - */ - FeatureSetDefaults.prototype.maximumEdition = 0; - - /** - * Creates a new FeatureSetDefaults instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults instance - */ - FeatureSetDefaults.create = function create(properties) { - return new FeatureSetDefaults(properties); - }; - - /** - * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.defaults != null && message.defaults.length) - for (var i = 0; i < message.defaults.length; ++i) - $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(message.defaults[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.minimumEdition != null && Object.hasOwnProperty.call(message, "minimumEdition")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.minimumEdition); - if (message.maximumEdition != null && Object.hasOwnProperty.call(message, "maximumEdition")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.maximumEdition); - return writer; - }; - - /** - * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.IFeatureSetDefaults} message FeatureSetDefaults message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetDefaults.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.defaults && message.defaults.length)) - message.defaults = []; - message.defaults.push($root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(reader, reader.uint32())); - break; - } - case 4: { - message.minimumEdition = reader.int32(); - break; - } - case 5: { - message.maximumEdition = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetDefaults.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetDefaults message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetDefaults.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.defaults != null && message.hasOwnProperty("defaults")) { - if (!Array.isArray(message.defaults)) - return "defaults: array expected"; - for (var i = 0; i < message.defaults.length; ++i) { - var error = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(message.defaults[i]); - if (error) - return "defaults." + error; - } - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - switch (message.minimumEdition) { - default: - return "minimumEdition: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - switch (message.maximumEdition) { - default: - return "maximumEdition: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - return null; - }; - - /** - * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults} FeatureSetDefaults - */ - FeatureSetDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults(); - if (object.defaults) { - if (!Array.isArray(object.defaults)) - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected"); - message.defaults = []; - for (var i = 0; i < object.defaults.length; ++i) { - if (typeof object.defaults[i] !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected"); - message.defaults[i] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(object.defaults[i]); - } - } - switch (object.minimumEdition) { - default: - if (typeof object.minimumEdition === "number") { - message.minimumEdition = object.minimumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.minimumEdition = 0; - break; - case "EDITION_LEGACY": - case 900: - message.minimumEdition = 900; - break; - case "EDITION_PROTO2": - case 998: - message.minimumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.minimumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.minimumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.minimumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.minimumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.minimumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.minimumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.minimumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.minimumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.minimumEdition = 2147483647; - break; - } - switch (object.maximumEdition) { - default: - if (typeof object.maximumEdition === "number") { - message.maximumEdition = object.maximumEdition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.maximumEdition = 0; - break; - case "EDITION_LEGACY": - case 900: - message.maximumEdition = 900; - break; - case "EDITION_PROTO2": - case 998: - message.maximumEdition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.maximumEdition = 999; - break; - case "EDITION_2023": - case 1000: - message.maximumEdition = 1000; - break; - case "EDITION_2024": - case 1001: - message.maximumEdition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.maximumEdition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.maximumEdition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.maximumEdition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.maximumEdition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.maximumEdition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.maximumEdition = 2147483647; - break; - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {google.protobuf.FeatureSetDefaults} message FeatureSetDefaults - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetDefaults.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.defaults = []; - if (options.defaults) { - object.minimumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.maximumEdition = options.enums === String ? "EDITION_UNKNOWN" : 0; - } - if (message.defaults && message.defaults.length) { - object.defaults = []; - for (var j = 0; j < message.defaults.length; ++j) - object.defaults[j] = $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(message.defaults[j], options); - } - if (message.minimumEdition != null && message.hasOwnProperty("minimumEdition")) - object.minimumEdition = options.enums === String ? $root.google.protobuf.Edition[message.minimumEdition] === undefined ? message.minimumEdition : $root.google.protobuf.Edition[message.minimumEdition] : message.minimumEdition; - if (message.maximumEdition != null && message.hasOwnProperty("maximumEdition")) - object.maximumEdition = options.enums === String ? $root.google.protobuf.Edition[message.maximumEdition] === undefined ? message.maximumEdition : $root.google.protobuf.Edition[message.maximumEdition] : message.maximumEdition; - return object; - }; - - /** - * Converts this FeatureSetDefaults to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults - * @instance - * @returns {Object.} JSON object - */ - FeatureSetDefaults.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetDefaults - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults"; - }; - - FeatureSetDefaults.FeatureSetEditionDefault = (function() { - - /** - * Properties of a FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @interface IFeatureSetEditionDefault - * @property {google.protobuf.Edition|null} [edition] FeatureSetEditionDefault edition - * @property {google.protobuf.IFeatureSet|null} [overridableFeatures] FeatureSetEditionDefault overridableFeatures - * @property {google.protobuf.IFeatureSet|null} [fixedFeatures] FeatureSetEditionDefault fixedFeatures - */ - - /** - * Constructs a new FeatureSetEditionDefault. - * @memberof google.protobuf.FeatureSetDefaults - * @classdesc Represents a FeatureSetEditionDefault. - * @implements IFeatureSetEditionDefault - * @constructor - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - */ - function FeatureSetEditionDefault(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]]; - } - - /** - * FeatureSetEditionDefault edition. - * @member {google.protobuf.Edition} edition - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.edition = 0; - - /** - * FeatureSetEditionDefault overridableFeatures. - * @member {google.protobuf.IFeatureSet|null|undefined} overridableFeatures - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.overridableFeatures = null; - - /** - * FeatureSetEditionDefault fixedFeatures. - * @member {google.protobuf.IFeatureSet|null|undefined} fixedFeatures - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - */ - FeatureSetEditionDefault.prototype.fixedFeatures = null; - - /** - * Creates a new FeatureSetEditionDefault instance using the specified properties. - * @function create - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault=} [properties] Properties to set - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault instance - */ - FeatureSetEditionDefault.create = function create(properties) { - return new FeatureSetEditionDefault(properties); - }; - - /** - * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.edition); - if (message.overridableFeatures != null && Object.hasOwnProperty.call(message, "overridableFeatures")) - $root.google.protobuf.FeatureSet.encode(message.overridableFeatures, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.fixedFeatures != null && Object.hasOwnProperty.call(message, "fixedFeatures")) - $root.google.protobuf.FeatureSet.encode(message.fixedFeatures, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault} message FeatureSetEditionDefault message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FeatureSetEditionDefault.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 3: { - message.edition = reader.int32(); - break; - } - case 4: { - message.overridableFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - case 5: { - message.fixedFeatures = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FeatureSetEditionDefault.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FeatureSetEditionDefault message. - * @function verify - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FeatureSetEditionDefault.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.edition != null && message.hasOwnProperty("edition")) - switch (message.edition) { - default: - return "edition: enum value expected"; - case 0: - case 900: - case 998: - case 999: - case 1000: - case 1001: - case 1: - case 2: - case 99997: - case 99998: - case 99999: - case 2147483647: - break; - } - if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) { - var error = $root.google.protobuf.FeatureSet.verify(message.overridableFeatures); - if (error) - return "overridableFeatures." + error; - } - if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) { - var error = $root.google.protobuf.FeatureSet.verify(message.fixedFeatures); - if (error) - return "fixedFeatures." + error; - } - return null; - }; - - /** - * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} FeatureSetEditionDefault - */ - FeatureSetEditionDefault.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault) - return object; - var message = new $root.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault(); - switch (object.edition) { - default: - if (typeof object.edition === "number") { - message.edition = object.edition; - break; - } - break; - case "EDITION_UNKNOWN": - case 0: - message.edition = 0; - break; - case "EDITION_LEGACY": - case 900: - message.edition = 900; - break; - case "EDITION_PROTO2": - case 998: - message.edition = 998; - break; - case "EDITION_PROTO3": - case 999: - message.edition = 999; - break; - case "EDITION_2023": - case 1000: - message.edition = 1000; - break; - case "EDITION_2024": - case 1001: - message.edition = 1001; - break; - case "EDITION_1_TEST_ONLY": - case 1: - message.edition = 1; - break; - case "EDITION_2_TEST_ONLY": - case 2: - message.edition = 2; - break; - case "EDITION_99997_TEST_ONLY": - case 99997: - message.edition = 99997; - break; - case "EDITION_99998_TEST_ONLY": - case 99998: - message.edition = 99998; - break; - case "EDITION_99999_TEST_ONLY": - case 99999: - message.edition = 99999; - break; - case "EDITION_MAX": - case 2147483647: - message.edition = 2147483647; - break; - } - if (object.overridableFeatures != null) { - if (typeof object.overridableFeatures !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected"); - message.overridableFeatures = $root.google.protobuf.FeatureSet.fromObject(object.overridableFeatures); - } - if (object.fixedFeatures != null) { - if (typeof object.fixedFeatures !== "object") - throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected"); - message.fixedFeatures = $root.google.protobuf.FeatureSet.fromObject(object.fixedFeatures); - } - return message; - }; - - /** - * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault} message FeatureSetEditionDefault - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FeatureSetEditionDefault.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.edition = options.enums === String ? "EDITION_UNKNOWN" : 0; - object.overridableFeatures = null; - object.fixedFeatures = null; - } - if (message.edition != null && message.hasOwnProperty("edition")) - object.edition = options.enums === String ? $root.google.protobuf.Edition[message.edition] === undefined ? message.edition : $root.google.protobuf.Edition[message.edition] : message.edition; - if (message.overridableFeatures != null && message.hasOwnProperty("overridableFeatures")) - object.overridableFeatures = $root.google.protobuf.FeatureSet.toObject(message.overridableFeatures, options); - if (message.fixedFeatures != null && message.hasOwnProperty("fixedFeatures")) - object.fixedFeatures = $root.google.protobuf.FeatureSet.toObject(message.fixedFeatures, options); - return object; - }; - - /** - * Converts this FeatureSetEditionDefault to JSON. - * @function toJSON - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @instance - * @returns {Object.} JSON object - */ - FeatureSetEditionDefault.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FeatureSetEditionDefault - * @function getTypeUrl - * @memberof google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FeatureSetEditionDefault.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"; - }; - - return FeatureSetEditionDefault; - })(); - - return FeatureSetDefaults; - })(); - - protobuf.SourceCodeInfo = (function() { - - /** - * Properties of a SourceCodeInfo. - * @memberof google.protobuf - * @interface ISourceCodeInfo - * @property {Array.|null} [location] SourceCodeInfo location - */ - - /** - * Constructs a new SourceCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a SourceCodeInfo. - * @implements ISourceCodeInfo - * @constructor - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - */ - function SourceCodeInfo(properties) { - this.location = []; - 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]]; - } - - /** - * SourceCodeInfo location. - * @member {Array.} location - * @memberof google.protobuf.SourceCodeInfo - * @instance - */ - SourceCodeInfo.prototype.location = $util.emptyArray; - - /** - * Creates a new SourceCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo instance - */ - SourceCodeInfo.create = function create(properties) { - return new SourceCodeInfo(properties); - }; - - /** - * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.location != null && message.location.length) - for (var i = 0; i < message.location.length; ++i) - $root.google.protobuf.SourceCodeInfo.Location.encode(message.location[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.ISourceCodeInfo} message SourceCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - SourceCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.location && message.location.length)) - message.location = []; - message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a SourceCodeInfo message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - SourceCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - if (!Array.isArray(message.location)) - return "location: array expected"; - for (var i = 0; i < message.location.length; ++i) { - var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); - if (error) - return "location." + error; - } - } - return null; - }; - - /** - * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo - */ - SourceCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo) - return object; - var message = new $root.google.protobuf.SourceCodeInfo(); - if (object.location) { - if (!Array.isArray(object.location)) - throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); - message.location = []; - for (var i = 0; i < object.location.length; ++i) { - if (typeof object.location[i] !== "object") - throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); - message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - SourceCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.location = []; - if (message.location && message.location.length) { - object.location = []; - for (var j = 0; j < message.location.length; ++j) - object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); - } - return object; - }; - - /** - * Converts this SourceCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo - * @instance - * @returns {Object.} JSON object - */ - SourceCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for SourceCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; - }; - - SourceCodeInfo.Location = (function() { - - /** - * Properties of a Location. - * @memberof google.protobuf.SourceCodeInfo - * @interface ILocation - * @property {Array.|null} [path] Location path - * @property {Array.|null} [span] Location span - * @property {string|null} [leadingComments] Location leadingComments - * @property {string|null} [trailingComments] Location trailingComments - * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments - */ - - /** - * Constructs a new Location. - * @memberof google.protobuf.SourceCodeInfo - * @classdesc Represents a Location. - * @implements ILocation - * @constructor - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - */ - function Location(properties) { - this.path = []; - this.span = []; - this.leadingDetachedComments = []; - 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]]; - } - - /** - * Location path. - * @member {Array.} path - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.path = $util.emptyArray; - - /** - * Location span. - * @member {Array.} span - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.span = $util.emptyArray; - - /** - * Location leadingComments. - * @member {string} leadingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingComments = ""; - - /** - * Location trailingComments. - * @member {string} trailingComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.trailingComments = ""; - - /** - * Location leadingDetachedComments. - * @member {Array.} leadingDetachedComments - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - */ - Location.prototype.leadingDetachedComments = $util.emptyArray; - - /** - * Creates a new Location instance using the specified properties. - * @function create - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set - * @returns {google.protobuf.SourceCodeInfo.Location} Location instance - */ - Location.create = function create(properties) { - return new Location(properties); - }; - - /** - * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.span != null && message.span.length) { - writer.uint32(/* id 2, wireType 2 =*/18).fork(); - for (var i = 0; i < message.span.length; ++i) - writer.int32(message.span[i]); - writer.ldelim(); - } - if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); - if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); - if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); - return writer; - }; - - /** - * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Location.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Location message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - if (!(message.span && message.span.length)) - message.span = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.span.push(reader.int32()); - } else - message.span.push(reader.int32()); - break; - } - case 3: { - message.leadingComments = reader.string(); - break; - } - case 4: { - message.trailingComments = reader.string(); - break; - } - case 6: { - if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) - message.leadingDetachedComments = []; - message.leadingDetachedComments.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Location message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.SourceCodeInfo.Location} Location - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Location.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Location message. - * @function verify - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Location.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.span != null && message.hasOwnProperty("span")) { - if (!Array.isArray(message.span)) - return "span: array expected"; - for (var i = 0; i < message.span.length; ++i) - if (!$util.isInteger(message.span[i])) - return "span: integer[] expected"; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - if (!$util.isString(message.leadingComments)) - return "leadingComments: string expected"; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - if (!$util.isString(message.trailingComments)) - return "trailingComments: string expected"; - if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { - if (!Array.isArray(message.leadingDetachedComments)) - return "leadingDetachedComments: array expected"; - for (var i = 0; i < message.leadingDetachedComments.length; ++i) - if (!$util.isString(message.leadingDetachedComments[i])) - return "leadingDetachedComments: string[] expected"; - } - return null; - }; - - /** - * Creates a Location message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.SourceCodeInfo.Location} Location - */ - Location.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) - return object; - var message = new $root.google.protobuf.SourceCodeInfo.Location(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.span) { - if (!Array.isArray(object.span)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); - message.span = []; - for (var i = 0; i < object.span.length; ++i) - message.span[i] = object.span[i] | 0; - } - if (object.leadingComments != null) - message.leadingComments = String(object.leadingComments); - if (object.trailingComments != null) - message.trailingComments = String(object.trailingComments); - if (object.leadingDetachedComments) { - if (!Array.isArray(object.leadingDetachedComments)) - throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); - message.leadingDetachedComments = []; - for (var i = 0; i < object.leadingDetachedComments.length; ++i) - message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); - } - return message; - }; - - /** - * Creates a plain object from a Location message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {google.protobuf.SourceCodeInfo.Location} message Location - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Location.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.path = []; - object.span = []; - object.leadingDetachedComments = []; - } - if (options.defaults) { - object.leadingComments = ""; - object.trailingComments = ""; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.span && message.span.length) { - object.span = []; - for (var j = 0; j < message.span.length; ++j) - object.span[j] = message.span[j]; - } - if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) - object.leadingComments = message.leadingComments; - if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) - object.trailingComments = message.trailingComments; - if (message.leadingDetachedComments && message.leadingDetachedComments.length) { - object.leadingDetachedComments = []; - for (var j = 0; j < message.leadingDetachedComments.length; ++j) - object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; - } - return object; - }; - - /** - * Converts this Location to JSON. - * @function toJSON - * @memberof google.protobuf.SourceCodeInfo.Location - * @instance - * @returns {Object.} JSON object - */ - Location.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Location - * @function getTypeUrl - * @memberof google.protobuf.SourceCodeInfo.Location - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; - }; - - return Location; - })(); - - return SourceCodeInfo; - })(); - - protobuf.GeneratedCodeInfo = (function() { - - /** - * Properties of a GeneratedCodeInfo. - * @memberof google.protobuf - * @interface IGeneratedCodeInfo - * @property {Array.|null} [annotation] GeneratedCodeInfo annotation - */ - - /** - * Constructs a new GeneratedCodeInfo. - * @memberof google.protobuf - * @classdesc Represents a GeneratedCodeInfo. - * @implements IGeneratedCodeInfo - * @constructor - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - */ - function GeneratedCodeInfo(properties) { - this.annotation = []; - 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]]; - } - - /** - * GeneratedCodeInfo annotation. - * @member {Array.} annotation - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - */ - GeneratedCodeInfo.prototype.annotation = $util.emptyArray; - - /** - * Creates a new GeneratedCodeInfo instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance - */ - GeneratedCodeInfo.create = function create(properties) { - return new GeneratedCodeInfo(properties); - }; - - /** - * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.annotation != null && message.annotation.length) - for (var i = 0; i < message.annotation.length; ++i) - $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.annotation && message.annotation.length)) - message.annotation = []; - message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GeneratedCodeInfo message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GeneratedCodeInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.annotation != null && message.hasOwnProperty("annotation")) { - if (!Array.isArray(message.annotation)) - return "annotation: array expected"; - for (var i = 0; i < message.annotation.length; ++i) { - var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); - if (error) - return "annotation." + error; - } - } - return null; - }; - - /** - * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo - */ - GeneratedCodeInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo(); - if (object.annotation) { - if (!Array.isArray(object.annotation)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); - message.annotation = []; - for (var i = 0; i < object.annotation.length; ++i) { - if (typeof object.annotation[i] !== "object") - throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); - message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GeneratedCodeInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.annotation = []; - if (message.annotation && message.annotation.length) { - object.annotation = []; - for (var j = 0; j < message.annotation.length; ++j) - object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); - } - return object; - }; - - /** - * Converts this GeneratedCodeInfo to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo - * @instance - * @returns {Object.} JSON object - */ - GeneratedCodeInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GeneratedCodeInfo - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; - }; - - GeneratedCodeInfo.Annotation = (function() { - - /** - * Properties of an Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @interface IAnnotation - * @property {Array.|null} [path] Annotation path - * @property {string|null} [sourceFile] Annotation sourceFile - * @property {number|null} [begin] Annotation begin - * @property {number|null} [end] Annotation end - * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic - */ - - /** - * Constructs a new Annotation. - * @memberof google.protobuf.GeneratedCodeInfo - * @classdesc Represents an Annotation. - * @implements IAnnotation - * @constructor - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - */ - function Annotation(properties) { - this.path = []; - 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]]; - } - - /** - * Annotation path. - * @member {Array.} path - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.path = $util.emptyArray; - - /** - * Annotation sourceFile. - * @member {string} sourceFile - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.sourceFile = ""; - - /** - * Annotation begin. - * @member {number} begin - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.begin = 0; - - /** - * Annotation end. - * @member {number} end - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.end = 0; - - /** - * Annotation semantic. - * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - */ - Annotation.prototype.semantic = 0; - - /** - * Creates a new Annotation instance using the specified properties. - * @function create - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance - */ - Annotation.create = function create(properties) { - return new Annotation(properties); - }; - - /** - * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.path != null && message.path.length) { - writer.uint32(/* id 1, wireType 2 =*/10).fork(); - for (var i = 0; i < message.path.length; ++i) - writer.int32(message.path[i]); - writer.ldelim(); - } - if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); - if (message.end != null && Object.hasOwnProperty.call(message, "end")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); - if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); - return writer; - }; - - /** - * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Annotation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Annotation message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.path && message.path.length)) - message.path = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.path.push(reader.int32()); - } else - message.path.push(reader.int32()); - break; - } - case 2: { - message.sourceFile = reader.string(); - break; - } - case 3: { - message.begin = reader.int32(); - break; - } - case 4: { - message.end = reader.int32(); - break; - } - case 5: { - message.semantic = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Annotation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Annotation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Annotation message. - * @function verify - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Annotation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.path != null && message.hasOwnProperty("path")) { - if (!Array.isArray(message.path)) - return "path: array expected"; - for (var i = 0; i < message.path.length; ++i) - if (!$util.isInteger(message.path[i])) - return "path: integer[] expected"; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - if (!$util.isString(message.sourceFile)) - return "sourceFile: string expected"; - if (message.begin != null && message.hasOwnProperty("begin")) - if (!$util.isInteger(message.begin)) - return "begin: integer expected"; - if (message.end != null && message.hasOwnProperty("end")) - if (!$util.isInteger(message.end)) - return "end: integer expected"; - if (message.semantic != null && message.hasOwnProperty("semantic")) - switch (message.semantic) { - default: - return "semantic: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates an Annotation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation - */ - Annotation.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) - return object; - var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); - if (object.path) { - if (!Array.isArray(object.path)) - throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); - message.path = []; - for (var i = 0; i < object.path.length; ++i) - message.path[i] = object.path[i] | 0; - } - if (object.sourceFile != null) - message.sourceFile = String(object.sourceFile); - if (object.begin != null) - message.begin = object.begin | 0; - if (object.end != null) - message.end = object.end | 0; - switch (object.semantic) { - default: - if (typeof object.semantic === "number") { - message.semantic = object.semantic; - break; - } - break; - case "NONE": - case 0: - message.semantic = 0; - break; - case "SET": - case 1: - message.semantic = 1; - break; - case "ALIAS": - case 2: - message.semantic = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from an Annotation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Annotation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.path = []; - if (options.defaults) { - object.sourceFile = ""; - object.begin = 0; - object.end = 0; - object.semantic = options.enums === String ? "NONE" : 0; - } - if (message.path && message.path.length) { - object.path = []; - for (var j = 0; j < message.path.length; ++j) - object.path[j] = message.path[j]; - } - if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) - object.sourceFile = message.sourceFile; - if (message.begin != null && message.hasOwnProperty("begin")) - object.begin = message.begin; - if (message.end != null && message.hasOwnProperty("end")) - object.end = message.end; - if (message.semantic != null && message.hasOwnProperty("semantic")) - object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; - return object; - }; - - /** - * Converts this Annotation to JSON. - * @function toJSON - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @instance - * @returns {Object.} JSON object - */ - Annotation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Annotation - * @function getTypeUrl - * @memberof google.protobuf.GeneratedCodeInfo.Annotation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; - }; - - /** - * Semantic enum. - * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic - * @enum {number} - * @property {number} NONE=0 NONE value - * @property {number} SET=1 SET value - * @property {number} ALIAS=2 ALIAS value - */ - Annotation.Semantic = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NONE"] = 0; - values[valuesById[1] = "SET"] = 1; - values[valuesById[2] = "ALIAS"] = 2; - return values; - })(); - - return Annotation; - })(); - - return GeneratedCodeInfo; - })(); - - /** - * SymbolVisibility enum. - * @name google.protobuf.SymbolVisibility - * @enum {number} - * @property {number} VISIBILITY_UNSET=0 VISIBILITY_UNSET value - * @property {number} VISIBILITY_LOCAL=1 VISIBILITY_LOCAL value - * @property {number} VISIBILITY_EXPORT=2 VISIBILITY_EXPORT value - */ - protobuf.SymbolVisibility = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VISIBILITY_UNSET"] = 0; - values[valuesById[1] = "VISIBILITY_LOCAL"] = 1; - values[valuesById[2] = "VISIBILITY_EXPORT"] = 2; - return values; - })(); - - protobuf.Duration = (function() { - - /** - * Properties of a Duration. - * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos - */ - - /** - * Constructs a new Duration. - * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration - * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set - */ - function Duration(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]]; - } - - /** - * Duration seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Duration nanos. - * @member {number} nanos - * @memberof google.protobuf.Duration - * @instance - */ - Duration.prototype.nanos = 0; - - /** - * Creates a new Duration instance using the specified properties. - * @function create - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance - */ - Duration.create = function create(properties) { - return new Duration(properties); - }; - - /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Duration message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Duration message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Duration - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Duration.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Duration message. - * @function verify - * @memberof google.protobuf.Duration - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Duration.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Duration - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration - */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) - return object; - var message = new $root.google.protobuf.Duration(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Duration - * @static - * @param {google.protobuf.Duration} message Duration - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Duration.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Duration to JSON. - * @function toJSON - * @memberof google.protobuf.Duration - * @instance - * @returns {Object.} JSON object - */ - Duration.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Duration - * @function getTypeUrl - * @memberof google.protobuf.Duration - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Duration"; - }; - - return Duration; - })(); - - protobuf.Any = (function() { - - /** - * Properties of an Any. - * @memberof google.protobuf - * @interface IAny - * @property {string|null} [type_url] Any type_url - * @property {Uint8Array|null} [value] Any value - */ - - /** - * Constructs a new Any. - * @memberof google.protobuf - * @classdesc Represents an Any. - * @implements IAny - * @constructor - * @param {google.protobuf.IAny=} [properties] Properties to set - */ - function Any(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]]; - } - - /** - * Any type_url. - * @member {string} type_url - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.type_url = ""; - - /** - * Any value. - * @member {Uint8Array} value - * @memberof google.protobuf.Any - * @instance - */ - Any.prototype.value = $util.newBuffer([]); - - /** - * Creates a new Any instance using the specified properties. - * @function create - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny=} [properties] Properties to set - * @returns {google.protobuf.Any} Any instance - */ - Any.create = function create(properties) { - return new Any(properties); - }; - - /** - * Encodes the specified Any message. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type_url != null && Object.hasOwnProperty.call(message, "type_url")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type_url); - if (message.value != null && Object.hasOwnProperty.call(message, "value")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.value); - return writer; - }; - - /** - * Encodes the specified Any message, length delimited. Does not implicitly {@link google.protobuf.Any.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.IAny} message Any message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Any.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Any message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Any(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type_url = reader.string(); - break; - } - case 2: { - message.value = reader.bytes(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Any message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Any - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Any} Any - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Any.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Any message. - * @function verify - * @memberof google.protobuf.Any - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Any.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type_url != null && message.hasOwnProperty("type_url")) - if (!$util.isString(message.type_url)) - return "type_url: string expected"; - if (message.value != null && message.hasOwnProperty("value")) - if (!(message.value && typeof message.value.length === "number" || $util.isString(message.value))) - return "value: buffer expected"; - return null; - }; - - /** - * Creates an Any message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Any - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Any} Any - */ - Any.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Any) - return object; - var message = new $root.google.protobuf.Any(); - if (object.type_url != null) - message.type_url = String(object.type_url); - if (object.value != null) - if (typeof object.value === "string") - $util.base64.decode(object.value, message.value = $util.newBuffer($util.base64.length(object.value)), 0); - else if (object.value.length >= 0) - message.value = object.value; - return message; - }; - - /** - * Creates a plain object from an Any message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Any - * @static - * @param {google.protobuf.Any} message Any - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Any.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type_url = ""; - if (options.bytes === String) - object.value = ""; - else { - object.value = []; - if (options.bytes !== Array) - object.value = $util.newBuffer(object.value); - } - } - if (message.type_url != null && message.hasOwnProperty("type_url")) - object.type_url = message.type_url; - if (message.value != null && message.hasOwnProperty("value")) - object.value = options.bytes === String ? $util.base64.encode(message.value, 0, message.value.length) : options.bytes === Array ? Array.prototype.slice.call(message.value) : message.value; - return object; - }; - - /** - * Converts this Any to JSON. - * @function toJSON - * @memberof google.protobuf.Any - * @instance - * @returns {Object.} JSON object - */ - Any.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Any - * @function getTypeUrl - * @memberof google.protobuf.Any - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Any.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Any"; - }; - - return Any; - })(); - - protobuf.Timestamp = (function() { - - /** - * Properties of a Timestamp. - * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos - */ - - /** - * Constructs a new Timestamp. - * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp - * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - */ - function Timestamp(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]]; - } - - /** - * Timestamp seconds. - * @member {number|Long} seconds - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Timestamp nanos. - * @member {number} nanos - * @memberof google.protobuf.Timestamp - * @instance - */ - Timestamp.prototype.nanos = 0; - - /** - * Creates a new Timestamp instance using the specified properties. - * @function create - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance - */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); - }; - - /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); - return writer; - }; - - /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Timestamp - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Timestamp message. - * @function verify - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Timestamp.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; - return null; - }; - - /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Timestamp - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp - */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) - return object; - var message = new $root.google.protobuf.Timestamp(); - if (object.seconds != null) - if ($util.Long) - (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; - else if (typeof object.seconds === "string") - message.seconds = parseInt(object.seconds, 10); - else if (typeof object.seconds === "number") - message.seconds = object.seconds; - else if (typeof object.seconds === "object") - message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); - if (object.nanos != null) - message.nanos = object.nanos | 0; - return message; - }; - - /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Timestamp - * @static - * @param {google.protobuf.Timestamp} message Timestamp - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Timestamp.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.seconds = options.longs === String ? "0" : 0; - object.nanos = 0; - } - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (typeof message.seconds === "number") - object.seconds = options.longs === String ? String(message.seconds) : message.seconds; - else - object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; - if (message.nanos != null && message.hasOwnProperty("nanos")) - object.nanos = message.nanos; - return object; - }; - - /** - * Converts this Timestamp to JSON. - * @function toJSON - * @memberof google.protobuf.Timestamp - * @instance - * @returns {Object.} JSON object - */ - Timestamp.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Timestamp - * @function getTypeUrl - * @memberof google.protobuf.Timestamp - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Timestamp"; - }; - - return Timestamp; - })(); - - protobuf.Empty = (function() { - - /** - * Properties of an Empty. - * @memberof google.protobuf - * @interface IEmpty - */ - - /** - * Constructs a new Empty. - * @memberof google.protobuf - * @classdesc Represents an Empty. - * @implements IEmpty - * @constructor - * @param {google.protobuf.IEmpty=} [properties] Properties to set - */ - function Empty(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 Empty instance using the specified properties. - * @function create - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty=} [properties] Properties to set - * @returns {google.protobuf.Empty} Empty instance - */ - Empty.create = function create(properties) { - return new Empty(properties); - }; - - /** - * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encode - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - return writer; - }; - - /** - * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.IEmpty} message Empty message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Empty.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an Empty message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an Empty message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.Empty - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Empty} Empty - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Empty.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an Empty message. - * @function verify - * @memberof google.protobuf.Empty - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Empty.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - return null; - }; - - /** - * Creates an Empty message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.Empty - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.Empty} Empty - */ - Empty.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Empty) - return object; - return new $root.google.protobuf.Empty(); - }; - - /** - * Creates a plain object from an Empty message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.Empty - * @static - * @param {google.protobuf.Empty} message Empty - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Empty.toObject = function toObject() { - return {}; - }; - - /** - * Converts this Empty to JSON. - * @function toJSON - * @memberof google.protobuf.Empty - * @instance - * @returns {Object.} JSON object - */ - Empty.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Empty - * @function getTypeUrl - * @memberof google.protobuf.Empty - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.Empty"; - }; - - return Empty; - })(); - - protobuf.FieldMask = (function() { - - /** - * Properties of a FieldMask. - * @memberof google.protobuf - * @interface IFieldMask - * @property {Array.|null} [paths] FieldMask paths - */ - - /** - * Constructs a new FieldMask. - * @memberof google.protobuf - * @classdesc Represents a FieldMask. - * @implements IFieldMask - * @constructor - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - */ - function FieldMask(properties) { - this.paths = []; - 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]]; - } - - /** - * FieldMask paths. - * @member {Array.} paths - * @memberof google.protobuf.FieldMask - * @instance - */ - FieldMask.prototype.paths = $util.emptyArray; - - /** - * Creates a new FieldMask instance using the specified properties. - * @function create - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask=} [properties] Properties to set - * @returns {google.protobuf.FieldMask} FieldMask instance - */ - FieldMask.create = function create(properties) { - return new FieldMask(properties); - }; - - /** - * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encode - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.paths != null && message.paths.length) - for (var i = 0; i < message.paths.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); - return writer; - }; - - /** - * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. - * @function encodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldMask.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer. - * @function decode - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.paths && message.paths.length)) - message.paths = []; - message.paths.push(reader.string()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldMask message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.protobuf.FieldMask - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.FieldMask} FieldMask - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldMask.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldMask message. - * @function verify - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldMask.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.paths != null && message.hasOwnProperty("paths")) { - if (!Array.isArray(message.paths)) - return "paths: array expected"; - for (var i = 0; i < message.paths.length; ++i) - if (!$util.isString(message.paths[i])) - return "paths: string[] expected"; - } - return null; - }; - - /** - * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.protobuf.FieldMask - * @static - * @param {Object.} object Plain object - * @returns {google.protobuf.FieldMask} FieldMask - */ - FieldMask.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.FieldMask) - return object; - var message = new $root.google.protobuf.FieldMask(); - if (object.paths) { - if (!Array.isArray(object.paths)) - throw TypeError(".google.protobuf.FieldMask.paths: array expected"); - message.paths = []; - for (var i = 0; i < object.paths.length; ++i) - message.paths[i] = String(object.paths[i]); - } - return message; - }; - - /** - * Creates a plain object from a FieldMask message. Also converts values to other types if specified. - * @function toObject - * @memberof google.protobuf.FieldMask - * @static - * @param {google.protobuf.FieldMask} message FieldMask - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldMask.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.paths = []; - if (message.paths && message.paths.length) { - object.paths = []; - for (var j = 0; j < message.paths.length; ++j) - object.paths[j] = message.paths[j]; - } - return object; - }; - - /** - * Converts this FieldMask to JSON. - * @function toJSON - * @memberof google.protobuf.FieldMask - * @instance - * @returns {Object.} JSON object - */ - FieldMask.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldMask - * @function getTypeUrl - * @memberof google.protobuf.FieldMask - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.protobuf.FieldMask"; - }; - - return FieldMask; - })(); - - return protobuf; - })(); - - google.rpc = (function() { - - /** - * Namespace rpc. - * @memberof google - * @namespace - */ - var rpc = {}; - - rpc.ErrorInfo = (function() { - - /** - * Properties of an ErrorInfo. - * @memberof google.rpc - * @interface IErrorInfo - * @property {string|null} [reason] ErrorInfo reason - * @property {string|null} [domain] ErrorInfo domain - * @property {Object.|null} [metadata] ErrorInfo metadata - */ - - /** - * Constructs a new ErrorInfo. - * @memberof google.rpc - * @classdesc Represents an ErrorInfo. - * @implements IErrorInfo - * @constructor - * @param {google.rpc.IErrorInfo=} [properties] Properties to set - */ - function ErrorInfo(properties) { - this.metadata = {}; - 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]]; - } - - /** - * ErrorInfo reason. - * @member {string} reason - * @memberof google.rpc.ErrorInfo - * @instance - */ - ErrorInfo.prototype.reason = ""; - - /** - * ErrorInfo domain. - * @member {string} domain - * @memberof google.rpc.ErrorInfo - * @instance - */ - ErrorInfo.prototype.domain = ""; - - /** - * ErrorInfo metadata. - * @member {Object.} metadata - * @memberof google.rpc.ErrorInfo - * @instance - */ - ErrorInfo.prototype.metadata = $util.emptyObject; - - /** - * Creates a new ErrorInfo instance using the specified properties. - * @function create - * @memberof google.rpc.ErrorInfo - * @static - * @param {google.rpc.IErrorInfo=} [properties] Properties to set - * @returns {google.rpc.ErrorInfo} ErrorInfo instance - */ - ErrorInfo.create = function create(properties) { - return new ErrorInfo(properties); - }; - - /** - * Encodes the specified ErrorInfo message. Does not implicitly {@link google.rpc.ErrorInfo.verify|verify} messages. - * @function encode - * @memberof google.rpc.ErrorInfo - * @static - * @param {google.rpc.IErrorInfo} message ErrorInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ErrorInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.reason); - if (message.domain != null && Object.hasOwnProperty.call(message, "domain")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.domain); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - for (var keys = Object.keys(message.metadata), i = 0; i < keys.length; ++i) - writer.uint32(/* id 3, wireType 2 =*/26).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.metadata[keys[i]]).ldelim(); - return writer; - }; - - /** - * Encodes the specified ErrorInfo message, length delimited. Does not implicitly {@link google.rpc.ErrorInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.ErrorInfo - * @static - * @param {google.rpc.IErrorInfo} message ErrorInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ErrorInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes an ErrorInfo message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.ErrorInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.ErrorInfo} ErrorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ErrorInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.ErrorInfo(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.reason = reader.string(); - break; - } - case 2: { - message.domain = reader.string(); - break; - } - case 3: { - if (message.metadata === $util.emptyObject) - message.metadata = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.metadata[key] = value; - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes an ErrorInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.ErrorInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.ErrorInfo} ErrorInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ErrorInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies an ErrorInfo message. - * @function verify - * @memberof google.rpc.ErrorInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ErrorInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.reason != null && message.hasOwnProperty("reason")) - if (!$util.isString(message.reason)) - return "reason: string expected"; - if (message.domain != null && message.hasOwnProperty("domain")) - if (!$util.isString(message.domain)) - return "domain: string expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - if (!$util.isObject(message.metadata)) - return "metadata: object expected"; - var key = Object.keys(message.metadata); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.metadata[key[i]])) - return "metadata: string{k:string} expected"; - } - return null; - }; - - /** - * Creates an ErrorInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.ErrorInfo - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.ErrorInfo} ErrorInfo - */ - ErrorInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.ErrorInfo) - return object; - var message = new $root.google.rpc.ErrorInfo(); - if (object.reason != null) - message.reason = String(object.reason); - if (object.domain != null) - message.domain = String(object.domain); - if (object.metadata) { - if (typeof object.metadata !== "object") - throw TypeError(".google.rpc.ErrorInfo.metadata: object expected"); - message.metadata = {}; - for (var keys = Object.keys(object.metadata), i = 0; i < keys.length; ++i) - message.metadata[keys[i]] = String(object.metadata[keys[i]]); - } - return message; - }; - - /** - * Creates a plain object from an ErrorInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.ErrorInfo - * @static - * @param {google.rpc.ErrorInfo} message ErrorInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ErrorInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.metadata = {}; - if (options.defaults) { - object.reason = ""; - object.domain = ""; - } - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = message.reason; - if (message.domain != null && message.hasOwnProperty("domain")) - object.domain = message.domain; - var keys2; - if (message.metadata && (keys2 = Object.keys(message.metadata)).length) { - object.metadata = {}; - for (var j = 0; j < keys2.length; ++j) - object.metadata[keys2[j]] = message.metadata[keys2[j]]; - } - return object; - }; - - /** - * Converts this ErrorInfo to JSON. - * @function toJSON - * @memberof google.rpc.ErrorInfo - * @instance - * @returns {Object.} JSON object - */ - ErrorInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ErrorInfo - * @function getTypeUrl - * @memberof google.rpc.ErrorInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ErrorInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.ErrorInfo"; - }; - - return ErrorInfo; - })(); - - rpc.RetryInfo = (function() { - - /** - * Properties of a RetryInfo. - * @memberof google.rpc - * @interface IRetryInfo - * @property {google.protobuf.IDuration|null} [retryDelay] RetryInfo retryDelay - */ - - /** - * Constructs a new RetryInfo. - * @memberof google.rpc - * @classdesc Represents a RetryInfo. - * @implements IRetryInfo - * @constructor - * @param {google.rpc.IRetryInfo=} [properties] Properties to set - */ - function RetryInfo(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]]; - } - - /** - * RetryInfo retryDelay. - * @member {google.protobuf.IDuration|null|undefined} retryDelay - * @memberof google.rpc.RetryInfo - * @instance - */ - RetryInfo.prototype.retryDelay = null; - - /** - * Creates a new RetryInfo instance using the specified properties. - * @function create - * @memberof google.rpc.RetryInfo - * @static - * @param {google.rpc.IRetryInfo=} [properties] Properties to set - * @returns {google.rpc.RetryInfo} RetryInfo instance - */ - RetryInfo.create = function create(properties) { - return new RetryInfo(properties); - }; - - /** - * Encodes the specified RetryInfo message. Does not implicitly {@link google.rpc.RetryInfo.verify|verify} messages. - * @function encode - * @memberof google.rpc.RetryInfo - * @static - * @param {google.rpc.IRetryInfo} message RetryInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RetryInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.retryDelay != null && Object.hasOwnProperty.call(message, "retryDelay")) - $root.google.protobuf.Duration.encode(message.retryDelay, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified RetryInfo message, length delimited. Does not implicitly {@link google.rpc.RetryInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.RetryInfo - * @static - * @param {google.rpc.IRetryInfo} message RetryInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RetryInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RetryInfo message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.RetryInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.RetryInfo} RetryInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RetryInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.RetryInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.retryDelay = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RetryInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.RetryInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.RetryInfo} RetryInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RetryInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RetryInfo message. - * @function verify - * @memberof google.rpc.RetryInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RetryInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.retryDelay != null && message.hasOwnProperty("retryDelay")) { - var error = $root.google.protobuf.Duration.verify(message.retryDelay); - if (error) - return "retryDelay." + error; - } - return null; - }; - - /** - * Creates a RetryInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.RetryInfo - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.RetryInfo} RetryInfo - */ - RetryInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.RetryInfo) - return object; - var message = new $root.google.rpc.RetryInfo(); - if (object.retryDelay != null) { - if (typeof object.retryDelay !== "object") - throw TypeError(".google.rpc.RetryInfo.retryDelay: object expected"); - message.retryDelay = $root.google.protobuf.Duration.fromObject(object.retryDelay); - } - return message; - }; - - /** - * Creates a plain object from a RetryInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.RetryInfo - * @static - * @param {google.rpc.RetryInfo} message RetryInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RetryInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.retryDelay = null; - if (message.retryDelay != null && message.hasOwnProperty("retryDelay")) - object.retryDelay = $root.google.protobuf.Duration.toObject(message.retryDelay, options); - return object; - }; - - /** - * Converts this RetryInfo to JSON. - * @function toJSON - * @memberof google.rpc.RetryInfo - * @instance - * @returns {Object.} JSON object - */ - RetryInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RetryInfo - * @function getTypeUrl - * @memberof google.rpc.RetryInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RetryInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.RetryInfo"; - }; - - return RetryInfo; - })(); - - rpc.DebugInfo = (function() { - - /** - * Properties of a DebugInfo. - * @memberof google.rpc - * @interface IDebugInfo - * @property {Array.|null} [stackEntries] DebugInfo stackEntries - * @property {string|null} [detail] DebugInfo detail - */ - - /** - * Constructs a new DebugInfo. - * @memberof google.rpc - * @classdesc Represents a DebugInfo. - * @implements IDebugInfo - * @constructor - * @param {google.rpc.IDebugInfo=} [properties] Properties to set - */ - function DebugInfo(properties) { - this.stackEntries = []; - 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]]; - } - - /** - * DebugInfo stackEntries. - * @member {Array.} stackEntries - * @memberof google.rpc.DebugInfo - * @instance - */ - DebugInfo.prototype.stackEntries = $util.emptyArray; - - /** - * DebugInfo detail. - * @member {string} detail - * @memberof google.rpc.DebugInfo - * @instance - */ - DebugInfo.prototype.detail = ""; - - /** - * Creates a new DebugInfo instance using the specified properties. - * @function create - * @memberof google.rpc.DebugInfo - * @static - * @param {google.rpc.IDebugInfo=} [properties] Properties to set - * @returns {google.rpc.DebugInfo} DebugInfo instance - */ - DebugInfo.create = function create(properties) { - return new DebugInfo(properties); - }; - - /** - * Encodes the specified DebugInfo message. Does not implicitly {@link google.rpc.DebugInfo.verify|verify} messages. - * @function encode - * @memberof google.rpc.DebugInfo - * @static - * @param {google.rpc.IDebugInfo} message DebugInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DebugInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.stackEntries != null && message.stackEntries.length) - for (var i = 0; i < message.stackEntries.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.stackEntries[i]); - if (message.detail != null && Object.hasOwnProperty.call(message, "detail")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.detail); - return writer; - }; - - /** - * Encodes the specified DebugInfo message, length delimited. Does not implicitly {@link google.rpc.DebugInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.DebugInfo - * @static - * @param {google.rpc.IDebugInfo} message DebugInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - DebugInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a DebugInfo message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.DebugInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.DebugInfo} DebugInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DebugInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.DebugInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.stackEntries && message.stackEntries.length)) - message.stackEntries = []; - message.stackEntries.push(reader.string()); - break; - } - case 2: { - message.detail = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a DebugInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.DebugInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.DebugInfo} DebugInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - DebugInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a DebugInfo message. - * @function verify - * @memberof google.rpc.DebugInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - DebugInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.stackEntries != null && message.hasOwnProperty("stackEntries")) { - if (!Array.isArray(message.stackEntries)) - return "stackEntries: array expected"; - for (var i = 0; i < message.stackEntries.length; ++i) - if (!$util.isString(message.stackEntries[i])) - return "stackEntries: string[] expected"; - } - if (message.detail != null && message.hasOwnProperty("detail")) - if (!$util.isString(message.detail)) - return "detail: string expected"; - return null; - }; - - /** - * Creates a DebugInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.DebugInfo - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.DebugInfo} DebugInfo - */ - DebugInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.DebugInfo) - return object; - var message = new $root.google.rpc.DebugInfo(); - if (object.stackEntries) { - if (!Array.isArray(object.stackEntries)) - throw TypeError(".google.rpc.DebugInfo.stackEntries: array expected"); - message.stackEntries = []; - for (var i = 0; i < object.stackEntries.length; ++i) - message.stackEntries[i] = String(object.stackEntries[i]); - } - if (object.detail != null) - message.detail = String(object.detail); - return message; - }; - - /** - * Creates a plain object from a DebugInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.DebugInfo - * @static - * @param {google.rpc.DebugInfo} message DebugInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - DebugInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.stackEntries = []; - if (options.defaults) - object.detail = ""; - if (message.stackEntries && message.stackEntries.length) { - object.stackEntries = []; - for (var j = 0; j < message.stackEntries.length; ++j) - object.stackEntries[j] = message.stackEntries[j]; - } - if (message.detail != null && message.hasOwnProperty("detail")) - object.detail = message.detail; - return object; - }; - - /** - * Converts this DebugInfo to JSON. - * @function toJSON - * @memberof google.rpc.DebugInfo - * @instance - * @returns {Object.} JSON object - */ - DebugInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for DebugInfo - * @function getTypeUrl - * @memberof google.rpc.DebugInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - DebugInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.DebugInfo"; - }; - - return DebugInfo; - })(); - - rpc.QuotaFailure = (function() { - - /** - * Properties of a QuotaFailure. - * @memberof google.rpc - * @interface IQuotaFailure - * @property {Array.|null} [violations] QuotaFailure violations - */ - - /** - * Constructs a new QuotaFailure. - * @memberof google.rpc - * @classdesc Represents a QuotaFailure. - * @implements IQuotaFailure - * @constructor - * @param {google.rpc.IQuotaFailure=} [properties] Properties to set - */ - function QuotaFailure(properties) { - this.violations = []; - 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]]; - } - - /** - * QuotaFailure violations. - * @member {Array.} violations - * @memberof google.rpc.QuotaFailure - * @instance - */ - QuotaFailure.prototype.violations = $util.emptyArray; - - /** - * Creates a new QuotaFailure instance using the specified properties. - * @function create - * @memberof google.rpc.QuotaFailure - * @static - * @param {google.rpc.IQuotaFailure=} [properties] Properties to set - * @returns {google.rpc.QuotaFailure} QuotaFailure instance - */ - QuotaFailure.create = function create(properties) { - return new QuotaFailure(properties); - }; - - /** - * Encodes the specified QuotaFailure message. Does not implicitly {@link google.rpc.QuotaFailure.verify|verify} messages. - * @function encode - * @memberof google.rpc.QuotaFailure - * @static - * @param {google.rpc.IQuotaFailure} message QuotaFailure message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuotaFailure.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.violations != null && message.violations.length) - for (var i = 0; i < message.violations.length; ++i) - $root.google.rpc.QuotaFailure.Violation.encode(message.violations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified QuotaFailure message, length delimited. Does not implicitly {@link google.rpc.QuotaFailure.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.QuotaFailure - * @static - * @param {google.rpc.IQuotaFailure} message QuotaFailure message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - QuotaFailure.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a QuotaFailure message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.QuotaFailure - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.QuotaFailure} QuotaFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuotaFailure.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.QuotaFailure(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.violations && message.violations.length)) - message.violations = []; - message.violations.push($root.google.rpc.QuotaFailure.Violation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a QuotaFailure message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.QuotaFailure - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.QuotaFailure} QuotaFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - QuotaFailure.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a QuotaFailure message. - * @function verify - * @memberof google.rpc.QuotaFailure - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - QuotaFailure.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.violations != null && message.hasOwnProperty("violations")) { - if (!Array.isArray(message.violations)) - return "violations: array expected"; - for (var i = 0; i < message.violations.length; ++i) { - var error = $root.google.rpc.QuotaFailure.Violation.verify(message.violations[i]); - if (error) - return "violations." + error; - } - } - return null; - }; - - /** - * Creates a QuotaFailure message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.QuotaFailure - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.QuotaFailure} QuotaFailure - */ - QuotaFailure.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.QuotaFailure) - return object; - var message = new $root.google.rpc.QuotaFailure(); - if (object.violations) { - if (!Array.isArray(object.violations)) - throw TypeError(".google.rpc.QuotaFailure.violations: array expected"); - message.violations = []; - for (var i = 0; i < object.violations.length; ++i) { - if (typeof object.violations[i] !== "object") - throw TypeError(".google.rpc.QuotaFailure.violations: object expected"); - message.violations[i] = $root.google.rpc.QuotaFailure.Violation.fromObject(object.violations[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a QuotaFailure message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.QuotaFailure - * @static - * @param {google.rpc.QuotaFailure} message QuotaFailure - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - QuotaFailure.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.violations = []; - if (message.violations && message.violations.length) { - object.violations = []; - for (var j = 0; j < message.violations.length; ++j) - object.violations[j] = $root.google.rpc.QuotaFailure.Violation.toObject(message.violations[j], options); - } - return object; - }; - - /** - * Converts this QuotaFailure to JSON. - * @function toJSON - * @memberof google.rpc.QuotaFailure - * @instance - * @returns {Object.} JSON object - */ - QuotaFailure.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for QuotaFailure - * @function getTypeUrl - * @memberof google.rpc.QuotaFailure - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - QuotaFailure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.QuotaFailure"; - }; - - QuotaFailure.Violation = (function() { - - /** - * Properties of a Violation. - * @memberof google.rpc.QuotaFailure - * @interface IViolation - * @property {string|null} [subject] Violation subject - * @property {string|null} [description] Violation description - * @property {string|null} [apiService] Violation apiService - * @property {string|null} [quotaMetric] Violation quotaMetric - * @property {string|null} [quotaId] Violation quotaId - * @property {Object.|null} [quotaDimensions] Violation quotaDimensions - * @property {number|Long|null} [quotaValue] Violation quotaValue - * @property {number|Long|null} [futureQuotaValue] Violation futureQuotaValue - */ - - /** - * Constructs a new Violation. - * @memberof google.rpc.QuotaFailure - * @classdesc Represents a Violation. - * @implements IViolation - * @constructor - * @param {google.rpc.QuotaFailure.IViolation=} [properties] Properties to set - */ - function Violation(properties) { - this.quotaDimensions = {}; - 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]]; - } - - /** - * Violation subject. - * @member {string} subject - * @memberof google.rpc.QuotaFailure.Violation - * @instance - */ - Violation.prototype.subject = ""; - - /** - * Violation description. - * @member {string} description - * @memberof google.rpc.QuotaFailure.Violation - * @instance - */ - Violation.prototype.description = ""; - - /** - * Violation apiService. - * @member {string} apiService - * @memberof google.rpc.QuotaFailure.Violation - * @instance - */ - Violation.prototype.apiService = ""; - - /** - * Violation quotaMetric. - * @member {string} quotaMetric - * @memberof google.rpc.QuotaFailure.Violation - * @instance - */ - Violation.prototype.quotaMetric = ""; - - /** - * Violation quotaId. - * @member {string} quotaId - * @memberof google.rpc.QuotaFailure.Violation - * @instance - */ - Violation.prototype.quotaId = ""; - - /** - * Violation quotaDimensions. - * @member {Object.} quotaDimensions - * @memberof google.rpc.QuotaFailure.Violation - * @instance - */ - Violation.prototype.quotaDimensions = $util.emptyObject; - - /** - * Violation quotaValue. - * @member {number|Long} quotaValue - * @memberof google.rpc.QuotaFailure.Violation - * @instance - */ - Violation.prototype.quotaValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; - - /** - * Violation futureQuotaValue. - * @member {number|Long|null|undefined} futureQuotaValue - * @memberof google.rpc.QuotaFailure.Violation - * @instance - */ - Violation.prototype.futureQuotaValue = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - // Virtual OneOf for proto3 optional field - Object.defineProperty(Violation.prototype, "_futureQuotaValue", { - get: $util.oneOfGetter($oneOfFields = ["futureQuotaValue"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * Creates a new Violation instance using the specified properties. - * @function create - * @memberof google.rpc.QuotaFailure.Violation - * @static - * @param {google.rpc.QuotaFailure.IViolation=} [properties] Properties to set - * @returns {google.rpc.QuotaFailure.Violation} Violation instance - */ - Violation.create = function create(properties) { - return new Violation(properties); - }; - - /** - * Encodes the specified Violation message. Does not implicitly {@link google.rpc.QuotaFailure.Violation.verify|verify} messages. - * @function encode - * @memberof google.rpc.QuotaFailure.Violation - * @static - * @param {google.rpc.QuotaFailure.IViolation} message Violation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Violation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.subject); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.apiService != null && Object.hasOwnProperty.call(message, "apiService")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.apiService); - if (message.quotaMetric != null && Object.hasOwnProperty.call(message, "quotaMetric")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.quotaMetric); - if (message.quotaId != null && Object.hasOwnProperty.call(message, "quotaId")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.quotaId); - if (message.quotaDimensions != null && Object.hasOwnProperty.call(message, "quotaDimensions")) - for (var keys = Object.keys(message.quotaDimensions), i = 0; i < keys.length; ++i) - writer.uint32(/* id 6, wireType 2 =*/50).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 2 =*/18).string(message.quotaDimensions[keys[i]]).ldelim(); - if (message.quotaValue != null && Object.hasOwnProperty.call(message, "quotaValue")) - writer.uint32(/* id 7, wireType 0 =*/56).int64(message.quotaValue); - if (message.futureQuotaValue != null && Object.hasOwnProperty.call(message, "futureQuotaValue")) - writer.uint32(/* id 8, wireType 0 =*/64).int64(message.futureQuotaValue); - return writer; - }; - - /** - * Encodes the specified Violation message, length delimited. Does not implicitly {@link google.rpc.QuotaFailure.Violation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.QuotaFailure.Violation - * @static - * @param {google.rpc.QuotaFailure.IViolation} message Violation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Violation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Violation message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.QuotaFailure.Violation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.QuotaFailure.Violation} Violation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Violation.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.QuotaFailure.Violation(), key, value; - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.subject = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.apiService = reader.string(); - break; - } - case 4: { - message.quotaMetric = reader.string(); - break; - } - case 5: { - message.quotaId = reader.string(); - break; - } - case 6: { - if (message.quotaDimensions === $util.emptyObject) - message.quotaDimensions = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = ""; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.string(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.quotaDimensions[key] = value; - break; - } - case 7: { - message.quotaValue = reader.int64(); - break; - } - case 8: { - message.futureQuotaValue = reader.int64(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Violation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.QuotaFailure.Violation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.QuotaFailure.Violation} Violation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Violation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Violation message. - * @function verify - * @memberof google.rpc.QuotaFailure.Violation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Violation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.subject != null && message.hasOwnProperty("subject")) - if (!$util.isString(message.subject)) - return "subject: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.apiService != null && message.hasOwnProperty("apiService")) - if (!$util.isString(message.apiService)) - return "apiService: string expected"; - if (message.quotaMetric != null && message.hasOwnProperty("quotaMetric")) - if (!$util.isString(message.quotaMetric)) - return "quotaMetric: string expected"; - if (message.quotaId != null && message.hasOwnProperty("quotaId")) - if (!$util.isString(message.quotaId)) - return "quotaId: string expected"; - if (message.quotaDimensions != null && message.hasOwnProperty("quotaDimensions")) { - if (!$util.isObject(message.quotaDimensions)) - return "quotaDimensions: object expected"; - var key = Object.keys(message.quotaDimensions); - for (var i = 0; i < key.length; ++i) - if (!$util.isString(message.quotaDimensions[key[i]])) - return "quotaDimensions: string{k:string} expected"; - } - if (message.quotaValue != null && message.hasOwnProperty("quotaValue")) - if (!$util.isInteger(message.quotaValue) && !(message.quotaValue && $util.isInteger(message.quotaValue.low) && $util.isInteger(message.quotaValue.high))) - return "quotaValue: integer|Long expected"; - if (message.futureQuotaValue != null && message.hasOwnProperty("futureQuotaValue")) { - properties._futureQuotaValue = 1; - if (!$util.isInteger(message.futureQuotaValue) && !(message.futureQuotaValue && $util.isInteger(message.futureQuotaValue.low) && $util.isInteger(message.futureQuotaValue.high))) - return "futureQuotaValue: integer|Long expected"; - } - return null; - }; - - /** - * Creates a Violation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.QuotaFailure.Violation - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.QuotaFailure.Violation} Violation - */ - Violation.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.QuotaFailure.Violation) - return object; - var message = new $root.google.rpc.QuotaFailure.Violation(); - if (object.subject != null) - message.subject = String(object.subject); - if (object.description != null) - message.description = String(object.description); - if (object.apiService != null) - message.apiService = String(object.apiService); - if (object.quotaMetric != null) - message.quotaMetric = String(object.quotaMetric); - if (object.quotaId != null) - message.quotaId = String(object.quotaId); - if (object.quotaDimensions) { - if (typeof object.quotaDimensions !== "object") - throw TypeError(".google.rpc.QuotaFailure.Violation.quotaDimensions: object expected"); - message.quotaDimensions = {}; - for (var keys = Object.keys(object.quotaDimensions), i = 0; i < keys.length; ++i) - message.quotaDimensions[keys[i]] = String(object.quotaDimensions[keys[i]]); - } - if (object.quotaValue != null) - if ($util.Long) - (message.quotaValue = $util.Long.fromValue(object.quotaValue)).unsigned = false; - else if (typeof object.quotaValue === "string") - message.quotaValue = parseInt(object.quotaValue, 10); - else if (typeof object.quotaValue === "number") - message.quotaValue = object.quotaValue; - else if (typeof object.quotaValue === "object") - message.quotaValue = new $util.LongBits(object.quotaValue.low >>> 0, object.quotaValue.high >>> 0).toNumber(); - if (object.futureQuotaValue != null) - if ($util.Long) - (message.futureQuotaValue = $util.Long.fromValue(object.futureQuotaValue)).unsigned = false; - else if (typeof object.futureQuotaValue === "string") - message.futureQuotaValue = parseInt(object.futureQuotaValue, 10); - else if (typeof object.futureQuotaValue === "number") - message.futureQuotaValue = object.futureQuotaValue; - else if (typeof object.futureQuotaValue === "object") - message.futureQuotaValue = new $util.LongBits(object.futureQuotaValue.low >>> 0, object.futureQuotaValue.high >>> 0).toNumber(); - return message; - }; - - /** - * Creates a plain object from a Violation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.QuotaFailure.Violation - * @static - * @param {google.rpc.QuotaFailure.Violation} message Violation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Violation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.objects || options.defaults) - object.quotaDimensions = {}; - if (options.defaults) { - object.subject = ""; - object.description = ""; - object.apiService = ""; - object.quotaMetric = ""; - object.quotaId = ""; - if ($util.Long) { - var long = new $util.Long(0, 0, false); - object.quotaValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; - } else - object.quotaValue = options.longs === String ? "0" : 0; - } - if (message.subject != null && message.hasOwnProperty("subject")) - object.subject = message.subject; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.apiService != null && message.hasOwnProperty("apiService")) - object.apiService = message.apiService; - if (message.quotaMetric != null && message.hasOwnProperty("quotaMetric")) - object.quotaMetric = message.quotaMetric; - if (message.quotaId != null && message.hasOwnProperty("quotaId")) - object.quotaId = message.quotaId; - var keys2; - if (message.quotaDimensions && (keys2 = Object.keys(message.quotaDimensions)).length) { - object.quotaDimensions = {}; - for (var j = 0; j < keys2.length; ++j) - object.quotaDimensions[keys2[j]] = message.quotaDimensions[keys2[j]]; - } - if (message.quotaValue != null && message.hasOwnProperty("quotaValue")) - if (typeof message.quotaValue === "number") - object.quotaValue = options.longs === String ? String(message.quotaValue) : message.quotaValue; - else - object.quotaValue = options.longs === String ? $util.Long.prototype.toString.call(message.quotaValue) : options.longs === Number ? new $util.LongBits(message.quotaValue.low >>> 0, message.quotaValue.high >>> 0).toNumber() : message.quotaValue; - if (message.futureQuotaValue != null && message.hasOwnProperty("futureQuotaValue")) { - if (typeof message.futureQuotaValue === "number") - object.futureQuotaValue = options.longs === String ? String(message.futureQuotaValue) : message.futureQuotaValue; - else - object.futureQuotaValue = options.longs === String ? $util.Long.prototype.toString.call(message.futureQuotaValue) : options.longs === Number ? new $util.LongBits(message.futureQuotaValue.low >>> 0, message.futureQuotaValue.high >>> 0).toNumber() : message.futureQuotaValue; - if (options.oneofs) - object._futureQuotaValue = "futureQuotaValue"; - } - return object; - }; - - /** - * Converts this Violation to JSON. - * @function toJSON - * @memberof google.rpc.QuotaFailure.Violation - * @instance - * @returns {Object.} JSON object - */ - Violation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Violation - * @function getTypeUrl - * @memberof google.rpc.QuotaFailure.Violation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Violation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.QuotaFailure.Violation"; - }; - - return Violation; - })(); - - return QuotaFailure; - })(); - - rpc.PreconditionFailure = (function() { - - /** - * Properties of a PreconditionFailure. - * @memberof google.rpc - * @interface IPreconditionFailure - * @property {Array.|null} [violations] PreconditionFailure violations - */ - - /** - * Constructs a new PreconditionFailure. - * @memberof google.rpc - * @classdesc Represents a PreconditionFailure. - * @implements IPreconditionFailure - * @constructor - * @param {google.rpc.IPreconditionFailure=} [properties] Properties to set - */ - function PreconditionFailure(properties) { - this.violations = []; - 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]]; - } - - /** - * PreconditionFailure violations. - * @member {Array.} violations - * @memberof google.rpc.PreconditionFailure - * @instance - */ - PreconditionFailure.prototype.violations = $util.emptyArray; - - /** - * Creates a new PreconditionFailure instance using the specified properties. - * @function create - * @memberof google.rpc.PreconditionFailure - * @static - * @param {google.rpc.IPreconditionFailure=} [properties] Properties to set - * @returns {google.rpc.PreconditionFailure} PreconditionFailure instance - */ - PreconditionFailure.create = function create(properties) { - return new PreconditionFailure(properties); - }; - - /** - * Encodes the specified PreconditionFailure message. Does not implicitly {@link google.rpc.PreconditionFailure.verify|verify} messages. - * @function encode - * @memberof google.rpc.PreconditionFailure - * @static - * @param {google.rpc.IPreconditionFailure} message PreconditionFailure message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PreconditionFailure.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.violations != null && message.violations.length) - for (var i = 0; i < message.violations.length; ++i) - $root.google.rpc.PreconditionFailure.Violation.encode(message.violations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified PreconditionFailure message, length delimited. Does not implicitly {@link google.rpc.PreconditionFailure.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.PreconditionFailure - * @static - * @param {google.rpc.IPreconditionFailure} message PreconditionFailure message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - PreconditionFailure.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a PreconditionFailure message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.PreconditionFailure - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.PreconditionFailure} PreconditionFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PreconditionFailure.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.PreconditionFailure(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.violations && message.violations.length)) - message.violations = []; - message.violations.push($root.google.rpc.PreconditionFailure.Violation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a PreconditionFailure message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.PreconditionFailure - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.PreconditionFailure} PreconditionFailure - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - PreconditionFailure.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a PreconditionFailure message. - * @function verify - * @memberof google.rpc.PreconditionFailure - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - PreconditionFailure.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.violations != null && message.hasOwnProperty("violations")) { - if (!Array.isArray(message.violations)) - return "violations: array expected"; - for (var i = 0; i < message.violations.length; ++i) { - var error = $root.google.rpc.PreconditionFailure.Violation.verify(message.violations[i]); - if (error) - return "violations." + error; - } - } - return null; - }; - - /** - * Creates a PreconditionFailure message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.PreconditionFailure - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.PreconditionFailure} PreconditionFailure - */ - PreconditionFailure.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.PreconditionFailure) - return object; - var message = new $root.google.rpc.PreconditionFailure(); - if (object.violations) { - if (!Array.isArray(object.violations)) - throw TypeError(".google.rpc.PreconditionFailure.violations: array expected"); - message.violations = []; - for (var i = 0; i < object.violations.length; ++i) { - if (typeof object.violations[i] !== "object") - throw TypeError(".google.rpc.PreconditionFailure.violations: object expected"); - message.violations[i] = $root.google.rpc.PreconditionFailure.Violation.fromObject(object.violations[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a PreconditionFailure message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.PreconditionFailure - * @static - * @param {google.rpc.PreconditionFailure} message PreconditionFailure - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - PreconditionFailure.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.violations = []; - if (message.violations && message.violations.length) { - object.violations = []; - for (var j = 0; j < message.violations.length; ++j) - object.violations[j] = $root.google.rpc.PreconditionFailure.Violation.toObject(message.violations[j], options); - } - return object; - }; - - /** - * Converts this PreconditionFailure to JSON. - * @function toJSON - * @memberof google.rpc.PreconditionFailure - * @instance - * @returns {Object.} JSON object - */ - PreconditionFailure.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for PreconditionFailure - * @function getTypeUrl - * @memberof google.rpc.PreconditionFailure - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - PreconditionFailure.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.PreconditionFailure"; - }; - - PreconditionFailure.Violation = (function() { - - /** - * Properties of a Violation. - * @memberof google.rpc.PreconditionFailure - * @interface IViolation - * @property {string|null} [type] Violation type - * @property {string|null} [subject] Violation subject - * @property {string|null} [description] Violation description - */ - - /** - * Constructs a new Violation. - * @memberof google.rpc.PreconditionFailure - * @classdesc Represents a Violation. - * @implements IViolation - * @constructor - * @param {google.rpc.PreconditionFailure.IViolation=} [properties] Properties to set - */ - function Violation(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]]; - } - - /** - * Violation type. - * @member {string} type - * @memberof google.rpc.PreconditionFailure.Violation - * @instance - */ - Violation.prototype.type = ""; - - /** - * Violation subject. - * @member {string} subject - * @memberof google.rpc.PreconditionFailure.Violation - * @instance - */ - Violation.prototype.subject = ""; - - /** - * Violation description. - * @member {string} description - * @memberof google.rpc.PreconditionFailure.Violation - * @instance - */ - Violation.prototype.description = ""; - - /** - * Creates a new Violation instance using the specified properties. - * @function create - * @memberof google.rpc.PreconditionFailure.Violation - * @static - * @param {google.rpc.PreconditionFailure.IViolation=} [properties] Properties to set - * @returns {google.rpc.PreconditionFailure.Violation} Violation instance - */ - Violation.create = function create(properties) { - return new Violation(properties); - }; - - /** - * Encodes the specified Violation message. Does not implicitly {@link google.rpc.PreconditionFailure.Violation.verify|verify} messages. - * @function encode - * @memberof google.rpc.PreconditionFailure.Violation - * @static - * @param {google.rpc.PreconditionFailure.IViolation} message Violation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Violation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.subject != null && Object.hasOwnProperty.call(message, "subject")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.subject); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.description); - return writer; - }; - - /** - * Encodes the specified Violation message, length delimited. Does not implicitly {@link google.rpc.PreconditionFailure.Violation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.PreconditionFailure.Violation - * @static - * @param {google.rpc.PreconditionFailure.IViolation} message Violation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Violation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Violation message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.PreconditionFailure.Violation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.PreconditionFailure.Violation} Violation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Violation.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.PreconditionFailure.Violation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - message.subject = reader.string(); - break; - } - case 3: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Violation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.PreconditionFailure.Violation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.PreconditionFailure.Violation} Violation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Violation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Violation message. - * @function verify - * @memberof google.rpc.PreconditionFailure.Violation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Violation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.subject != null && message.hasOwnProperty("subject")) - if (!$util.isString(message.subject)) - return "subject: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates a Violation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.PreconditionFailure.Violation - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.PreconditionFailure.Violation} Violation - */ - Violation.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.PreconditionFailure.Violation) - return object; - var message = new $root.google.rpc.PreconditionFailure.Violation(); - if (object.type != null) - message.type = String(object.type); - if (object.subject != null) - message.subject = String(object.subject); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from a Violation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.PreconditionFailure.Violation - * @static - * @param {google.rpc.PreconditionFailure.Violation} message Violation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Violation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.type = ""; - object.subject = ""; - object.description = ""; - } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.subject != null && message.hasOwnProperty("subject")) - object.subject = message.subject; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this Violation to JSON. - * @function toJSON - * @memberof google.rpc.PreconditionFailure.Violation - * @instance - * @returns {Object.} JSON object - */ - Violation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Violation - * @function getTypeUrl - * @memberof google.rpc.PreconditionFailure.Violation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Violation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.PreconditionFailure.Violation"; - }; - - return Violation; - })(); - - return PreconditionFailure; - })(); - - rpc.BadRequest = (function() { - - /** - * Properties of a BadRequest. - * @memberof google.rpc - * @interface IBadRequest - * @property {Array.|null} [fieldViolations] BadRequest fieldViolations - */ - - /** - * Constructs a new BadRequest. - * @memberof google.rpc - * @classdesc Represents a BadRequest. - * @implements IBadRequest - * @constructor - * @param {google.rpc.IBadRequest=} [properties] Properties to set - */ - function BadRequest(properties) { - this.fieldViolations = []; - 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]]; - } - - /** - * BadRequest fieldViolations. - * @member {Array.} fieldViolations - * @memberof google.rpc.BadRequest - * @instance - */ - BadRequest.prototype.fieldViolations = $util.emptyArray; - - /** - * Creates a new BadRequest instance using the specified properties. - * @function create - * @memberof google.rpc.BadRequest - * @static - * @param {google.rpc.IBadRequest=} [properties] Properties to set - * @returns {google.rpc.BadRequest} BadRequest instance - */ - BadRequest.create = function create(properties) { - return new BadRequest(properties); - }; - - /** - * Encodes the specified BadRequest message. Does not implicitly {@link google.rpc.BadRequest.verify|verify} messages. - * @function encode - * @memberof google.rpc.BadRequest - * @static - * @param {google.rpc.IBadRequest} message BadRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BadRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.fieldViolations != null && message.fieldViolations.length) - for (var i = 0; i < message.fieldViolations.length; ++i) - $root.google.rpc.BadRequest.FieldViolation.encode(message.fieldViolations[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified BadRequest message, length delimited. Does not implicitly {@link google.rpc.BadRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.BadRequest - * @static - * @param {google.rpc.IBadRequest} message BadRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - BadRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a BadRequest message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.BadRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.BadRequest} BadRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BadRequest.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.BadRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.fieldViolations && message.fieldViolations.length)) - message.fieldViolations = []; - message.fieldViolations.push($root.google.rpc.BadRequest.FieldViolation.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a BadRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.BadRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.BadRequest} BadRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - BadRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a BadRequest message. - * @function verify - * @memberof google.rpc.BadRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - BadRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.fieldViolations != null && message.hasOwnProperty("fieldViolations")) { - if (!Array.isArray(message.fieldViolations)) - return "fieldViolations: array expected"; - for (var i = 0; i < message.fieldViolations.length; ++i) { - var error = $root.google.rpc.BadRequest.FieldViolation.verify(message.fieldViolations[i]); - if (error) - return "fieldViolations." + error; - } - } - return null; - }; - - /** - * Creates a BadRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.BadRequest - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.BadRequest} BadRequest - */ - BadRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.BadRequest) - return object; - var message = new $root.google.rpc.BadRequest(); - if (object.fieldViolations) { - if (!Array.isArray(object.fieldViolations)) - throw TypeError(".google.rpc.BadRequest.fieldViolations: array expected"); - message.fieldViolations = []; - for (var i = 0; i < object.fieldViolations.length; ++i) { - if (typeof object.fieldViolations[i] !== "object") - throw TypeError(".google.rpc.BadRequest.fieldViolations: object expected"); - message.fieldViolations[i] = $root.google.rpc.BadRequest.FieldViolation.fromObject(object.fieldViolations[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a BadRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.BadRequest - * @static - * @param {google.rpc.BadRequest} message BadRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - BadRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.fieldViolations = []; - if (message.fieldViolations && message.fieldViolations.length) { - object.fieldViolations = []; - for (var j = 0; j < message.fieldViolations.length; ++j) - object.fieldViolations[j] = $root.google.rpc.BadRequest.FieldViolation.toObject(message.fieldViolations[j], options); - } - return object; - }; - - /** - * Converts this BadRequest to JSON. - * @function toJSON - * @memberof google.rpc.BadRequest - * @instance - * @returns {Object.} JSON object - */ - BadRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for BadRequest - * @function getTypeUrl - * @memberof google.rpc.BadRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - BadRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.BadRequest"; - }; - - BadRequest.FieldViolation = (function() { - - /** - * Properties of a FieldViolation. - * @memberof google.rpc.BadRequest - * @interface IFieldViolation - * @property {string|null} [field] FieldViolation field - * @property {string|null} [description] FieldViolation description - * @property {string|null} [reason] FieldViolation reason - * @property {google.rpc.ILocalizedMessage|null} [localizedMessage] FieldViolation localizedMessage - */ - - /** - * Constructs a new FieldViolation. - * @memberof google.rpc.BadRequest - * @classdesc Represents a FieldViolation. - * @implements IFieldViolation - * @constructor - * @param {google.rpc.BadRequest.IFieldViolation=} [properties] Properties to set - */ - function FieldViolation(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]]; - } - - /** - * FieldViolation field. - * @member {string} field - * @memberof google.rpc.BadRequest.FieldViolation - * @instance - */ - FieldViolation.prototype.field = ""; - - /** - * FieldViolation description. - * @member {string} description - * @memberof google.rpc.BadRequest.FieldViolation - * @instance - */ - FieldViolation.prototype.description = ""; - - /** - * FieldViolation reason. - * @member {string} reason - * @memberof google.rpc.BadRequest.FieldViolation - * @instance - */ - FieldViolation.prototype.reason = ""; - - /** - * FieldViolation localizedMessage. - * @member {google.rpc.ILocalizedMessage|null|undefined} localizedMessage - * @memberof google.rpc.BadRequest.FieldViolation - * @instance - */ - FieldViolation.prototype.localizedMessage = null; - - /** - * Creates a new FieldViolation instance using the specified properties. - * @function create - * @memberof google.rpc.BadRequest.FieldViolation - * @static - * @param {google.rpc.BadRequest.IFieldViolation=} [properties] Properties to set - * @returns {google.rpc.BadRequest.FieldViolation} FieldViolation instance - */ - FieldViolation.create = function create(properties) { - return new FieldViolation(properties); - }; - - /** - * Encodes the specified FieldViolation message. Does not implicitly {@link google.rpc.BadRequest.FieldViolation.verify|verify} messages. - * @function encode - * @memberof google.rpc.BadRequest.FieldViolation - * @static - * @param {google.rpc.BadRequest.IFieldViolation} message FieldViolation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldViolation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.field != null && Object.hasOwnProperty.call(message, "field")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.field); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.description); - if (message.reason != null && Object.hasOwnProperty.call(message, "reason")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.reason); - if (message.localizedMessage != null && Object.hasOwnProperty.call(message, "localizedMessage")) - $root.google.rpc.LocalizedMessage.encode(message.localizedMessage, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified FieldViolation message, length delimited. Does not implicitly {@link google.rpc.BadRequest.FieldViolation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.BadRequest.FieldViolation - * @static - * @param {google.rpc.BadRequest.IFieldViolation} message FieldViolation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - FieldViolation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a FieldViolation message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.BadRequest.FieldViolation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.BadRequest.FieldViolation} FieldViolation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldViolation.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.BadRequest.FieldViolation(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.field = reader.string(); - break; - } - case 2: { - message.description = reader.string(); - break; - } - case 3: { - message.reason = reader.string(); - break; - } - case 4: { - message.localizedMessage = $root.google.rpc.LocalizedMessage.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a FieldViolation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.BadRequest.FieldViolation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.BadRequest.FieldViolation} FieldViolation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - FieldViolation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a FieldViolation message. - * @function verify - * @memberof google.rpc.BadRequest.FieldViolation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - FieldViolation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.field != null && message.hasOwnProperty("field")) - if (!$util.isString(message.field)) - return "field: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.reason != null && message.hasOwnProperty("reason")) - if (!$util.isString(message.reason)) - return "reason: string expected"; - if (message.localizedMessage != null && message.hasOwnProperty("localizedMessage")) { - var error = $root.google.rpc.LocalizedMessage.verify(message.localizedMessage); - if (error) - return "localizedMessage." + error; - } - return null; - }; - - /** - * Creates a FieldViolation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.BadRequest.FieldViolation - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.BadRequest.FieldViolation} FieldViolation - */ - FieldViolation.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.BadRequest.FieldViolation) - return object; - var message = new $root.google.rpc.BadRequest.FieldViolation(); - if (object.field != null) - message.field = String(object.field); - if (object.description != null) - message.description = String(object.description); - if (object.reason != null) - message.reason = String(object.reason); - if (object.localizedMessage != null) { - if (typeof object.localizedMessage !== "object") - throw TypeError(".google.rpc.BadRequest.FieldViolation.localizedMessage: object expected"); - message.localizedMessage = $root.google.rpc.LocalizedMessage.fromObject(object.localizedMessage); - } - return message; - }; - - /** - * Creates a plain object from a FieldViolation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.BadRequest.FieldViolation - * @static - * @param {google.rpc.BadRequest.FieldViolation} message FieldViolation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - FieldViolation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.field = ""; - object.description = ""; - object.reason = ""; - object.localizedMessage = null; - } - if (message.field != null && message.hasOwnProperty("field")) - object.field = message.field; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.reason != null && message.hasOwnProperty("reason")) - object.reason = message.reason; - if (message.localizedMessage != null && message.hasOwnProperty("localizedMessage")) - object.localizedMessage = $root.google.rpc.LocalizedMessage.toObject(message.localizedMessage, options); - return object; - }; - - /** - * Converts this FieldViolation to JSON. - * @function toJSON - * @memberof google.rpc.BadRequest.FieldViolation - * @instance - * @returns {Object.} JSON object - */ - FieldViolation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for FieldViolation - * @function getTypeUrl - * @memberof google.rpc.BadRequest.FieldViolation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - FieldViolation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.BadRequest.FieldViolation"; - }; - - return FieldViolation; - })(); - - return BadRequest; - })(); - - rpc.RequestInfo = (function() { - - /** - * Properties of a RequestInfo. - * @memberof google.rpc - * @interface IRequestInfo - * @property {string|null} [requestId] RequestInfo requestId - * @property {string|null} [servingData] RequestInfo servingData - */ - - /** - * Constructs a new RequestInfo. - * @memberof google.rpc - * @classdesc Represents a RequestInfo. - * @implements IRequestInfo - * @constructor - * @param {google.rpc.IRequestInfo=} [properties] Properties to set - */ - function RequestInfo(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]]; - } - - /** - * RequestInfo requestId. - * @member {string} requestId - * @memberof google.rpc.RequestInfo - * @instance - */ - RequestInfo.prototype.requestId = ""; - - /** - * RequestInfo servingData. - * @member {string} servingData - * @memberof google.rpc.RequestInfo - * @instance - */ - RequestInfo.prototype.servingData = ""; - - /** - * Creates a new RequestInfo instance using the specified properties. - * @function create - * @memberof google.rpc.RequestInfo - * @static - * @param {google.rpc.IRequestInfo=} [properties] Properties to set - * @returns {google.rpc.RequestInfo} RequestInfo instance - */ - RequestInfo.create = function create(properties) { - return new RequestInfo(properties); - }; - - /** - * Encodes the specified RequestInfo message. Does not implicitly {@link google.rpc.RequestInfo.verify|verify} messages. - * @function encode - * @memberof google.rpc.RequestInfo - * @static - * @param {google.rpc.IRequestInfo} message RequestInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.requestId); - if (message.servingData != null && Object.hasOwnProperty.call(message, "servingData")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.servingData); - return writer; - }; - - /** - * Encodes the specified RequestInfo message, length delimited. Does not implicitly {@link google.rpc.RequestInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.RequestInfo - * @static - * @param {google.rpc.IRequestInfo} message RequestInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - RequestInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a RequestInfo message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.RequestInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.RequestInfo} RequestInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.RequestInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.requestId = reader.string(); - break; - } - case 2: { - message.servingData = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a RequestInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.RequestInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.RequestInfo} RequestInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - RequestInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a RequestInfo message. - * @function verify - * @memberof google.rpc.RequestInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - RequestInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; - if (message.servingData != null && message.hasOwnProperty("servingData")) - if (!$util.isString(message.servingData)) - return "servingData: string expected"; - return null; - }; - - /** - * Creates a RequestInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.RequestInfo - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.RequestInfo} RequestInfo - */ - RequestInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.RequestInfo) - return object; - var message = new $root.google.rpc.RequestInfo(); - if (object.requestId != null) - message.requestId = String(object.requestId); - if (object.servingData != null) - message.servingData = String(object.servingData); - return message; - }; - - /** - * Creates a plain object from a RequestInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.RequestInfo - * @static - * @param {google.rpc.RequestInfo} message RequestInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - RequestInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.requestId = ""; - object.servingData = ""; - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.servingData != null && message.hasOwnProperty("servingData")) - object.servingData = message.servingData; - return object; - }; - - /** - * Converts this RequestInfo to JSON. - * @function toJSON - * @memberof google.rpc.RequestInfo - * @instance - * @returns {Object.} JSON object - */ - RequestInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for RequestInfo - * @function getTypeUrl - * @memberof google.rpc.RequestInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - RequestInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.RequestInfo"; - }; - - return RequestInfo; - })(); - - rpc.ResourceInfo = (function() { - - /** - * Properties of a ResourceInfo. - * @memberof google.rpc - * @interface IResourceInfo - * @property {string|null} [resourceType] ResourceInfo resourceType - * @property {string|null} [resourceName] ResourceInfo resourceName - * @property {string|null} [owner] ResourceInfo owner - * @property {string|null} [description] ResourceInfo description - */ - - /** - * Constructs a new ResourceInfo. - * @memberof google.rpc - * @classdesc Represents a ResourceInfo. - * @implements IResourceInfo - * @constructor - * @param {google.rpc.IResourceInfo=} [properties] Properties to set - */ - function ResourceInfo(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]]; - } - - /** - * ResourceInfo resourceType. - * @member {string} resourceType - * @memberof google.rpc.ResourceInfo - * @instance - */ - ResourceInfo.prototype.resourceType = ""; - - /** - * ResourceInfo resourceName. - * @member {string} resourceName - * @memberof google.rpc.ResourceInfo - * @instance - */ - ResourceInfo.prototype.resourceName = ""; - - /** - * ResourceInfo owner. - * @member {string} owner - * @memberof google.rpc.ResourceInfo - * @instance - */ - ResourceInfo.prototype.owner = ""; - - /** - * ResourceInfo description. - * @member {string} description - * @memberof google.rpc.ResourceInfo - * @instance - */ - ResourceInfo.prototype.description = ""; - - /** - * Creates a new ResourceInfo instance using the specified properties. - * @function create - * @memberof google.rpc.ResourceInfo - * @static - * @param {google.rpc.IResourceInfo=} [properties] Properties to set - * @returns {google.rpc.ResourceInfo} ResourceInfo instance - */ - ResourceInfo.create = function create(properties) { - return new ResourceInfo(properties); - }; - - /** - * Encodes the specified ResourceInfo message. Does not implicitly {@link google.rpc.ResourceInfo.verify|verify} messages. - * @function encode - * @memberof google.rpc.ResourceInfo - * @static - * @param {google.rpc.IResourceInfo} message ResourceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.resourceType != null && Object.hasOwnProperty.call(message, "resourceType")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.resourceType); - if (message.resourceName != null && Object.hasOwnProperty.call(message, "resourceName")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.resourceName); - if (message.owner != null && Object.hasOwnProperty.call(message, "owner")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.owner); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.description); - return writer; - }; - - /** - * Encodes the specified ResourceInfo message, length delimited. Does not implicitly {@link google.rpc.ResourceInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.ResourceInfo - * @static - * @param {google.rpc.IResourceInfo} message ResourceInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ResourceInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ResourceInfo message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.ResourceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.ResourceInfo} ResourceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceInfo.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.ResourceInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.resourceType = reader.string(); - break; - } - case 2: { - message.resourceName = reader.string(); - break; - } - case 3: { - message.owner = reader.string(); - break; - } - case 4: { - message.description = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ResourceInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.ResourceInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.ResourceInfo} ResourceInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ResourceInfo message. - * @function verify - * @memberof google.rpc.ResourceInfo - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ResourceInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - if (!$util.isString(message.resourceType)) - return "resourceType: string expected"; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - if (!$util.isString(message.resourceName)) - return "resourceName: string expected"; - if (message.owner != null && message.hasOwnProperty("owner")) - if (!$util.isString(message.owner)) - return "owner: string expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - return null; - }; - - /** - * Creates a ResourceInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.ResourceInfo - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.ResourceInfo} ResourceInfo - */ - ResourceInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.ResourceInfo) - return object; - var message = new $root.google.rpc.ResourceInfo(); - if (object.resourceType != null) - message.resourceType = String(object.resourceType); - if (object.resourceName != null) - message.resourceName = String(object.resourceName); - if (object.owner != null) - message.owner = String(object.owner); - if (object.description != null) - message.description = String(object.description); - return message; - }; - - /** - * Creates a plain object from a ResourceInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.ResourceInfo - * @static - * @param {google.rpc.ResourceInfo} message ResourceInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ResourceInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.resourceType = ""; - object.resourceName = ""; - object.owner = ""; - object.description = ""; - } - if (message.resourceType != null && message.hasOwnProperty("resourceType")) - object.resourceType = message.resourceType; - if (message.resourceName != null && message.hasOwnProperty("resourceName")) - object.resourceName = message.resourceName; - if (message.owner != null && message.hasOwnProperty("owner")) - object.owner = message.owner; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - return object; - }; - - /** - * Converts this ResourceInfo to JSON. - * @function toJSON - * @memberof google.rpc.ResourceInfo - * @instance - * @returns {Object.} JSON object - */ - ResourceInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ResourceInfo - * @function getTypeUrl - * @memberof google.rpc.ResourceInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ResourceInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.ResourceInfo"; - }; - - return ResourceInfo; - })(); - - rpc.Help = (function() { - - /** - * Properties of a Help. - * @memberof google.rpc - * @interface IHelp - * @property {Array.|null} [links] Help links - */ - - /** - * Constructs a new Help. - * @memberof google.rpc - * @classdesc Represents a Help. - * @implements IHelp - * @constructor - * @param {google.rpc.IHelp=} [properties] Properties to set - */ - function Help(properties) { - this.links = []; - 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]]; - } - - /** - * Help links. - * @member {Array.} links - * @memberof google.rpc.Help - * @instance - */ - Help.prototype.links = $util.emptyArray; - - /** - * Creates a new Help instance using the specified properties. - * @function create - * @memberof google.rpc.Help - * @static - * @param {google.rpc.IHelp=} [properties] Properties to set - * @returns {google.rpc.Help} Help instance - */ - Help.create = function create(properties) { - return new Help(properties); - }; - - /** - * Encodes the specified Help message. Does not implicitly {@link google.rpc.Help.verify|verify} messages. - * @function encode - * @memberof google.rpc.Help - * @static - * @param {google.rpc.IHelp} message Help message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Help.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.links != null && message.links.length) - for (var i = 0; i < message.links.length; ++i) - $root.google.rpc.Help.Link.encode(message.links[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Help message, length delimited. Does not implicitly {@link google.rpc.Help.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Help - * @static - * @param {google.rpc.IHelp} message Help message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Help.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Help message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Help - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Help} Help - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Help.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Help(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - if (!(message.links && message.links.length)) - message.links = []; - message.links.push($root.google.rpc.Help.Link.decode(reader, reader.uint32())); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Help message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Help - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Help} Help - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Help.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Help message. - * @function verify - * @memberof google.rpc.Help - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Help.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.links != null && message.hasOwnProperty("links")) { - if (!Array.isArray(message.links)) - return "links: array expected"; - for (var i = 0; i < message.links.length; ++i) { - var error = $root.google.rpc.Help.Link.verify(message.links[i]); - if (error) - return "links." + error; - } - } - return null; - }; - - /** - * Creates a Help message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Help - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Help} Help - */ - Help.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Help) - return object; - var message = new $root.google.rpc.Help(); - if (object.links) { - if (!Array.isArray(object.links)) - throw TypeError(".google.rpc.Help.links: array expected"); - message.links = []; - for (var i = 0; i < object.links.length; ++i) { - if (typeof object.links[i] !== "object") - throw TypeError(".google.rpc.Help.links: object expected"); - message.links[i] = $root.google.rpc.Help.Link.fromObject(object.links[i]); - } - } - return message; - }; - - /** - * Creates a plain object from a Help message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Help - * @static - * @param {google.rpc.Help} message Help - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Help.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.links = []; - if (message.links && message.links.length) { - object.links = []; - for (var j = 0; j < message.links.length; ++j) - object.links[j] = $root.google.rpc.Help.Link.toObject(message.links[j], options); - } - return object; - }; - - /** - * Converts this Help to JSON. - * @function toJSON - * @memberof google.rpc.Help - * @instance - * @returns {Object.} JSON object - */ - Help.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Help - * @function getTypeUrl - * @memberof google.rpc.Help - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Help.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Help"; - }; - - Help.Link = (function() { - - /** - * Properties of a Link. - * @memberof google.rpc.Help - * @interface ILink - * @property {string|null} [description] Link description - * @property {string|null} [url] Link url - */ - - /** - * Constructs a new Link. - * @memberof google.rpc.Help - * @classdesc Represents a Link. - * @implements ILink - * @constructor - * @param {google.rpc.Help.ILink=} [properties] Properties to set - */ - function Link(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]]; - } - - /** - * Link description. - * @member {string} description - * @memberof google.rpc.Help.Link - * @instance - */ - Link.prototype.description = ""; - - /** - * Link url. - * @member {string} url - * @memberof google.rpc.Help.Link - * @instance - */ - Link.prototype.url = ""; - - /** - * Creates a new Link instance using the specified properties. - * @function create - * @memberof google.rpc.Help.Link - * @static - * @param {google.rpc.Help.ILink=} [properties] Properties to set - * @returns {google.rpc.Help.Link} Link instance - */ - Link.create = function create(properties) { - return new Link(properties); - }; - - /** - * Encodes the specified Link message. Does not implicitly {@link google.rpc.Help.Link.verify|verify} messages. - * @function encode - * @memberof google.rpc.Help.Link - * @static - * @param {google.rpc.Help.ILink} message Link message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Link.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); - if (message.url != null && Object.hasOwnProperty.call(message, "url")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.url); - return writer; - }; - - /** - * Encodes the specified Link message, length delimited. Does not implicitly {@link google.rpc.Help.Link.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.Help.Link - * @static - * @param {google.rpc.Help.ILink} message Link message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Link.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Link message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.Help.Link - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.Help.Link} Link - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Link.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.Help.Link(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.description = reader.string(); - break; - } - case 2: { - message.url = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Link message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.Help.Link - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.Help.Link} Link - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Link.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Link message. - * @function verify - * @memberof google.rpc.Help.Link - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Link.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.url != null && message.hasOwnProperty("url")) - if (!$util.isString(message.url)) - return "url: string expected"; - return null; - }; - - /** - * Creates a Link message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.Help.Link - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.Help.Link} Link - */ - Link.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.Help.Link) - return object; - var message = new $root.google.rpc.Help.Link(); - if (object.description != null) - message.description = String(object.description); - if (object.url != null) - message.url = String(object.url); - return message; - }; - - /** - * Creates a plain object from a Link message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.Help.Link - * @static - * @param {google.rpc.Help.Link} message Link - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Link.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.description = ""; - object.url = ""; - } - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - if (message.url != null && message.hasOwnProperty("url")) - object.url = message.url; - return object; - }; - - /** - * Converts this Link to JSON. - * @function toJSON - * @memberof google.rpc.Help.Link - * @instance - * @returns {Object.} JSON object - */ - Link.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Link - * @function getTypeUrl - * @memberof google.rpc.Help.Link - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Link.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.Help.Link"; - }; - - return Link; - })(); - - return Help; - })(); - - rpc.LocalizedMessage = (function() { - - /** - * Properties of a LocalizedMessage. - * @memberof google.rpc - * @interface ILocalizedMessage - * @property {string|null} [locale] LocalizedMessage locale - * @property {string|null} [message] LocalizedMessage message - */ - - /** - * Constructs a new LocalizedMessage. - * @memberof google.rpc - * @classdesc Represents a LocalizedMessage. - * @implements ILocalizedMessage - * @constructor - * @param {google.rpc.ILocalizedMessage=} [properties] Properties to set - */ - function LocalizedMessage(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]]; - } - - /** - * LocalizedMessage locale. - * @member {string} locale - * @memberof google.rpc.LocalizedMessage - * @instance - */ - LocalizedMessage.prototype.locale = ""; - - /** - * LocalizedMessage message. - * @member {string} message - * @memberof google.rpc.LocalizedMessage - * @instance - */ - LocalizedMessage.prototype.message = ""; - - /** - * Creates a new LocalizedMessage instance using the specified properties. - * @function create - * @memberof google.rpc.LocalizedMessage - * @static - * @param {google.rpc.ILocalizedMessage=} [properties] Properties to set - * @returns {google.rpc.LocalizedMessage} LocalizedMessage instance - */ - LocalizedMessage.create = function create(properties) { - return new LocalizedMessage(properties); - }; - - /** - * Encodes the specified LocalizedMessage message. Does not implicitly {@link google.rpc.LocalizedMessage.verify|verify} messages. - * @function encode - * @memberof google.rpc.LocalizedMessage - * @static - * @param {google.rpc.ILocalizedMessage} message LocalizedMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocalizedMessage.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.locale != null && Object.hasOwnProperty.call(message, "locale")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.locale); - if (message.message != null && Object.hasOwnProperty.call(message, "message")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.message); - return writer; - }; - - /** - * Encodes the specified LocalizedMessage message, length delimited. Does not implicitly {@link google.rpc.LocalizedMessage.verify|verify} messages. - * @function encodeDelimited - * @memberof google.rpc.LocalizedMessage - * @static - * @param {google.rpc.ILocalizedMessage} message LocalizedMessage message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LocalizedMessage.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a LocalizedMessage message from the specified reader or buffer. - * @function decode - * @memberof google.rpc.LocalizedMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.rpc.LocalizedMessage} LocalizedMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocalizedMessage.decode = function decode(reader, length, error) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.rpc.LocalizedMessage(); - while (reader.pos < end) { - var tag = reader.uint32(); - if (tag === error) - break; - switch (tag >>> 3) { - case 1: { - message.locale = reader.string(); - break; - } - case 2: { - message.message = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a LocalizedMessage message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.rpc.LocalizedMessage - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.rpc.LocalizedMessage} LocalizedMessage - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LocalizedMessage.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a LocalizedMessage message. - * @function verify - * @memberof google.rpc.LocalizedMessage - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - LocalizedMessage.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.locale != null && message.hasOwnProperty("locale")) - if (!$util.isString(message.locale)) - return "locale: string expected"; - if (message.message != null && message.hasOwnProperty("message")) - if (!$util.isString(message.message)) - return "message: string expected"; - return null; - }; - - /** - * Creates a LocalizedMessage message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.rpc.LocalizedMessage - * @static - * @param {Object.} object Plain object - * @returns {google.rpc.LocalizedMessage} LocalizedMessage - */ - LocalizedMessage.fromObject = function fromObject(object) { - if (object instanceof $root.google.rpc.LocalizedMessage) - return object; - var message = new $root.google.rpc.LocalizedMessage(); - if (object.locale != null) - message.locale = String(object.locale); - if (object.message != null) - message.message = String(object.message); - return message; - }; - - /** - * Creates a plain object from a LocalizedMessage message. Also converts values to other types if specified. - * @function toObject - * @memberof google.rpc.LocalizedMessage - * @static - * @param {google.rpc.LocalizedMessage} message LocalizedMessage - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LocalizedMessage.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.locale = ""; - object.message = ""; - } - if (message.locale != null && message.hasOwnProperty("locale")) - object.locale = message.locale; - if (message.message != null && message.hasOwnProperty("message")) - object.message = message.message; - return object; - }; - - /** - * Converts this LocalizedMessage to JSON. - * @function toJSON - * @memberof google.rpc.LocalizedMessage - * @instance - * @returns {Object.} JSON object - */ - LocalizedMessage.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LocalizedMessage - * @function getTypeUrl - * @memberof google.rpc.LocalizedMessage - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LocalizedMessage.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.rpc.LocalizedMessage"; - }; - - return LocalizedMessage; - })(); - - return rpc; - })(); - - return google; - })(); - - return $root; -}); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.json b/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.json deleted file mode 100644 index 47c7fc1c94c6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/protos/protos.json +++ /dev/null @@ -1,5006 +0,0 @@ -{ - "nested": { - "google": { - "nested": { - "cloud": { - "nested": { - "bigquery": { - "nested": { - "migration": { - "nested": { - "v2": { - "options": { - "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": "TranslationSuggestionProto", - "java_package": "com.google.cloud.bigquery.migration.v2", - "php_namespace": "Google\\Cloud\\BigQuery\\Migration\\V2" - }, - "nested": { - "AssessmentTaskDetails": { - "oneofs": { - "_featureHandle": { - "oneof": [ - "featureHandle" - ] - } - }, - "fields": { - "inputPath": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "outputDataset": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "querylogsPath": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dataSource": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "featureHandle": { - "type": "AssessmentFeatureHandle", - "id": 6, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "AssessmentFeatureHandle": { - "oneofs": { - "_addShareableDataset": { - "oneof": [ - "addShareableDataset" - ] - } - }, - "fields": { - "addShareableDataset": { - "type": "bool", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL", - "proto3_optional": true - } - } - } - }, - "MigrationWorkflow": { - "options": { - "(google.api.resource).type": "bigquerymigration.googleapis.com/MigrationWorkflow", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/workflows/{workflow}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IDENTIFIER" - } - }, - "displayName": { - "type": "string", - "id": 6 - }, - "tasks": { - "keyType": "string", - "type": "MigrationTask", - "id": 2 - }, - "state": { - "type": "State", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "DRAFT": 1, - "RUNNING": 2, - "PAUSED": 3, - "COMPLETED": 4 - } - } - } - }, - "MigrationTask": { - "oneofs": { - "taskDetails": { - "oneof": [ - "assessmentTaskDetails", - "translationConfigDetails", - "translationDetails" - ] - } - }, - "fields": { - "assessmentTaskDetails": { - "type": "AssessmentTaskDetails", - "id": 12 - }, - "translationConfigDetails": { - "type": "TranslationConfigDetails", - "id": 14 - }, - "translationDetails": { - "type": "TranslationDetails", - "id": 16 - }, - "id": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "type": { - "type": "string", - "id": 2 - }, - "state": { - "type": "State", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "processingError": { - "type": "google.rpc.ErrorInfo", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceErrorDetails": { - "rule": "repeated", - "type": "ResourceErrorDetail", - "id": 17, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceErrorCount": { - "type": "int32", - "id": 18, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "metrics": { - "rule": "repeated", - "type": "TimeSeries", - "id": 19, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "taskResult": { - "type": "MigrationTaskResult", - "id": 20, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "totalProcessingErrorCount": { - "type": "int32", - "id": 21, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "totalResourceErrorCount": { - "type": "int32", - "id": 22, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "PENDING": 1, - "ORCHESTRATING": 2, - "RUNNING": 3, - "PAUSED": 4, - "SUCCEEDED": 5, - "FAILED": 6 - } - } - } - }, - "MigrationSubtask": { - "options": { - "(google.api.resource).type": "bigquerymigration.googleapis.com/MigrationSubtask", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "taskId": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "state": { - "type": "State", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "processingError": { - "type": "google.rpc.ErrorInfo", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceErrorDetails": { - "rule": "repeated", - "type": "ResourceErrorDetail", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceErrorCount": { - "type": "int32", - "id": 13, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 7, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "lastUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 8, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "metrics": { - "rule": "repeated", - "type": "TimeSeries", - "id": 11, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "RUNNING": 2, - "SUCCEEDED": 3, - "FAILED": 4, - "PAUSED": 5, - "PENDING_DEPENDENCY": 6 - } - } - } - }, - "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 - }, - "consoleUri": { - "type": "string", - "id": 3 - } - } - }, - "ResourceErrorDetail": { - "fields": { - "resourceInfo": { - "type": "google.rpc.ResourceInfo", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "errorDetails": { - "rule": "repeated", - "type": "ErrorDetail", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "errorCount": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ErrorDetail": { - "fields": { - "location": { - "type": "ErrorLocation", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "errorInfo": { - "type": "google.rpc.ErrorInfo", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ErrorLocation": { - "fields": { - "line": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "column": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "TimeSeries": { - "fields": { - "metric": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "valueType": { - "type": "google.api.MetricDescriptor.ValueType", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "metricKind": { - "type": "google.api.MetricDescriptor.MetricKind", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "points": { - "rule": "repeated", - "type": "Point", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "Point": { - "fields": { - "interval": { - "type": "TimeInterval", - "id": 1 - }, - "value": { - "type": "TypedValue", - "id": 2 - } - } - }, - "TimeInterval": { - "fields": { - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "TypedValue": { - "oneofs": { - "value": { - "oneof": [ - "boolValue", - "int64Value", - "doubleValue", - "stringValue", - "distributionValue" - ] - } - }, - "fields": { - "boolValue": { - "type": "bool", - "id": 1 - }, - "int64Value": { - "type": "int64", - "id": 2 - }, - "doubleValue": { - "type": "double", - "id": 3 - }, - "stringValue": { - "type": "string", - "id": 4 - }, - "distributionValue": { - "type": "google.api.Distribution", - "id": 5 - } - } - }, - "TranslationConfigDetails": { - "oneofs": { - "sourceLocation": { - "oneof": [ - "gcsSourcePath" - ] - }, - "targetLocation": { - "oneof": [ - "gcsTargetPath" - ] - }, - "outputNameMapping": { - "oneof": [ - "nameMappingList" - ] - } - }, - "fields": { - "gcsSourcePath": { - "type": "string", - "id": 1 - }, - "gcsTargetPath": { - "type": "string", - "id": 2 - }, - "nameMappingList": { - "type": "ObjectNameMappingList", - "id": 5 - }, - "sourceDialect": { - "type": "Dialect", - "id": 3 - }, - "targetDialect": { - "type": "Dialect", - "id": 4 - }, - "sourceEnv": { - "type": "SourceEnv", - "id": 6 - }, - "requestSource": { - "type": "string", - "id": 8 - }, - "targetTypes": { - "rule": "repeated", - "type": "string", - "id": 9 - } - } - }, - "Dialect": { - "oneofs": { - "dialectValue": { - "oneof": [ - "bigqueryDialect", - "hiveqlDialect", - "redshiftDialect", - "teradataDialect", - "oracleDialect", - "sparksqlDialect", - "snowflakeDialect", - "netezzaDialect", - "azureSynapseDialect", - "verticaDialect", - "sqlServerDialect", - "postgresqlDialect", - "prestoDialect", - "mysqlDialect", - "db2Dialect", - "sqliteDialect", - "greenplumDialect" - ] - } - }, - "fields": { - "bigqueryDialect": { - "type": "BigQueryDialect", - "id": 1 - }, - "hiveqlDialect": { - "type": "HiveQLDialect", - "id": 2 - }, - "redshiftDialect": { - "type": "RedshiftDialect", - "id": 3 - }, - "teradataDialect": { - "type": "TeradataDialect", - "id": 4 - }, - "oracleDialect": { - "type": "OracleDialect", - "id": 5 - }, - "sparksqlDialect": { - "type": "SparkSQLDialect", - "id": 6 - }, - "snowflakeDialect": { - "type": "SnowflakeDialect", - "id": 7 - }, - "netezzaDialect": { - "type": "NetezzaDialect", - "id": 8 - }, - "azureSynapseDialect": { - "type": "AzureSynapseDialect", - "id": 9 - }, - "verticaDialect": { - "type": "VerticaDialect", - "id": 10 - }, - "sqlServerDialect": { - "type": "SQLServerDialect", - "id": 11 - }, - "postgresqlDialect": { - "type": "PostgresqlDialect", - "id": 12 - }, - "prestoDialect": { - "type": "PrestoDialect", - "id": 13 - }, - "mysqlDialect": { - "type": "MySQLDialect", - "id": 14 - }, - "db2Dialect": { - "type": "DB2Dialect", - "id": 15 - }, - "sqliteDialect": { - "type": "SQLiteDialect", - "id": 16 - }, - "greenplumDialect": { - "type": "GreenplumDialect", - "id": 17 - } - } - }, - "BigQueryDialect": { - "fields": {} - }, - "HiveQLDialect": { - "fields": {} - }, - "RedshiftDialect": { - "fields": {} - }, - "TeradataDialect": { - "fields": { - "mode": { - "type": "Mode", - "id": 1 - } - }, - "nested": { - "Mode": { - "values": { - "MODE_UNSPECIFIED": 0, - "SQL": 1, - "BTEQ": 2 - } - } - } - }, - "OracleDialect": { - "fields": {} - }, - "SparkSQLDialect": { - "fields": {} - }, - "SnowflakeDialect": { - "fields": {} - }, - "NetezzaDialect": { - "fields": {} - }, - "AzureSynapseDialect": { - "fields": {} - }, - "VerticaDialect": { - "fields": {} - }, - "SQLServerDialect": { - "fields": {} - }, - "PostgresqlDialect": { - "fields": {} - }, - "PrestoDialect": { - "fields": {} - }, - "MySQLDialect": { - "fields": {} - }, - "DB2Dialect": { - "fields": {} - }, - "SQLiteDialect": { - "fields": {} - }, - "GreenplumDialect": { - "fields": {} - }, - "ObjectNameMappingList": { - "fields": { - "nameMap": { - "rule": "repeated", - "type": "ObjectNameMapping", - "id": 1 - } - } - }, - "ObjectNameMapping": { - "fields": { - "source": { - "type": "NameMappingKey", - "id": 1 - }, - "target": { - "type": "NameMappingValue", - "id": 2 - } - } - }, - "NameMappingKey": { - "fields": { - "type": { - "type": "Type", - "id": 1 - }, - "database": { - "type": "string", - "id": 2 - }, - "schema": { - "type": "string", - "id": 3 - }, - "relation": { - "type": "string", - "id": 4 - }, - "attribute": { - "type": "string", - "id": 5 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_UNSPECIFIED": 0, - "DATABASE": 1, - "SCHEMA": 2, - "RELATION": 3, - "ATTRIBUTE": 4, - "RELATION_ALIAS": 5, - "ATTRIBUTE_ALIAS": 6, - "FUNCTION": 7 - } - } - } - }, - "NameMappingValue": { - "fields": { - "database": { - "type": "string", - "id": 1 - }, - "schema": { - "type": "string", - "id": 2 - }, - "relation": { - "type": "string", - "id": 3 - }, - "attribute": { - "type": "string", - "id": 4 - } - } - }, - "SourceEnv": { - "fields": { - "defaultDatabase": { - "type": "string", - "id": 1 - }, - "schemaSearchPath": { - "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 - }, - "suggestionConfig": { - "type": "SuggestionConfig", - "id": 6 - } - } - }, - "SuggestionConfig": { - "fields": { - "skipSuggestionSteps": { - "rule": "repeated", - "type": "SuggestionStep", - "id": 1 - } - } - }, - "SuggestionStep": { - "fields": { - "suggestionType": { - "type": "SuggestionType", - "id": 1 - }, - "rewriteTarget": { - "type": "RewriteTarget", - "id": 2 - } - }, - "nested": { - "SuggestionType": { - "values": { - "SUGGESTION_TYPE_UNSPECIFIED": 0, - "QUERY_CUSTOMIZATION": 1, - "TRANSLATION_EXPLANATION": 2 - } - }, - "RewriteTarget": { - "values": { - "REWRITE_TARGET_UNSPECIFIED": 0, - "SOURCE_SQL": 1, - "TARGET_SQL": 2 - } - } - } - }, - "SourceTargetMapping": { - "fields": { - "sourceSpec": { - "type": "SourceSpec", - "id": 1 - }, - "targetSpec": { - "type": "TargetSpec", - "id": 2 - } - } - }, - "SourceSpec": { - "oneofs": { - "source": { - "oneof": [ - "baseUri", - "literal", - "gcsFilePath" - ] - } - }, - "fields": { - "baseUri": { - "type": "string", - "id": 1 - }, - "literal": { - "type": "Literal", - "id": 2 - }, - "gcsFilePath": { - "type": "string", - "id": 4 - }, - "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 - } - } - }, - "MigrationService": { - "options": { - "(google.api.default_host)": "bigquerymigration.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateMigrationWorkflow": { - "requestType": "CreateMigrationWorkflowRequest", - "responseType": "MigrationWorkflow", - "options": { - "(google.api.http).post": "/v2/{parent=projects/*/locations/*}/workflows", - "(google.api.http).body": "migration_workflow", - "(google.api.method_signature)": "parent,migration_workflow" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{parent=projects/*/locations/*}/workflows", - "body": "migration_workflow" - } - }, - { - "(google.api.method_signature)": "parent,migration_workflow" - } - ] - }, - "GetMigrationWorkflow": { - "requestType": "GetMigrationWorkflowRequest", - "responseType": "MigrationWorkflow", - "options": { - "(google.api.http).get": "/v2/{name=projects/*/locations/*/workflows/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{name=projects/*/locations/*/workflows/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListMigrationWorkflows": { - "requestType": "ListMigrationWorkflowsRequest", - "responseType": "ListMigrationWorkflowsResponse", - "options": { - "(google.api.http).get": "/v2/{parent=projects/*/locations/*}/workflows", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{parent=projects/*/locations/*}/workflows" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "DeleteMigrationWorkflow": { - "requestType": "DeleteMigrationWorkflowRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v2/{name=projects/*/locations/*/workflows/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2/{name=projects/*/locations/*/workflows/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "StartMigrationWorkflow": { - "requestType": "StartMigrationWorkflowRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v2/{name=projects/*/locations/*/workflows/*}:start", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2/{name=projects/*/locations/*/workflows/*}:start", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetMigrationSubtask": { - "requestType": "GetMigrationSubtaskRequest", - "responseType": "MigrationSubtask", - "options": { - "(google.api.http).get": "/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{name=projects/*/locations/*/workflows/*/subtasks/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListMigrationSubtasks": { - "requestType": "ListMigrationSubtasksRequest", - "responseType": "ListMigrationSubtasksResponse", - "options": { - "(google.api.http).get": "/v2/{parent=projects/*/locations/*/workflows/*}/subtasks", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2/{parent=projects/*/locations/*/workflows/*}/subtasks" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - } - } - }, - "CreateMigrationWorkflowRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "migrationWorkflow": { - "type": "MigrationWorkflow", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetMigrationWorkflowRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" - } - }, - "readMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "ListMigrationWorkflowsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "readMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - }, - "pageSize": { - "type": "int32", - "id": 3 - }, - "pageToken": { - "type": "string", - "id": 4 - } - } - }, - "ListMigrationWorkflowsResponse": { - "fields": { - "migrationWorkflows": { - "rule": "repeated", - "type": "MigrationWorkflow", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "DeleteMigrationWorkflowRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" - } - } - } - }, - "StartMigrationWorkflowRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" - } - } - } - }, - "GetMigrationSubtaskRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationSubtask" - } - }, - "readMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListMigrationSubtasksRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" - } - }, - "readMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageSize": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListMigrationSubtasksResponse": { - "fields": { - "migrationSubtasks": { - "rule": "repeated", - "type": "MigrationSubtask", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "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 - } - } - } - } - } - }, - "v2alpha": { - "options": { - "csharp_namespace": "Google.Cloud.BigQuery.Migration.V2Alpha", - "go_package": "cloud.google.com/go/bigquery/migration/apiv2alpha/migrationpb;migrationpb", - "java_multiple_files": true, - "java_outer_classname": "TranslationServiceProto", - "java_package": "com.google.cloud.bigquery.migration.v2alpha", - "php_namespace": "Google\\Cloud\\BigQuery\\Migration\\V2alpha" - }, - "nested": { - "AssessmentTaskDetails": { - "fields": { - "inputPath": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "outputDataset": { - "type": "string", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "querylogsPath": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "dataSource": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "AssessmentOrchestrationResultDetails": { - "fields": { - "outputTablesSchemaVersion": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "MigrationWorkflow": { - "options": { - "(google.api.resource).type": "bigquerymigration.googleapis.com/MigrationWorkflow", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/workflows/{workflow}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "displayName": { - "type": "string", - "id": 6 - }, - "tasks": { - "keyType": "string", - "type": "MigrationTask", - "id": 2 - }, - "state": { - "type": "State", - "id": 3, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - }, - "lastUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 5 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "DRAFT": 1, - "RUNNING": 2, - "PAUSED": 3, - "COMPLETED": 4 - } - } - } - }, - "MigrationTask": { - "oneofs": { - "taskDetails": { - "oneof": [ - "assessmentTaskDetails", - "translationTaskDetails" - ] - } - }, - "fields": { - "assessmentTaskDetails": { - "type": "AssessmentTaskDetails", - "id": 12 - }, - "translationTaskDetails": { - "type": "TranslationTaskDetails", - "id": 13 - }, - "id": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "type": { - "type": "string", - "id": 2 - }, - "details": { - "type": "google.protobuf.Any", - "id": 3 - }, - "state": { - "type": "State", - "id": 4, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "processingError": { - "type": "google.rpc.ErrorInfo", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 6 - }, - "lastUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 7 - }, - "orchestrationResult": { - "type": "MigrationTaskOrchestrationResult", - "id": 10, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "PENDING": 1, - "ORCHESTRATING": 2, - "RUNNING": 3, - "PAUSED": 4, - "SUCCEEDED": 5, - "FAILED": 6 - } - } - } - }, - "MigrationSubtask": { - "options": { - "(google.api.resource).type": "bigquerymigration.googleapis.com/MigrationSubtask", - "(google.api.resource).pattern": "projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}" - }, - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "taskId": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "state": { - "type": "State", - "id": 5, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "processingError": { - "type": "google.rpc.ErrorInfo", - "id": 6, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceErrorDetails": { - "rule": "repeated", - "type": "ResourceErrorDetail", - "id": 12, - "options": { - "(google.api.field_behavior)": "OUTPUT_ONLY" - } - }, - "resourceErrorCount": { - "type": "int32", - "id": 13 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 7 - }, - "lastUpdateTime": { - "type": "google.protobuf.Timestamp", - "id": 8 - }, - "metrics": { - "rule": "repeated", - "type": "TimeSeries", - "id": 11 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "ACTIVE": 1, - "RUNNING": 2, - "SUCCEEDED": 3, - "FAILED": 4, - "PAUSED": 5 - } - } - } - }, - "MigrationTaskOrchestrationResult": { - "oneofs": { - "details": { - "oneof": [ - "assessmentDetails" - ] - } - }, - "fields": { - "assessmentDetails": { - "type": "AssessmentOrchestrationResultDetails", - "id": 1 - } - } - }, - "ResourceErrorDetail": { - "fields": { - "resourceInfo": { - "type": "google.rpc.ResourceInfo", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "errorDetails": { - "rule": "repeated", - "type": "ErrorDetail", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "errorCount": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ErrorDetail": { - "fields": { - "location": { - "type": "ErrorLocation", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "errorInfo": { - "type": "google.rpc.ErrorInfo", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "ErrorLocation": { - "fields": { - "line": { - "type": "int32", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "column": { - "type": "int32", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "TimeSeries": { - "fields": { - "metric": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "valueType": { - "type": "google.api.MetricDescriptor.ValueType", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "metricKind": { - "type": "google.api.MetricDescriptor.MetricKind", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "points": { - "rule": "repeated", - "type": "Point", - "id": 4, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "Point": { - "fields": { - "interval": { - "type": "TimeInterval", - "id": 1 - }, - "value": { - "type": "TypedValue", - "id": 2 - } - } - }, - "TimeInterval": { - "fields": { - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 1, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "TypedValue": { - "oneofs": { - "value": { - "oneof": [ - "boolValue", - "int64Value", - "doubleValue", - "stringValue", - "distributionValue" - ] - } - }, - "fields": { - "boolValue": { - "type": "bool", - "id": 1 - }, - "int64Value": { - "type": "int64", - "id": 2 - }, - "doubleValue": { - "type": "double", - "id": 3 - }, - "stringValue": { - "type": "string", - "id": 4 - }, - "distributionValue": { - "type": "google.api.Distribution", - "id": 5 - } - } - }, - "TranslationFileMapping": { - "fields": { - "inputPath": { - "type": "string", - "id": 1 - }, - "outputPath": { - "type": "string", - "id": 2 - } - } - }, - "TranslationTaskDetails": { - "oneofs": { - "languageOptions": { - "oneof": [ - "teradataOptions", - "bteqOptions" - ] - } - }, - "fields": { - "teradataOptions": { - "type": "TeradataOptions", - "id": 10 - }, - "bteqOptions": { - "type": "BteqOptions", - "id": 11 - }, - "inputPath": { - "type": "string", - "id": 1 - }, - "outputPath": { - "type": "string", - "id": 2 - }, - "filePaths": { - "rule": "repeated", - "type": "TranslationFileMapping", - "id": 12 - }, - "schemaPath": { - "type": "string", - "id": 3 - }, - "fileEncoding": { - "type": "FileEncoding", - "id": 4 - }, - "identifierSettings": { - "type": "IdentifierSettings", - "id": 5 - }, - "specialTokenMap": { - "keyType": "string", - "type": "TokenType", - "id": 6 - }, - "filter": { - "type": "Filter", - "id": 7 - }, - "translationExceptionTable": { - "type": "string", - "id": 13 - } - }, - "nested": { - "FileEncoding": { - "values": { - "FILE_ENCODING_UNSPECIFIED": 0, - "UTF_8": 1, - "ISO_8859_1": 2, - "US_ASCII": 3, - "UTF_16": 4, - "UTF_16LE": 5, - "UTF_16BE": 6 - } - }, - "TokenType": { - "values": { - "TOKEN_TYPE_UNSPECIFIED": 0, - "STRING": 1, - "INT64": 2, - "NUMERIC": 3, - "BOOL": 4, - "FLOAT64": 5, - "DATE": 6, - "TIMESTAMP": 7 - } - } - } - }, - "Filter": { - "fields": { - "inputFileExclusionPrefixes": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "IdentifierSettings": { - "fields": { - "outputIdentifierCase": { - "type": "IdentifierCase", - "id": 1 - }, - "identifierRewriteMode": { - "type": "IdentifierRewriteMode", - "id": 2 - } - }, - "nested": { - "IdentifierCase": { - "values": { - "IDENTIFIER_CASE_UNSPECIFIED": 0, - "ORIGINAL": 1, - "UPPER": 2, - "LOWER": 3 - } - }, - "IdentifierRewriteMode": { - "values": { - "IDENTIFIER_REWRITE_MODE_UNSPECIFIED": 0, - "NONE": 1, - "REWRITE_ALL": 2 - } - } - } - }, - "TeradataOptions": { - "fields": {} - }, - "BteqOptions": { - "fields": { - "projectDataset": { - "type": "DatasetReference", - "id": 1 - }, - "defaultPathUri": { - "type": "string", - "id": 2 - }, - "fileReplacementMap": { - "keyType": "string", - "type": "string", - "id": 3 - } - } - }, - "DatasetReference": { - "fields": { - "datasetId": { - "type": "string", - "id": 1 - }, - "projectId": { - "type": "string", - "id": 2 - } - } - }, - "MigrationService": { - "options": { - "(google.api.default_host)": "bigquerymigration.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "CreateMigrationWorkflow": { - "requestType": "CreateMigrationWorkflowRequest", - "responseType": "MigrationWorkflow", - "options": { - "(google.api.http).post": "/v2alpha/{parent=projects/*/locations/*}/workflows", - "(google.api.http).body": "migration_workflow", - "(google.api.method_signature)": "parent,migration_workflow" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2alpha/{parent=projects/*/locations/*}/workflows", - "body": "migration_workflow" - } - }, - { - "(google.api.method_signature)": "parent,migration_workflow" - } - ] - }, - "GetMigrationWorkflow": { - "requestType": "GetMigrationWorkflowRequest", - "responseType": "MigrationWorkflow", - "options": { - "(google.api.http).get": "/v2alpha/{name=projects/*/locations/*/workflows/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2alpha/{name=projects/*/locations/*/workflows/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListMigrationWorkflows": { - "requestType": "ListMigrationWorkflowsRequest", - "responseType": "ListMigrationWorkflowsResponse", - "options": { - "(google.api.http).get": "/v2alpha/{parent=projects/*/locations/*}/workflows", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2alpha/{parent=projects/*/locations/*}/workflows" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - }, - "DeleteMigrationWorkflow": { - "requestType": "DeleteMigrationWorkflowRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v2alpha/{name=projects/*/locations/*/workflows/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "delete": "/v2alpha/{name=projects/*/locations/*/workflows/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "StartMigrationWorkflow": { - "requestType": "StartMigrationWorkflowRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v2alpha/{name=projects/*/locations/*/workflows/*}:start", - "(google.api.http).body": "*", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2alpha/{name=projects/*/locations/*/workflows/*}:start", - "body": "*" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "GetMigrationSubtask": { - "requestType": "GetMigrationSubtaskRequest", - "responseType": "MigrationSubtask", - "options": { - "(google.api.http).get": "/v2alpha/{name=projects/*/locations/*/workflows/*/subtasks/*}", - "(google.api.method_signature)": "name" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2alpha/{name=projects/*/locations/*/workflows/*/subtasks/*}" - } - }, - { - "(google.api.method_signature)": "name" - } - ] - }, - "ListMigrationSubtasks": { - "requestType": "ListMigrationSubtasksRequest", - "responseType": "ListMigrationSubtasksResponse", - "options": { - "(google.api.http).get": "/v2alpha/{parent=projects/*/locations/*/workflows/*}/subtasks", - "(google.api.method_signature)": "parent" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "get": "/v2alpha/{parent=projects/*/locations/*/workflows/*}/subtasks" - } - }, - { - "(google.api.method_signature)": "parent" - } - ] - } - } - }, - "CreateMigrationWorkflowRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "migrationWorkflow": { - "type": "MigrationWorkflow", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - } - }, - "GetMigrationWorkflowRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" - } - }, - "readMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "ListMigrationWorkflowsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "readMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - }, - "pageSize": { - "type": "int32", - "id": 3 - }, - "pageToken": { - "type": "string", - "id": 4 - } - } - }, - "ListMigrationWorkflowsResponse": { - "fields": { - "migrationWorkflows": { - "rule": "repeated", - "type": "MigrationWorkflow", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "DeleteMigrationWorkflowRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" - } - } - } - }, - "StartMigrationWorkflowRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" - } - } - } - }, - "GetMigrationSubtaskRequest": { - "fields": { - "name": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationSubtask" - } - }, - "readMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListMigrationSubtasksRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "bigquerymigration.googleapis.com/MigrationWorkflow" - } - }, - "readMask": { - "type": "google.protobuf.FieldMask", - "id": 2, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageSize": { - "type": "int32", - "id": 3, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "pageToken": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - }, - "filter": { - "type": "string", - "id": 5, - "options": { - "(google.api.field_behavior)": "OPTIONAL" - } - } - } - }, - "ListMigrationSubtasksResponse": { - "fields": { - "migrationSubtasks": { - "rule": "repeated", - "type": "MigrationSubtask", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "SqlTranslationService": { - "options": { - "(google.api.default_host)": "bigquerymigration.googleapis.com", - "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" - }, - "methods": { - "TranslateQuery": { - "requestType": "TranslateQueryRequest", - "responseType": "TranslateQueryResponse", - "options": { - "(google.api.http).post": "/v2alpha/{parent=projects/*/locations/*}:translateQuery", - "(google.api.http).body": "*", - "(google.api.method_signature)": "parent,source_dialect,query" - }, - "parsedOptions": [ - { - "(google.api.http)": { - "post": "/v2alpha/{parent=projects/*/locations/*}:translateQuery", - "body": "*" - } - }, - { - "(google.api.method_signature)": "parent,source_dialect,query" - } - ] - } - } - }, - "TranslateQueryRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1, - "options": { - "(google.api.field_behavior)": "REQUIRED", - "(google.api.resource_reference).type": "locations.googleapis.com/Location" - } - }, - "sourceDialect": { - "type": "SqlTranslationSourceDialect", - "id": 2, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - }, - "query": { - "type": "string", - "id": 3, - "options": { - "(google.api.field_behavior)": "REQUIRED" - } - } - }, - "nested": { - "SqlTranslationSourceDialect": { - "values": { - "SQL_TRANSLATION_SOURCE_DIALECT_UNSPECIFIED": 0, - "TERADATA": 1 - } - } - } - }, - "TranslateQueryResponse": { - "fields": { - "translationJob": { - "type": "string", - "id": 4, - "options": { - "(google.api.field_behavior)": "IMMUTABLE" - } - }, - "translatedQuery": { - "type": "string", - "id": 1 - }, - "errors": { - "rule": "repeated", - "type": "SqlTranslationError", - "id": 2 - }, - "warnings": { - "rule": "repeated", - "type": "SqlTranslationWarning", - "id": 3 - } - } - }, - "SqlTranslationErrorDetail": { - "fields": { - "row": { - "type": "int64", - "id": 1 - }, - "column": { - "type": "int64", - "id": 2 - }, - "message": { - "type": "string", - "id": 3 - } - } - }, - "SqlTranslationError": { - "fields": { - "errorType": { - "type": "SqlTranslationErrorType", - "id": 1 - }, - "errorDetail": { - "type": "SqlTranslationErrorDetail", - "id": 2 - } - }, - "nested": { - "SqlTranslationErrorType": { - "values": { - "SQL_TRANSLATION_ERROR_TYPE_UNSPECIFIED": 0, - "SQL_PARSE_ERROR": 1, - "UNSUPPORTED_SQL_FUNCTION": 2 - } - } - } - }, - "SqlTranslationWarning": { - "fields": { - "warningDetail": { - "type": "SqlTranslationErrorDetail", - "id": 1 - } - } - } - } - } - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "ClientProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI" - }, - "nested": { - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions", - "options": { - "packed": false - } - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - }, - "Distribution": { - "fields": { - "count": { - "type": "int64", - "id": 1 - }, - "mean": { - "type": "double", - "id": 2 - }, - "sumOfSquaredDeviation": { - "type": "double", - "id": 3 - }, - "range": { - "type": "Range", - "id": 4 - }, - "bucketOptions": { - "type": "BucketOptions", - "id": 6 - }, - "bucketCounts": { - "rule": "repeated", - "type": "int64", - "id": 7 - }, - "exemplars": { - "rule": "repeated", - "type": "Exemplar", - "id": 10 - } - }, - "nested": { - "Range": { - "fields": { - "min": { - "type": "double", - "id": 1 - }, - "max": { - "type": "double", - "id": 2 - } - } - }, - "BucketOptions": { - "oneofs": { - "options": { - "oneof": [ - "linearBuckets", - "exponentialBuckets", - "explicitBuckets" - ] - } - }, - "fields": { - "linearBuckets": { - "type": "Linear", - "id": 1 - }, - "exponentialBuckets": { - "type": "Exponential", - "id": 2 - }, - "explicitBuckets": { - "type": "Explicit", - "id": 3 - } - }, - "nested": { - "Linear": { - "fields": { - "numFiniteBuckets": { - "type": "int32", - "id": 1 - }, - "width": { - "type": "double", - "id": 2 - }, - "offset": { - "type": "double", - "id": 3 - } - } - }, - "Exponential": { - "fields": { - "numFiniteBuckets": { - "type": "int32", - "id": 1 - }, - "growthFactor": { - "type": "double", - "id": 2 - }, - "scale": { - "type": "double", - "id": 3 - } - } - }, - "Explicit": { - "fields": { - "bounds": { - "rule": "repeated", - "type": "double", - "id": 1 - } - } - } - } - }, - "Exemplar": { - "fields": { - "value": { - "type": "double", - "id": 1 - }, - "timestamp": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "attachments": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } - }, - "MetricDescriptor": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "type": { - "type": "string", - "id": 8 - }, - "labels": { - "rule": "repeated", - "type": "LabelDescriptor", - "id": 2 - }, - "metricKind": { - "type": "MetricKind", - "id": 3 - }, - "valueType": { - "type": "ValueType", - "id": 4 - }, - "unit": { - "type": "string", - "id": 5 - }, - "description": { - "type": "string", - "id": 6 - }, - "displayName": { - "type": "string", - "id": 7 - }, - "metadata": { - "type": "MetricDescriptorMetadata", - "id": 10 - }, - "launchStage": { - "type": "LaunchStage", - "id": 12 - }, - "monitoredResourceTypes": { - "rule": "repeated", - "type": "string", - "id": 13 - } - }, - "nested": { - "MetricKind": { - "values": { - "METRIC_KIND_UNSPECIFIED": 0, - "GAUGE": 1, - "DELTA": 2, - "CUMULATIVE": 3 - } - }, - "ValueType": { - "values": { - "VALUE_TYPE_UNSPECIFIED": 0, - "BOOL": 1, - "INT64": 2, - "DOUBLE": 3, - "STRING": 4, - "DISTRIBUTION": 5, - "MONEY": 6 - } - }, - "MetricDescriptorMetadata": { - "fields": { - "launchStage": { - "type": "LaunchStage", - "id": 1, - "options": { - "deprecated": true - } - }, - "samplePeriod": { - "type": "google.protobuf.Duration", - "id": 2 - }, - "ingestDelay": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "timeSeriesResourceHierarchyLevel": { - "rule": "repeated", - "type": "TimeSeriesResourceHierarchyLevel", - "id": 4 - } - }, - "nested": { - "TimeSeriesResourceHierarchyLevel": { - "values": { - "TIME_SERIES_RESOURCE_HIERARCHY_LEVEL_UNSPECIFIED": 0, - "PROJECT": 1, - "ORGANIZATION": 2, - "FOLDER": 3 - } - } - } - } - } - }, - "Metric": { - "fields": { - "type": { - "type": "string", - "id": 3 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 2 - } - } - }, - "LabelDescriptor": { - "fields": { - "key": { - "type": "string", - "id": 1 - }, - "valueType": { - "type": "ValueType", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - } - }, - "nested": { - "ValueType": { - "values": { - "STRING": 0, - "BOOL": 1, - "INT64": 2 - } - } - } - }, - "LaunchStage": { - "values": { - "LAUNCH_STAGE_UNSPECIFIED": 0, - "UNIMPLEMENTED": 6, - "PRELAUNCH": 7, - "EARLY_ACCESS": 1, - "ALPHA": 2, - "BETA": 3, - "GA": 4, - "DEPRECATED": 5 - } - }, - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - }, - "apiVersion": { - "type": "string", - "id": 525000001, - "extend": "google.protobuf.ServiceOptions" - }, - "CommonLanguageSettings": { - "fields": { - "referenceDocsUri": { - "type": "string", - "id": 1, - "options": { - "deprecated": true - } - }, - "destinations": { - "rule": "repeated", - "type": "ClientLibraryDestination", - "id": 2 - }, - "selectiveGapicGeneration": { - "type": "SelectiveGapicGeneration", - "id": 3 - } - } - }, - "ClientLibrarySettings": { - "fields": { - "version": { - "type": "string", - "id": 1 - }, - "launchStage": { - "type": "LaunchStage", - "id": 2 - }, - "restNumericEnums": { - "type": "bool", - "id": 3 - }, - "javaSettings": { - "type": "JavaSettings", - "id": 21 - }, - "cppSettings": { - "type": "CppSettings", - "id": 22 - }, - "phpSettings": { - "type": "PhpSettings", - "id": 23 - }, - "pythonSettings": { - "type": "PythonSettings", - "id": 24 - }, - "nodeSettings": { - "type": "NodeSettings", - "id": 25 - }, - "dotnetSettings": { - "type": "DotnetSettings", - "id": 26 - }, - "rubySettings": { - "type": "RubySettings", - "id": 27 - }, - "goSettings": { - "type": "GoSettings", - "id": 28 - } - } - }, - "Publishing": { - "fields": { - "methodSettings": { - "rule": "repeated", - "type": "MethodSettings", - "id": 2 - }, - "newIssueUri": { - "type": "string", - "id": 101 - }, - "documentationUri": { - "type": "string", - "id": 102 - }, - "apiShortName": { - "type": "string", - "id": 103 - }, - "githubLabel": { - "type": "string", - "id": 104 - }, - "codeownerGithubTeams": { - "rule": "repeated", - "type": "string", - "id": 105 - }, - "docTagPrefix": { - "type": "string", - "id": 106 - }, - "organization": { - "type": "ClientLibraryOrganization", - "id": 107 - }, - "librarySettings": { - "rule": "repeated", - "type": "ClientLibrarySettings", - "id": 109 - }, - "protoReferenceDocumentationUri": { - "type": "string", - "id": 110 - }, - "restReferenceDocumentationUri": { - "type": "string", - "id": 111 - } - } - }, - "JavaSettings": { - "fields": { - "libraryPackage": { - "type": "string", - "id": 1 - }, - "serviceClassNames": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "common": { - "type": "CommonLanguageSettings", - "id": 3 - } - } - }, - "CppSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PhpSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "PythonSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - }, - "experimentalFeatures": { - "type": "ExperimentalFeatures", - "id": 2 - } - }, - "nested": { - "ExperimentalFeatures": { - "fields": { - "restAsyncIoEnabled": { - "type": "bool", - "id": 1 - }, - "protobufPythonicTypesEnabled": { - "type": "bool", - "id": 2 - }, - "unversionedPackageDisabled": { - "type": "bool", - "id": 3 - } - } - } - } - }, - "NodeSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "DotnetSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - }, - "renamedServices": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "renamedResources": { - "keyType": "string", - "type": "string", - "id": 3 - }, - "ignoredResources": { - "rule": "repeated", - "type": "string", - "id": 4 - }, - "forcedNamespaceAliases": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "handwrittenSignatures": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - }, - "RubySettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - } - } - }, - "GoSettings": { - "fields": { - "common": { - "type": "CommonLanguageSettings", - "id": 1 - }, - "renamedServices": { - "keyType": "string", - "type": "string", - "id": 2 - } - } - }, - "MethodSettings": { - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "longRunning": { - "type": "LongRunning", - "id": 2 - }, - "autoPopulatedFields": { - "rule": "repeated", - "type": "string", - "id": 3 - } - }, - "nested": { - "LongRunning": { - "fields": { - "initialPollDelay": { - "type": "google.protobuf.Duration", - "id": 1 - }, - "pollDelayMultiplier": { - "type": "float", - "id": 2 - }, - "maxPollDelay": { - "type": "google.protobuf.Duration", - "id": 3 - }, - "totalPollTimeout": { - "type": "google.protobuf.Duration", - "id": 4 - } - } - } - } - }, - "ClientLibraryOrganization": { - "values": { - "CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED": 0, - "CLOUD": 1, - "ADS": 2, - "PHOTOS": 3, - "STREET_VIEW": 4, - "SHOPPING": 5, - "GEO": 6, - "GENERATIVE_AI": 7 - } - }, - "ClientLibraryDestination": { - "values": { - "CLIENT_LIBRARY_DESTINATION_UNSPECIFIED": 0, - "GITHUB": 10, - "PACKAGE_MANAGER": 20 - } - }, - "SelectiveGapicGeneration": { - "fields": { - "methods": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "generateOmittedAsInternal": { - "type": "bool", - "id": 2 - } - } - } - } - }, - "protobuf": { - "options": { - "go_package": "google.golang.org/protobuf/types/descriptorpb", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "edition": "proto2", - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - }, - "extensions": [ - [ - 536000000, - 536000000 - ] - ] - }, - "Edition": { - "edition": "proto2", - "values": { - "EDITION_UNKNOWN": 0, - "EDITION_LEGACY": 900, - "EDITION_PROTO2": 998, - "EDITION_PROTO3": 999, - "EDITION_2023": 1000, - "EDITION_2024": 1001, - "EDITION_1_TEST_ONLY": 1, - "EDITION_2_TEST_ONLY": 2, - "EDITION_99997_TEST_ONLY": 99997, - "EDITION_99998_TEST_ONLY": 99998, - "EDITION_99999_TEST_ONLY": 99999, - "EDITION_MAX": 2147483647 - } - }, - "FileDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10 - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11 - }, - "optionDependency": { - "rule": "repeated", - "type": "string", - "id": 15 - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 - }, - "edition": { - "type": "Edition", - "id": 14 - } - } - }, - "DescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - }, - "visibility": { - "type": "SymbolVisibility", - "id": 11 - } - }, - "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "edition": "proto2", - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - }, - "declaration": { - "rule": "repeated", - "type": "Declaration", - "id": 2, - "options": { - "retention": "RETENTION_SOURCE" - } - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "verification": { - "type": "VerificationState", - "id": 3, - "options": { - "default": "UNVERIFIED", - "retention": "RETENTION_SOURCE" - } - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "Declaration": { - "fields": { - "number": { - "type": "int32", - "id": 1 - }, - "fullName": { - "type": "string", - "id": 2 - }, - "type": { - "type": "string", - "id": 3 - }, - "reserved": { - "type": "bool", - "id": 5 - }, - "repeated": { - "type": "bool", - "id": 6 - } - }, - "reserved": [ - [ - 4, - 4 - ] - ] - }, - "VerificationState": { - "values": { - "DECLARATION": 0, - "UNVERIFIED": 1 - } - } - } - }, - "FieldDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - }, - "proto3Optional": { - "type": "bool", - "id": 17 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REPEATED": 3, - "LABEL_REQUIRED": 2 - } - } - } - }, - "OneofDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "visibility": { - "type": "SymbolVisibility", - "id": 6 - } - }, - "nested": { - "EnumReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 - }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "EnumValueDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - }, - "reserved": [ - [ - 4, - 4 - ], - "stream" - ] - }, - "MethodDescriptorProto": { - "edition": "proto2", - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "edition": "proto2", - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 - }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false - } - }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false - } - }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": true - } - }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "features": { - "type": "FeatureSet", - "id": 50 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 42, - 42 - ], - "php_generic_services", - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "edition": "proto2", - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 11, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 12 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 5, - 5 - ], - [ - 6, - 6 - ], - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "edition": "proto2", - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" - } - }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" - } - }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "unverifiedLazy": { - "type": "bool", - "id": 15, - "options": { - "default": false - } - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false, - "deprecated": true - } - }, - "debugRedact": { - "type": "bool", - "id": 16, - "options": { - "default": false - } - }, - "retention": { - "type": "OptionRetention", - "id": 17 - }, - "targets": { - "rule": "repeated", - "type": "OptionTargetType", - "id": 19 - }, - "editionDefaults": { - "rule": "repeated", - "type": "EditionDefault", - "id": 20 - }, - "features": { - "type": "FeatureSet", - "id": 21 - }, - "featureSupport": { - "type": "FeatureSupport", - "id": 22 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ], - [ - 18, - 18 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 - } - }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 - } - }, - "OptionRetention": { - "values": { - "RETENTION_UNKNOWN": 0, - "RETENTION_RUNTIME": 1, - "RETENTION_SOURCE": 2 - } - }, - "OptionTargetType": { - "values": { - "TARGET_TYPE_UNKNOWN": 0, - "TARGET_TYPE_FILE": 1, - "TARGET_TYPE_EXTENSION_RANGE": 2, - "TARGET_TYPE_MESSAGE": 3, - "TARGET_TYPE_FIELD": 4, - "TARGET_TYPE_ONEOF": 5, - "TARGET_TYPE_ENUM": 6, - "TARGET_TYPE_ENUM_ENTRY": 7, - "TARGET_TYPE_SERVICE": 8, - "TARGET_TYPE_METHOD": 9 - } - }, - "EditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "value": { - "type": "string", - "id": 2 - } - } - }, - "FeatureSupport": { - "fields": { - "editionIntroduced": { - "type": "Edition", - "id": 1 - }, - "editionDeprecated": { - "type": "Edition", - "id": 2 - }, - "deprecationWarning": { - "type": "string", - "id": 3 - }, - "editionRemoved": { - "type": "Edition", - "id": 4 - } - } - } - } - }, - "OneofOptions": { - "edition": "proto2", - "fields": { - "features": { - "type": "FeatureSet", - "id": 1 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "edition": "proto2", - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 - }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "deprecatedLegacyJsonFieldConflicts": { - "type": "bool", - "id": 6, - "options": { - "deprecated": true - } - }, - "features": { - "type": "FeatureSet", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "edition": "proto2", - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false - } - }, - "features": { - "type": "FeatureSet", - "id": 2 - }, - "debugRedact": { - "type": "bool", - "id": 3, - "options": { - "default": false - } - }, - "featureSupport": { - "type": "FieldOptions.FeatureSupport", - "id": 4 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "edition": "proto2", - "fields": { - "features": { - "type": "FeatureSet", - "id": 34 - }, - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "edition": "proto2", - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false - } - }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" - } - }, - "features": { - "type": "FeatureSet", - "id": 35 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 - } - } - } - }, - "UninterpretedOption": { - "edition": "proto2", - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { - "type": "string", - "id": 3 - }, - "positiveIntValue": { - "type": "uint64", - "id": 4 - }, - "negativeIntValue": { - "type": "int64", - "id": 5 - }, - "doubleValue": { - "type": "double", - "id": 6 - }, - "stringValue": { - "type": "bytes", - "id": 7 - }, - "aggregateValue": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { - "fields": { - "namePart": { - "rule": "required", - "type": "string", - "id": 1 - }, - "isExtension": { - "rule": "required", - "type": "bool", - "id": 2 - } - } - } - } - }, - "FeatureSet": { - "edition": "proto2", - "fields": { - "fieldPresence": { - "type": "FieldPresence", - "id": 1, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "feature_support.edition_introduced": "EDITION_2023", - "edition_defaults.edition": "EDITION_2023", - "edition_defaults.value": "EXPLICIT" - } - }, - "enumType": { - "type": "EnumType", - "id": 2, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "feature_support.edition_introduced": "EDITION_2023", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "OPEN" - } - }, - "repeatedFieldEncoding": { - "type": "RepeatedFieldEncoding", - "id": 3, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "feature_support.edition_introduced": "EDITION_2023", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "PACKED" - } - }, - "utf8Validation": { - "type": "Utf8Validation", - "id": 4, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "feature_support.edition_introduced": "EDITION_2023", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "VERIFY" - } - }, - "messageEncoding": { - "type": "MessageEncoding", - "id": 5, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "feature_support.edition_introduced": "EDITION_2023", - "edition_defaults.edition": "EDITION_LEGACY", - "edition_defaults.value": "LENGTH_PREFIXED" - } - }, - "jsonFormat": { - "type": "JsonFormat", - "id": 6, - "options": { - "retention": "RETENTION_RUNTIME", - "targets": "TARGET_TYPE_FILE", - "feature_support.edition_introduced": "EDITION_2023", - "edition_defaults.edition": "EDITION_PROTO3", - "edition_defaults.value": "ALLOW" - } - }, - "enforceNamingStyle": { - "type": "EnforceNamingStyle", - "id": 7, - "options": { - "retention": "RETENTION_SOURCE", - "targets": "TARGET_TYPE_METHOD", - "feature_support.edition_introduced": "EDITION_2024", - "edition_defaults.edition": "EDITION_2024", - "edition_defaults.value": "STYLE2024" - } - }, - "defaultSymbolVisibility": { - "type": "VisibilityFeature.DefaultSymbolVisibility", - "id": 8, - "options": { - "retention": "RETENTION_SOURCE", - "targets": "TARGET_TYPE_FILE", - "feature_support.edition_introduced": "EDITION_2024", - "edition_defaults.edition": "EDITION_2024", - "edition_defaults.value": "EXPORT_TOP_LEVEL" - } - } - }, - "extensions": [ - [ - 1000, - 9994 - ], - [ - 9995, - 9999 - ], - [ - 10000, - 10000 - ] - ], - "reserved": [ - [ - 999, - 999 - ] - ], - "nested": { - "FieldPresence": { - "values": { - "FIELD_PRESENCE_UNKNOWN": 0, - "EXPLICIT": 1, - "IMPLICIT": 2, - "LEGACY_REQUIRED": 3 - } - }, - "EnumType": { - "values": { - "ENUM_TYPE_UNKNOWN": 0, - "OPEN": 1, - "CLOSED": 2 - } - }, - "RepeatedFieldEncoding": { - "values": { - "REPEATED_FIELD_ENCODING_UNKNOWN": 0, - "PACKED": 1, - "EXPANDED": 2 - } - }, - "Utf8Validation": { - "values": { - "UTF8_VALIDATION_UNKNOWN": 0, - "VERIFY": 2, - "NONE": 3 - }, - "reserved": [ - [ - 1, - 1 - ] - ] - }, - "MessageEncoding": { - "values": { - "MESSAGE_ENCODING_UNKNOWN": 0, - "LENGTH_PREFIXED": 1, - "DELIMITED": 2 - } - }, - "JsonFormat": { - "values": { - "JSON_FORMAT_UNKNOWN": 0, - "ALLOW": 1, - "LEGACY_BEST_EFFORT": 2 - } - }, - "EnforceNamingStyle": { - "values": { - "ENFORCE_NAMING_STYLE_UNKNOWN": 0, - "STYLE2024": 1, - "STYLE_LEGACY": 2 - } - }, - "VisibilityFeature": { - "fields": {}, - "reserved": [ - [ - 1, - 536870911 - ] - ], - "nested": { - "DefaultSymbolVisibility": { - "values": { - "DEFAULT_SYMBOL_VISIBILITY_UNKNOWN": 0, - "EXPORT_ALL": 1, - "EXPORT_TOP_LEVEL": 2, - "LOCAL_ALL": 3, - "STRICT": 4 - } - } - } - } - } - }, - "FeatureSetDefaults": { - "edition": "proto2", - "fields": { - "defaults": { - "rule": "repeated", - "type": "FeatureSetEditionDefault", - "id": 1 - }, - "minimumEdition": { - "type": "Edition", - "id": 4 - }, - "maximumEdition": { - "type": "Edition", - "id": 5 - } - }, - "nested": { - "FeatureSetEditionDefault": { - "fields": { - "edition": { - "type": "Edition", - "id": 3 - }, - "overridableFeatures": { - "type": "FeatureSet", - "id": 4 - }, - "fixedFeatures": { - "type": "FeatureSet", - "id": 5 - } - }, - "reserved": [ - [ - 1, - 1 - ], - [ - 2, - 2 - ], - "features" - ] - } - } - }, - "SourceCodeInfo": { - "edition": "proto2", - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "extensions": [ - [ - 536000000, - 536000000 - ] - ], - "nested": { - "Location": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1, - "options": { - "packed": true - } - }, - "span": { - "rule": "repeated", - "type": "int32", - "id": 2, - "options": { - "packed": true - } - }, - "leadingComments": { - "type": "string", - "id": 3 - }, - "trailingComments": { - "type": "string", - "id": 4 - }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", - "id": 6 - } - } - } - } - }, - "GeneratedCodeInfo": { - "edition": "proto2", - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { - "fields": { - "path": { - "rule": "repeated", - "type": "int32", - "id": 1, - "options": { - "packed": true - } - }, - "sourceFile": { - "type": "string", - "id": 2 - }, - "begin": { - "type": "int32", - "id": 3 - }, - "end": { - "type": "int32", - "id": 4 - }, - "semantic": { - "type": "Semantic", - "id": 5 - } - }, - "nested": { - "Semantic": { - "values": { - "NONE": 0, - "SET": 1, - "ALIAS": 2 - } - } - } - } - } - }, - "SymbolVisibility": { - "edition": "proto2", - "values": { - "VISIBILITY_UNSET": 0, - "VISIBILITY_LOCAL": 1, - "VISIBILITY_EXPORT": 2 - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 - }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Timestamp": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 - }, - "nanos": { - "type": "int32", - "id": 2 - } - } - }, - "Empty": { - "fields": {} - }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - } - } - }, - "rpc": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/rpc/errdetails;errdetails", - "java_multiple_files": true, - "java_outer_classname": "ErrorDetailsProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "ErrorInfo": { - "fields": { - "reason": { - "type": "string", - "id": 1 - }, - "domain": { - "type": "string", - "id": 2 - }, - "metadata": { - "keyType": "string", - "type": "string", - "id": 3 - } - } - }, - "RetryInfo": { - "fields": { - "retryDelay": { - "type": "google.protobuf.Duration", - "id": 1 - } - } - }, - "DebugInfo": { - "fields": { - "stackEntries": { - "rule": "repeated", - "type": "string", - "id": 1 - }, - "detail": { - "type": "string", - "id": 2 - } - } - }, - "QuotaFailure": { - "fields": { - "violations": { - "rule": "repeated", - "type": "Violation", - "id": 1 - } - }, - "nested": { - "Violation": { - "oneofs": { - "_futureQuotaValue": { - "oneof": [ - "futureQuotaValue" - ] - } - }, - "fields": { - "subject": { - "type": "string", - "id": 1 - }, - "description": { - "type": "string", - "id": 2 - }, - "apiService": { - "type": "string", - "id": 3 - }, - "quotaMetric": { - "type": "string", - "id": 4 - }, - "quotaId": { - "type": "string", - "id": 5 - }, - "quotaDimensions": { - "keyType": "string", - "type": "string", - "id": 6 - }, - "quotaValue": { - "type": "int64", - "id": 7 - }, - "futureQuotaValue": { - "type": "int64", - "id": 8, - "options": { - "proto3_optional": true - } - } - } - } - } - }, - "PreconditionFailure": { - "fields": { - "violations": { - "rule": "repeated", - "type": "Violation", - "id": 1 - } - }, - "nested": { - "Violation": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "subject": { - "type": "string", - "id": 2 - }, - "description": { - "type": "string", - "id": 3 - } - } - } - } - }, - "BadRequest": { - "fields": { - "fieldViolations": { - "rule": "repeated", - "type": "FieldViolation", - "id": 1 - } - }, - "nested": { - "FieldViolation": { - "fields": { - "field": { - "type": "string", - "id": 1 - }, - "description": { - "type": "string", - "id": 2 - }, - "reason": { - "type": "string", - "id": 3 - }, - "localizedMessage": { - "type": "LocalizedMessage", - "id": 4 - } - } - } - } - }, - "RequestInfo": { - "fields": { - "requestId": { - "type": "string", - "id": 1 - }, - "servingData": { - "type": "string", - "id": 2 - } - } - }, - "ResourceInfo": { - "fields": { - "resourceType": { - "type": "string", - "id": 1 - }, - "resourceName": { - "type": "string", - "id": 2 - }, - "owner": { - "type": "string", - "id": 3 - }, - "description": { - "type": "string", - "id": 4 - } - } - }, - "Help": { - "fields": { - "links": { - "rule": "repeated", - "type": "Link", - "id": 1 - } - }, - "nested": { - "Link": { - "fields": { - "description": { - "type": "string", - "id": 1 - }, - "url": { - "type": "string", - "id": 2 - } - } - } - } - }, - "LocalizedMessage": { - "fields": { - "locale": { - "type": "string", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - } - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.create_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.create_migration_workflow.js deleted file mode 100644 index 6e2c0a708991..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.create_migration_workflow.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, migrationWorkflow) { - // [START bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the project to which this migration workflow belongs. - * Example: `projects/foo/locations/bar` - */ - // const parent = 'abc123' - /** - * Required. The migration workflow to create. - */ - // const migrationWorkflow = {} - - // Imports the Migration library - const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2; - - // Instantiates a client - const migrationClient = new MigrationServiceClient(); - - async function callCreateMigrationWorkflow() { - // Construct request - const request = { - parent, - migrationWorkflow, - }; - - // Run request - const response = await migrationClient.createMigrationWorkflow(request); - console.log(response); - } - - callCreateMigrationWorkflow(); - // [END bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.delete_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.delete_migration_workflow.js deleted file mode 100644 index 9536f6113e68..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.delete_migration_workflow.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - */ - // const name = 'abc123' - - // Imports the Migration library - const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2; - - // Instantiates a client - const migrationClient = new MigrationServiceClient(); - - async function callDeleteMigrationWorkflow() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await migrationClient.deleteMigrationWorkflow(request); - console.log(response); - } - - callDeleteMigrationWorkflow(); - // [END bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_subtask.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_subtask.js deleted file mode 100644 index ad96b09bf085..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_subtask.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The unique identifier for the migration subtask. - * Example: `projects/123/locations/us/workflows/1234/subtasks/543` - */ - // const name = 'abc123' - /** - * Optional. The list of fields to be retrieved. - */ - // const readMask = {} - - // Imports the Migration library - const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2; - - // Instantiates a client - const migrationClient = new MigrationServiceClient(); - - async function callGetMigrationSubtask() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await migrationClient.getMigrationSubtask(request); - console.log(response); - } - - callGetMigrationSubtask(); - // [END bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_workflow.js deleted file mode 100644 index cf6727593b5d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.get_migration_workflow.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - */ - // const name = 'abc123' - /** - * The list of fields to be retrieved. - */ - // const readMask = {} - - // Imports the Migration library - const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2; - - // Instantiates a client - const migrationClient = new MigrationServiceClient(); - - async function callGetMigrationWorkflow() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await migrationClient.getMigrationWorkflow(request); - console.log(response); - } - - callGetMigrationWorkflow(); - // [END bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_subtasks.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_subtasks.js deleted file mode 100644 index 01c67616786f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_subtasks.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The migration task of the subtasks to list. - * Example: `projects/123/locations/us/workflows/1234` - */ - // const parent = 'abc123' - /** - * Optional. The list of fields to be retrieved. - */ - // const readMask = {} - /** - * Optional. The maximum number of migration tasks to return. The service may - * return fewer than this number. - */ - // const pageSize = 1234 - /** - * Optional. A page token, received from previous `ListMigrationSubtasks` - * call. Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigrationSubtasks` - * must match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. The filter to apply. This can be used to get the subtasks of a - * specific tasks in a workflow, e.g. `migration_task = "ab012"` where - * `"ab012"` is the task ID (not the name in the named map). - */ - // const filter = 'abc123' - - // Imports the Migration library - const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2; - - // Instantiates a client - const migrationClient = new MigrationServiceClient(); - - async function callListMigrationSubtasks() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = migrationClient.listMigrationSubtasksAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListMigrationSubtasks(); - // [END bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_workflows.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_workflows.js deleted file mode 100644 index d79380dbc624..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.list_migration_workflows.js +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The project and location of the migration workflows to list. - * Example: `projects/123/locations/us` - */ - // const parent = 'abc123' - /** - * The list of fields to be retrieved. - */ - // const readMask = {} - /** - * The maximum number of migration workflows to return. The service may return - * fewer than this number. - */ - // const pageSize = 1234 - /** - * A page token, received from previous `ListMigrationWorkflows` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigrationWorkflows` - * must match the call that provided the page token. - */ - // const pageToken = 'abc123' - - // Imports the Migration library - const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2; - - // Instantiates a client - const migrationClient = new MigrationServiceClient(); - - async function callListMigrationWorkflows() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = migrationClient.listMigrationWorkflowsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListMigrationWorkflows(); - // [END bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.start_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.start_migration_workflow.js deleted file mode 100644 index 5e69b1b037c7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/migration_service.start_migration_workflow.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - */ - // const name = 'abc123' - - // Imports the Migration library - const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2; - - // Instantiates a client - const migrationClient = new MigrationServiceClient(); - - async function callStartMigrationWorkflow() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await migrationClient.startMigrationWorkflow(request); - console.log(response); - } - - callStartMigrationWorkflow(); - // [END bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json deleted file mode 100644 index 81ec8bbe7f6c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2/snippet_metadata_google.cloud.bigquery.migration.v2.json +++ /dev/null @@ -1,335 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-migration", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.bigquery.migration.v2", - "version": "v2" - } - ] - }, - "snippets": [ - { - "regionTag": "bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_async", - "title": "MigrationService createMigrationWorkflow Sample", - "origin": "API_DEFINITION", - "description": " Creates a migration workflow.", - "canonical": true, - "file": "migration_service.create_migration_workflow.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService.CreateMigrationWorkflow", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "migration_workflow", - "type": ".google.cloud.bigquery.migration.v2.MigrationWorkflow" - } - ], - "resultType": ".google.cloud.bigquery.migration.v2.MigrationWorkflow", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.bigquery.migration.v2.MigrationServiceClient" - }, - "method": { - "shortName": "CreateMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService.CreateMigrationWorkflow", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - } - }, - { - "regionTag": "bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_async", - "title": "MigrationService getMigrationWorkflow Sample", - "origin": "API_DEFINITION", - "description": " Gets a previously created migration workflow.", - "canonical": true, - "file": "migration_service.get_migration_workflow.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationWorkflow", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.bigquery.migration.v2.MigrationWorkflow", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.bigquery.migration.v2.MigrationServiceClient" - }, - "method": { - "shortName": "GetMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationWorkflow", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - } - }, - { - "regionTag": "bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_async", - "title": "MigrationService listMigrationWorkflows Sample", - "origin": "API_DEFINITION", - "description": " Lists previously created migration workflow.", - "canonical": true, - "file": "migration_service.list_migration_workflows.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListMigrationWorkflows", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationWorkflows", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.bigquery.migration.v2.ListMigrationWorkflowsResponse", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.bigquery.migration.v2.MigrationServiceClient" - }, - "method": { - "shortName": "ListMigrationWorkflows", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationWorkflows", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - } - }, - { - "regionTag": "bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_async", - "title": "MigrationService deleteMigrationWorkflow Sample", - "origin": "API_DEFINITION", - "description": " Deletes a migration workflow by name.", - "canonical": true, - "file": "migration_service.delete_migration_workflow.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService.DeleteMigrationWorkflow", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.bigquery.migration.v2.MigrationServiceClient" - }, - "method": { - "shortName": "DeleteMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService.DeleteMigrationWorkflow", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - } - }, - { - "regionTag": "bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_async", - "title": "MigrationService startMigrationWorkflow Sample", - "origin": "API_DEFINITION", - "description": " Starts a previously created migration workflow. I.e., the state transitions from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. An error will be signaled if the state is anything other than DRAFT or RUNNING.", - "canonical": true, - "file": "migration_service.start_migration_workflow.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "StartMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService.StartMigrationWorkflow", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.bigquery.migration.v2.MigrationServiceClient" - }, - "method": { - "shortName": "StartMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService.StartMigrationWorkflow", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - } - }, - { - "regionTag": "bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_async", - "title": "MigrationService getMigrationSubtask Sample", - "origin": "API_DEFINITION", - "description": " Gets a previously created migration subtask.", - "canonical": true, - "file": "migration_service.get_migration_subtask.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetMigrationSubtask", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationSubtask", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.bigquery.migration.v2.MigrationSubtask", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.bigquery.migration.v2.MigrationServiceClient" - }, - "method": { - "shortName": "GetMigrationSubtask", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService.GetMigrationSubtask", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - } - }, - { - "regionTag": "bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_async", - "title": "MigrationService listMigrationSubtasks Sample", - "origin": "API_DEFINITION", - "description": " Lists previously created migration subtasks.", - "canonical": true, - "file": "migration_service.list_migration_subtasks.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListMigrationSubtasks", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationSubtasks", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.bigquery.migration.v2.ListMigrationSubtasksResponse", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.bigquery.migration.v2.MigrationServiceClient" - }, - "method": { - "shortName": "ListMigrationSubtasks", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService.ListMigrationSubtasks", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.bigquery.migration.v2.MigrationService" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.create_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.create_migration_workflow.js deleted file mode 100644 index 8793094a899d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.create_migration_workflow.js +++ /dev/null @@ -1,67 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, migrationWorkflow) { - // [START bigquerymigration_v2alpha_generated_MigrationService_CreateMigrationWorkflow_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the project to which this migration workflow belongs. - * Example: `projects/foo/locations/bar` - */ - // const parent = 'abc123' - /** - * Required. The migration workflow to create. - */ - // const migrationWorkflow = {} - - // Imports the Migration library - const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; - - // Instantiates a client - const migrationClient = new MigrationServiceClient(); - - async function callCreateMigrationWorkflow() { - // Construct request - const request = { - parent, - migrationWorkflow, - }; - - // Run request - const response = await migrationClient.createMigrationWorkflow(request); - console.log(response); - } - - callCreateMigrationWorkflow(); - // [END bigquerymigration_v2alpha_generated_MigrationService_CreateMigrationWorkflow_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.delete_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.delete_migration_workflow.js deleted file mode 100644 index b0f0da839430..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.delete_migration_workflow.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START bigquerymigration_v2alpha_generated_MigrationService_DeleteMigrationWorkflow_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - */ - // const name = 'abc123' - - // Imports the Migration library - const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; - - // Instantiates a client - const migrationClient = new MigrationServiceClient(); - - async function callDeleteMigrationWorkflow() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await migrationClient.deleteMigrationWorkflow(request); - console.log(response); - } - - callDeleteMigrationWorkflow(); - // [END bigquerymigration_v2alpha_generated_MigrationService_DeleteMigrationWorkflow_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_subtask.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_subtask.js deleted file mode 100644 index a8f00b154050..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_subtask.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START bigquerymigration_v2alpha_generated_MigrationService_GetMigrationSubtask_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The unique identifier for the migration subtask. - * Example: `projects/123/locations/us/workflows/1234/subtasks/543` - */ - // const name = 'abc123' - /** - * Optional. The list of fields to be retrieved. - */ - // const readMask = {} - - // Imports the Migration library - const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; - - // Instantiates a client - const migrationClient = new MigrationServiceClient(); - - async function callGetMigrationSubtask() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await migrationClient.getMigrationSubtask(request); - console.log(response); - } - - callGetMigrationSubtask(); - // [END bigquerymigration_v2alpha_generated_MigrationService_GetMigrationSubtask_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_workflow.js deleted file mode 100644 index 05ca5c6a0451..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.get_migration_workflow.js +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START bigquerymigration_v2alpha_generated_MigrationService_GetMigrationWorkflow_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - */ - // const name = 'abc123' - /** - * The list of fields to be retrieved. - */ - // const readMask = {} - - // Imports the Migration library - const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; - - // Instantiates a client - const migrationClient = new MigrationServiceClient(); - - async function callGetMigrationWorkflow() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await migrationClient.getMigrationWorkflow(request); - console.log(response); - } - - callGetMigrationWorkflow(); - // [END bigquerymigration_v2alpha_generated_MigrationService_GetMigrationWorkflow_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_subtasks.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_subtasks.js deleted file mode 100644 index 75def68424d6..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_subtasks.js +++ /dev/null @@ -1,86 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START bigquerymigration_v2alpha_generated_MigrationService_ListMigrationSubtasks_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The migration task of the subtasks to list. - * Example: `projects/123/locations/us/workflows/1234` - */ - // const parent = 'abc123' - /** - * Optional. The list of fields to be retrieved. - */ - // const readMask = {} - /** - * Optional. The maximum number of migration tasks to return. The service may return - * fewer than this number. - */ - // const pageSize = 1234 - /** - * Optional. A page token, received from previous `ListMigrationSubtasks` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigrationSubtasks` - * must match the call that provided the page token. - */ - // const pageToken = 'abc123' - /** - * Optional. The filter to apply. This can be used to get the subtasks of a specific - * tasks in a workflow, e.g. `migration_task = "ab012"` where `"ab012"` is the - * task ID (not the name in the named map). - */ - // const filter = 'abc123' - - // Imports the Migration library - const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; - - // Instantiates a client - const migrationClient = new MigrationServiceClient(); - - async function callListMigrationSubtasks() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = migrationClient.listMigrationSubtasksAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListMigrationSubtasks(); - // [END bigquerymigration_v2alpha_generated_MigrationService_ListMigrationSubtasks_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_workflows.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_workflows.js deleted file mode 100644 index 43af8b853c09..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.list_migration_workflows.js +++ /dev/null @@ -1,80 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent) { - // [START bigquerymigration_v2alpha_generated_MigrationService_ListMigrationWorkflows_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The project and location of the migration workflows to list. - * Example: `projects/123/locations/us` - */ - // const parent = 'abc123' - /** - * The list of fields to be retrieved. - */ - // const readMask = {} - /** - * The maximum number of migration workflows to return. The service may return - * fewer than this number. - */ - // const pageSize = 1234 - /** - * A page token, received from previous `ListMigrationWorkflows` call. - * Provide this to retrieve the subsequent page. - * When paginating, all other parameters provided to `ListMigrationWorkflows` - * must match the call that provided the page token. - */ - // const pageToken = 'abc123' - - // Imports the Migration library - const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; - - // Instantiates a client - const migrationClient = new MigrationServiceClient(); - - async function callListMigrationWorkflows() { - // Construct request - const request = { - parent, - }; - - // Run request - const iterable = migrationClient.listMigrationWorkflowsAsync(request); - for await (const response of iterable) { - console.log(response); - } - } - - callListMigrationWorkflows(); - // [END bigquerymigration_v2alpha_generated_MigrationService_ListMigrationWorkflows_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.start_migration_workflow.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.start_migration_workflow.js deleted file mode 100644 index 7fd3c8a6ad48..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/migration_service.start_migration_workflow.js +++ /dev/null @@ -1,62 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(name) { - // [START bigquerymigration_v2alpha_generated_MigrationService_StartMigrationWorkflow_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - */ - // const name = 'abc123' - - // Imports the Migration library - const {MigrationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; - - // Instantiates a client - const migrationClient = new MigrationServiceClient(); - - async function callStartMigrationWorkflow() { - // Construct request - const request = { - name, - }; - - // Run request - const response = await migrationClient.startMigrationWorkflow(request); - console.log(response); - } - - callStartMigrationWorkflow(); - // [END bigquerymigration_v2alpha_generated_MigrationService_StartMigrationWorkflow_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json deleted file mode 100644 index f47decbc5783..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/snippet_metadata_google.cloud.bigquery.migration.v2alpha.json +++ /dev/null @@ -1,383 +0,0 @@ -{ - "clientLibrary": { - "name": "nodejs-migration", - "version": "0.1.0", - "language": "TYPESCRIPT", - "apis": [ - { - "id": "google.cloud.bigquery.migration.v2alpha", - "version": "v2alpha" - } - ] - }, - "snippets": [ - { - "regionTag": "bigquerymigration_v2alpha_generated_MigrationService_CreateMigrationWorkflow_async", - "title": "MigrationService createMigrationWorkflow Sample", - "origin": "API_DEFINITION", - "description": " Creates a migration workflow.", - "canonical": true, - "file": "migration_service.create_migration_workflow.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 59, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "CreateMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.CreateMigrationWorkflow", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "migration_workflow", - "type": ".google.cloud.bigquery.migration.v2alpha.MigrationWorkflow" - } - ], - "resultType": ".google.cloud.bigquery.migration.v2alpha.MigrationWorkflow", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationServiceClient" - }, - "method": { - "shortName": "CreateMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.CreateMigrationWorkflow", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService" - } - } - } - }, - { - "regionTag": "bigquerymigration_v2alpha_generated_MigrationService_GetMigrationWorkflow_async", - "title": "MigrationService getMigrationWorkflow Sample", - "origin": "API_DEFINITION", - "description": " Gets a previously created migration workflow.", - "canonical": true, - "file": "migration_service.get_migration_workflow.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationWorkflow", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.bigquery.migration.v2alpha.MigrationWorkflow", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationServiceClient" - }, - "method": { - "shortName": "GetMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationWorkflow", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService" - } - } - } - }, - { - "regionTag": "bigquerymigration_v2alpha_generated_MigrationService_ListMigrationWorkflows_async", - "title": "MigrationService listMigrationWorkflows Sample", - "origin": "API_DEFINITION", - "description": " Lists previously created migration workflow.", - "canonical": true, - "file": "migration_service.list_migration_workflows.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 72, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListMigrationWorkflows", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationWorkflows", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsResponse", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationServiceClient" - }, - "method": { - "shortName": "ListMigrationWorkflows", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationWorkflows", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService" - } - } - } - }, - { - "regionTag": "bigquerymigration_v2alpha_generated_MigrationService_DeleteMigrationWorkflow_async", - "title": "MigrationService deleteMigrationWorkflow Sample", - "origin": "API_DEFINITION", - "description": " Deletes a migration workflow by name.", - "canonical": true, - "file": "migration_service.delete_migration_workflow.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "DeleteMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.DeleteMigrationWorkflow", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationServiceClient" - }, - "method": { - "shortName": "DeleteMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.DeleteMigrationWorkflow", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService" - } - } - } - }, - { - "regionTag": "bigquerymigration_v2alpha_generated_MigrationService_StartMigrationWorkflow_async", - "title": "MigrationService startMigrationWorkflow Sample", - "origin": "API_DEFINITION", - "description": " Starts a previously created migration workflow. I.e., the state transitions from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. An error will be signaled if the state is anything other than DRAFT or RUNNING.", - "canonical": true, - "file": "migration_service.start_migration_workflow.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 54, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "StartMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.StartMigrationWorkflow", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.protobuf.Empty", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationServiceClient" - }, - "method": { - "shortName": "StartMigrationWorkflow", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.StartMigrationWorkflow", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService" - } - } - } - }, - { - "regionTag": "bigquerymigration_v2alpha_generated_MigrationService_GetMigrationSubtask_async", - "title": "MigrationService getMigrationSubtask Sample", - "origin": "API_DEFINITION", - "description": " Gets a previously created migration subtask.", - "canonical": true, - "file": "migration_service.get_migration_subtask.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 58, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "GetMigrationSubtask", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationSubtask", - "async": true, - "parameters": [ - { - "name": "name", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - } - ], - "resultType": ".google.cloud.bigquery.migration.v2alpha.MigrationSubtask", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationServiceClient" - }, - "method": { - "shortName": "GetMigrationSubtask", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.GetMigrationSubtask", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService" - } - } - } - }, - { - "regionTag": "bigquerymigration_v2alpha_generated_MigrationService_ListMigrationSubtasks_async", - "title": "MigrationService listMigrationSubtasks Sample", - "origin": "API_DEFINITION", - "description": " Lists previously created migration subtasks.", - "canonical": true, - "file": "migration_service.list_migration_subtasks.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 78, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "ListMigrationSubtasks", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationSubtasks", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "read_mask", - "type": ".google.protobuf.FieldMask" - }, - { - "name": "page_size", - "type": "TYPE_INT32" - }, - { - "name": "page_token", - "type": "TYPE_STRING" - }, - { - "name": "filter", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksResponse", - "client": { - "shortName": "MigrationServiceClient", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationServiceClient" - }, - "method": { - "shortName": "ListMigrationSubtasks", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService.ListMigrationSubtasks", - "service": { - "shortName": "MigrationService", - "fullName": "google.cloud.bigquery.migration.v2alpha.MigrationService" - } - } - } - }, - { - "regionTag": "bigquerymigration_v2alpha_generated_SqlTranslationService_TranslateQuery_async", - "title": "MigrationService translateQuery Sample", - "origin": "API_DEFINITION", - "description": " Translates input queries from source dialects to GoogleSQL.", - "canonical": true, - "file": "sql_translation_service.translate_query.js", - "language": "JAVASCRIPT", - "segments": [ - { - "start": 25, - "end": 64, - "type": "FULL" - } - ], - "clientMethod": { - "shortName": "TranslateQuery", - "fullName": "google.cloud.bigquery.migration.v2alpha.SqlTranslationService.TranslateQuery", - "async": true, - "parameters": [ - { - "name": "parent", - "type": "TYPE_STRING" - }, - { - "name": "source_dialect", - "type": ".google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect" - }, - { - "name": "query", - "type": "TYPE_STRING" - } - ], - "resultType": ".google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse", - "client": { - "shortName": "SqlTranslationServiceClient", - "fullName": "google.cloud.bigquery.migration.v2alpha.SqlTranslationServiceClient" - }, - "method": { - "shortName": "TranslateQuery", - "fullName": "google.cloud.bigquery.migration.v2alpha.SqlTranslationService.TranslateQuery", - "service": { - "shortName": "SqlTranslationService", - "fullName": "google.cloud.bigquery.migration.v2alpha.SqlTranslationService" - } - } - } - } - ] -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/sql_translation_service.translate_query.js b/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/sql_translation_service.translate_query.js deleted file mode 100644 index 3d1587673691..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/samples/generated/v2alpha/sql_translation_service.translate_query.js +++ /dev/null @@ -1,72 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - - -'use strict'; - -function main(parent, sourceDialect, query) { - // [START bigquerymigration_v2alpha_generated_SqlTranslationService_TranslateQuery_async] - /** - * This snippet has been automatically generated and should be regarded as a code template only. - * It will require modifications to work. - * It may require correct/in-range values for request initialization. - * TODO(developer): Uncomment these variables before running the sample. - */ - /** - * Required. The name of the project to which this translation request belongs. - * Example: `projects/foo/locations/bar` - */ - // const parent = 'abc123' - /** - * Required. The source SQL dialect of `queries`. - */ - // const sourceDialect = {} - /** - * Required. The query to be translated. - */ - // const query = 'abc123' - - // Imports the Migration library - const {SqlTranslationServiceClient} = require('@google-cloud/bigquery-migration').v2alpha; - - // Instantiates a client - const migrationClient = new SqlTranslationServiceClient(); - - async function callTranslateQuery() { - // Construct request - const request = { - parent, - sourceDialect, - query, - }; - - // Run request - const response = await migrationClient.translateQuery(request); - console.log(response); - } - - callTranslateQuery(); - // [END bigquerymigration_v2alpha_generated_SqlTranslationService_TranslateQuery_async] -} - -process.on('unhandledRejection', err => { - console.error(err.message); - process.exitCode = 1; -}); -main(...process.argv.slice(2)); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/index.ts b/owl-bot-staging/google-cloud-bigquery-migration/src/index.ts deleted file mode 100644 index f311b914e88a..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/src/index.ts +++ /dev/null @@ -1,28 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by synthtool. ** -// ** https://github.com/googleapis/synthtool ** -// ** All changes to this file may be overwritten. ** - -import * as v2 from './v2'; -import * as v2alpha from './v2alpha'; - -const MigrationServiceClient = v2.MigrationServiceClient; -type MigrationServiceClient = v2.MigrationServiceClient; - -export {v2, v2alpha, MigrationServiceClient}; -export default {v2, v2alpha, MigrationServiceClient}; -import * as protos from '../protos/protos'; -export {protos}; diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2/gapic_metadata.json deleted file mode 100644 index 1b6a33c671dc..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/src/v2/gapic_metadata.json +++ /dev/null @@ -1,101 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.bigquery.migration.v2", - "libraryPackage": "@google-cloud/bigquery-migration", - "services": { - "MigrationService": { - "clients": { - "grpc": { - "libraryClient": "MigrationServiceClient", - "rpcs": { - "CreateMigrationWorkflow": { - "methods": [ - "createMigrationWorkflow" - ] - }, - "GetMigrationWorkflow": { - "methods": [ - "getMigrationWorkflow" - ] - }, - "DeleteMigrationWorkflow": { - "methods": [ - "deleteMigrationWorkflow" - ] - }, - "StartMigrationWorkflow": { - "methods": [ - "startMigrationWorkflow" - ] - }, - "GetMigrationSubtask": { - "methods": [ - "getMigrationSubtask" - ] - }, - "ListMigrationWorkflows": { - "methods": [ - "listMigrationWorkflows", - "listMigrationWorkflowsStream", - "listMigrationWorkflowsAsync" - ] - }, - "ListMigrationSubtasks": { - "methods": [ - "listMigrationSubtasks", - "listMigrationSubtasksStream", - "listMigrationSubtasksAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "MigrationServiceClient", - "rpcs": { - "CreateMigrationWorkflow": { - "methods": [ - "createMigrationWorkflow" - ] - }, - "GetMigrationWorkflow": { - "methods": [ - "getMigrationWorkflow" - ] - }, - "DeleteMigrationWorkflow": { - "methods": [ - "deleteMigrationWorkflow" - ] - }, - "StartMigrationWorkflow": { - "methods": [ - "startMigrationWorkflow" - ] - }, - "GetMigrationSubtask": { - "methods": [ - "getMigrationSubtask" - ] - }, - "ListMigrationWorkflows": { - "methods": [ - "listMigrationWorkflows", - "listMigrationWorkflowsStream", - "listMigrationWorkflowsAsync" - ] - }, - "ListMigrationSubtasks": { - "methods": [ - "listMigrationSubtasks", - "listMigrationSubtasksStream", - "listMigrationSubtasksAsync" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2/index.ts b/owl-bot-staging/google-cloud-bigquery-migration/src/v2/index.ts deleted file mode 100644 index 1684847bea1c..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/src/v2/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -export { MigrationServiceClient } from './migration_service_client'; diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client.ts b/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client.ts deleted file mode 100644 index 7c36c8a70cc1..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client.ts +++ /dev/null @@ -1,1817 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type { - Callback, - CallOptions, - Descriptors, - ClientOptions, - PaginationCallback, - GaxCall, -} from 'google-gax'; -import { Transform } from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -import { loggingUtils as logging, decodeAnyProtosInArray } from 'google-gax'; - -/** - * Client JSON configuration object, loaded from - * `src/v2/migration_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './migration_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Service to handle EDW migrations. - * @class - * @memberof v2 - */ -export class MigrationServiceClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: { [method: string]: gax.CallSettings }; - private _universeDomain: string; - private _servicePath: string; - private _log = logging.log('bigquery-migration'); - - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: { [name: string]: Function }; - pathTemplates: { [name: string]: gax.PathTemplate }; - migrationServiceStub?: Promise<{ [name: string]: Function }>; - - /** - * Construct an instance of MigrationServiceClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new MigrationServiceClient({fallback: true}, gax); - * ``` - */ - constructor( - opts?: ClientOptions, - gaxInstance?: typeof gax | typeof gax.fallback, - ) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof MigrationServiceClient; - if ( - opts?.universe_domain && - opts?.universeDomain && - opts?.universe_domain !== opts?.universeDomain - ) { - throw new Error( - 'Please set either universe_domain or universeDomain, but not both.', - ); - } - const universeDomainEnvVar = - typeof process === 'object' && typeof process.env === 'object' - ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] - : undefined; - this._universeDomain = - opts?.universeDomain ?? - opts?.universe_domain ?? - universeDomainEnvVar ?? - 'googleapis.com'; - this._servicePath = 'bigquerymigration.' + this._universeDomain; - const servicePath = - opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!( - opts?.servicePath || opts?.apiEndpoint - ); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = - opts?.fallback ?? - (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = this._gaxGrpc.auth as gax.GoogleAuth; - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}', - ), - migrationSubtaskPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}', - ), - migrationWorkflowPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/workflows/{workflow}', - ), - }; - - // Some of the methods on this service return "paged" results, - // (e.g. 50 results at a time, with tokens to get subsequent - // pages). Denote the keys used for pagination and results. - this.descriptors.page = { - listMigrationWorkflows: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'migrationWorkflows', - ), - listMigrationSubtasks: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'migrationSubtasks', - ), - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.bigquery.migration.v2.MigrationService', - gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, - { 'x-goog-api-client': clientHeader.join(' ') }, - ); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - - // Add a warn function to the client constructor so it can be easily tested. - this.warn = this._gaxModule.warn; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.migrationServiceStub) { - return this.migrationServiceStub; - } - - // Put together the "service stub" for - // google.cloud.bigquery.migration.v2.MigrationService. - this.migrationServiceStub = this._gaxGrpc.createStub( - this._opts.fallback - ? (this._protos as protobuf.Root).lookupService( - 'google.cloud.bigquery.migration.v2.MigrationService', - ) - : // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.bigquery.migration.v2 - .MigrationService, - this._opts, - this._providedCustomServicePath, - ) as Promise<{ [method: string]: Function }>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const migrationServiceStubMethods = [ - 'createMigrationWorkflow', - 'getMigrationWorkflow', - 'listMigrationWorkflows', - 'deleteMigrationWorkflow', - 'startMigrationWorkflow', - 'getMigrationSubtask', - 'listMigrationSubtasks', - ]; - for (const methodName of migrationServiceStubMethods) { - const callPromise = this.migrationServiceStub.then( - (stub) => - (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error | null | undefined) => () => { - throw err; - }, - ); - - const descriptor = this.descriptors.page[methodName] || undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback, - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.migrationServiceStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if ( - typeof process === 'object' && - typeof process.emitWarning === 'function' - ) { - process.emitWarning( - 'Static servicePath is deprecated, please use the instance method instead.', - 'DeprecationWarning', - ); - } - return 'bigquerymigration.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if ( - typeof process === 'object' && - typeof process.emitWarning === 'function' - ) { - process.emitWarning( - 'Static apiEndpoint is deprecated, please use the instance method instead.', - 'DeprecationWarning', - ); - } - return 'bigquerymigration.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return ['https://www.googleapis.com/auth/cloud-platform']; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId( - callback?: Callback, - ): Promise | void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- - /** - * Creates a migration workflow. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the project to which this migration workflow belongs. - * Example: `projects/foo/locations/bar` - * @param {google.cloud.bigquery.migration.v2.MigrationWorkflow} request.migrationWorkflow - * Required. The migration workflow to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.bigquery.migration.v2.MigrationWorkflow|MigrationWorkflow}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v2/migration_service.create_migration_workflow.js - * region_tag:bigquerymigration_v2_generated_MigrationService_CreateMigrationWorkflow_async - */ - createMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, - options?: CallOptions, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - ( - | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - >; - createMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - createMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, - callback: Callback< - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - createMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - ( - | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('createMigrationWorkflow request %j', request); - const wrappedCallback: - | Callback< - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - > - | undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('createMigrationWorkflow response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls - .createMigrationWorkflow(request, options, wrappedCallback) - ?.then( - ([response, options, rawResponse]: [ - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - ( - | protos.google.cloud.bigquery.migration.v2.ICreateMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ]) => { - this._log.info('createMigrationWorkflow response %j', response); - return [response, options, rawResponse]; - }, - ) - .catch((error: any) => { - if ( - error && - 'statusDetails' in error && - error.statusDetails instanceof Array - ) { - const protos = this._gaxModule.protobuf.Root.fromJSON( - jsonProtos, - ) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray( - error.statusDetails, - protos, - ); - } - throw error; - }); - } - /** - * Gets a previously created migration workflow. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * @param {google.protobuf.FieldMask} request.readMask - * The list of fields to be retrieved. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.bigquery.migration.v2.MigrationWorkflow|MigrationWorkflow}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v2/migration_service.get_migration_workflow.js - * region_tag:bigquerymigration_v2_generated_MigrationService_GetMigrationWorkflow_async - */ - getMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, - options?: CallOptions, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - ( - | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - >; - getMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - getMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, - callback: Callback< - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - getMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - ( - | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('getMigrationWorkflow request %j', request); - const wrappedCallback: - | Callback< - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - > - | undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getMigrationWorkflow response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls - .getMigrationWorkflow(request, options, wrappedCallback) - ?.then( - ([response, options, rawResponse]: [ - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow, - ( - | protos.google.cloud.bigquery.migration.v2.IGetMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ]) => { - this._log.info('getMigrationWorkflow response %j', response); - return [response, options, rawResponse]; - }, - ) - .catch((error: any) => { - if ( - error && - 'statusDetails' in error && - error.statusDetails instanceof Array - ) { - const protos = this._gaxModule.protobuf.Root.fromJSON( - jsonProtos, - ) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray( - error.statusDetails, - protos, - ); - } - throw error; - }); - } - /** - * Deletes a migration workflow by name. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v2/migration_service.delete_migration_workflow.js - * region_tag:bigquerymigration_v2_generated_MigrationService_DeleteMigrationWorkflow_async - */ - deleteMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, - options?: CallOptions, - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - >; - deleteMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - deleteMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - deleteMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('deleteMigrationWorkflow request %j', request); - const wrappedCallback: - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - > - | undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('deleteMigrationWorkflow response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls - .deleteMigrationWorkflow(request, options, wrappedCallback) - ?.then( - ([response, options, rawResponse]: [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.bigquery.migration.v2.IDeleteMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ]) => { - this._log.info('deleteMigrationWorkflow response %j', response); - return [response, options, rawResponse]; - }, - ) - .catch((error: any) => { - if ( - error && - 'statusDetails' in error && - error.statusDetails instanceof Array - ) { - const protos = this._gaxModule.protobuf.Root.fromJSON( - jsonProtos, - ) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray( - error.statusDetails, - protos, - ); - } - throw error; - }); - } - /** - * Starts a previously created migration workflow. I.e., the state transitions - * from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. - * An error will be signaled if the state is anything other than DRAFT or - * RUNNING. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v2/migration_service.start_migration_workflow.js - * region_tag:bigquerymigration_v2_generated_MigrationService_StartMigrationWorkflow_async - */ - startMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, - options?: CallOptions, - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - >; - startMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - startMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - startMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('startMigrationWorkflow request %j', request); - const wrappedCallback: - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - > - | undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('startMigrationWorkflow response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls - .startMigrationWorkflow(request, options, wrappedCallback) - ?.then( - ([response, options, rawResponse]: [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.bigquery.migration.v2.IStartMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ]) => { - this._log.info('startMigrationWorkflow response %j', response); - return [response, options, rawResponse]; - }, - ) - .catch((error: any) => { - if ( - error && - 'statusDetails' in error && - error.statusDetails instanceof Array - ) { - const protos = this._gaxModule.protobuf.Root.fromJSON( - jsonProtos, - ) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray( - error.statusDetails, - protos, - ); - } - throw error; - }); - } - /** - * Gets a previously created migration subtask. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The unique identifier for the migration subtask. - * Example: `projects/123/locations/us/workflows/1234/subtasks/543` - * @param {google.protobuf.FieldMask} [request.readMask] - * Optional. The list of fields to be retrieved. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.bigquery.migration.v2.MigrationSubtask|MigrationSubtask}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v2/migration_service.get_migration_subtask.js - * region_tag:bigquerymigration_v2_generated_MigrationService_GetMigrationSubtask_async - */ - getMigrationSubtask( - request?: protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, - options?: CallOptions, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, - ( - | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest - | undefined - ), - {} | undefined, - ] - >; - getMigrationSubtask( - request: protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, - | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - getMigrationSubtask( - request: protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, - callback: Callback< - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, - | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - getMigrationSubtask( - request?: protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, - | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, - | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest - | null - | undefined, - {} | null | undefined - >, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, - ( - | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest - | undefined - ), - {} | undefined, - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('getMigrationSubtask request %j', request); - const wrappedCallback: - | Callback< - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, - | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest - | null - | undefined, - {} | null | undefined - > - | undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getMigrationSubtask response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls - .getMigrationSubtask(request, options, wrappedCallback) - ?.then( - ([response, options, rawResponse]: [ - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask, - ( - | protos.google.cloud.bigquery.migration.v2.IGetMigrationSubtaskRequest - | undefined - ), - {} | undefined, - ]) => { - this._log.info('getMigrationSubtask response %j', response); - return [response, options, rawResponse]; - }, - ) - .catch((error: any) => { - if ( - error && - 'statusDetails' in error && - error.statusDetails instanceof Array - ) { - const protos = this._gaxModule.protobuf.Root.fromJSON( - jsonProtos, - ) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray( - error.statusDetails, - protos, - ); - } - throw error; - }); - } - - /** - * Lists previously created migration workflow. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location of the migration workflows to list. - * Example: `projects/123/locations/us` - * @param {google.protobuf.FieldMask} request.readMask - * The list of fields to be retrieved. - * @param {number} request.pageSize - * The maximum number of migration workflows to return. The service may return - * fewer than this number. - * @param {string} request.pageToken - * A page token, received from previous `ListMigrationWorkflows` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListMigrationWorkflows` - * must match the call that provided the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.bigquery.migration.v2.MigrationWorkflow|MigrationWorkflow}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listMigrationWorkflowsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listMigrationWorkflows( - request?: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, - options?: CallOptions, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow[], - protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest | null, - protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse, - ] - >; - listMigrationWorkflows( - request: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, - | protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow - >, - ): void; - listMigrationWorkflows( - request: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, - callback: PaginationCallback< - protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, - | protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow - >, - ): void; - listMigrationWorkflows( - request?: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, - | protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow - >, - callback?: PaginationCallback< - protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, - | protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow - >, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow[], - protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest | null, - protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse, - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - this.initialize().catch((err) => { - throw err; - }); - const wrappedCallback: - | PaginationCallback< - protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, - | protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow - > - | undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listMigrationWorkflows values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listMigrationWorkflows request %j', request); - return this.innerApiCalls - .listMigrationWorkflows(request, options, wrappedCallback) - ?.then( - ([response, input, output]: [ - protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow[], - protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest | null, - protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsResponse, - ]) => { - this._log.info('listMigrationWorkflows values %j', response); - return [response, input, output]; - }, - ); - } - - /** - * Equivalent to `listMigrationWorkflows`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location of the migration workflows to list. - * Example: `projects/123/locations/us` - * @param {google.protobuf.FieldMask} request.readMask - * The list of fields to be retrieved. - * @param {number} request.pageSize - * The maximum number of migration workflows to return. The service may return - * fewer than this number. - * @param {string} request.pageToken - * A page token, received from previous `ListMigrationWorkflows` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListMigrationWorkflows` - * must match the call that provided the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.bigquery.migration.v2.MigrationWorkflow|MigrationWorkflow} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listMigrationWorkflowsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listMigrationWorkflowsStream( - request?: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, - options?: CallOptions, - ): Transform { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listMigrationWorkflows']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('listMigrationWorkflows stream %j', request); - return this.descriptors.page.listMigrationWorkflows.createStream( - this.innerApiCalls.listMigrationWorkflows as GaxCall, - request, - callSettings, - ); - } - - /** - * Equivalent to `listMigrationWorkflows`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location of the migration workflows to list. - * Example: `projects/123/locations/us` - * @param {google.protobuf.FieldMask} request.readMask - * The list of fields to be retrieved. - * @param {number} request.pageSize - * The maximum number of migration workflows to return. The service may return - * fewer than this number. - * @param {string} request.pageToken - * A page token, received from previous `ListMigrationWorkflows` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListMigrationWorkflows` - * must match the call that provided the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.bigquery.migration.v2.MigrationWorkflow|MigrationWorkflow}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v2/migration_service.list_migration_workflows.js - * region_tag:bigquerymigration_v2_generated_MigrationService_ListMigrationWorkflows_async - */ - listMigrationWorkflowsAsync( - request?: protos.google.cloud.bigquery.migration.v2.IListMigrationWorkflowsRequest, - options?: CallOptions, - ): AsyncIterable { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listMigrationWorkflows']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('listMigrationWorkflows iterate %j', request); - return this.descriptors.page.listMigrationWorkflows.asyncIterate( - this.innerApiCalls['listMigrationWorkflows'] as GaxCall, - request as {}, - callSettings, - ) as AsyncIterable; - } - /** - * Lists previously created migration subtasks. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The migration task of the subtasks to list. - * Example: `projects/123/locations/us/workflows/1234` - * @param {google.protobuf.FieldMask} [request.readMask] - * Optional. The list of fields to be retrieved. - * @param {number} [request.pageSize] - * Optional. The maximum number of migration tasks to return. The service may - * return fewer than this number. - * @param {string} [request.pageToken] - * Optional. A page token, received from previous `ListMigrationSubtasks` - * call. Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListMigrationSubtasks` - * must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. The filter to apply. This can be used to get the subtasks of a - * specific tasks in a workflow, e.g. `migration_task = "ab012"` where - * `"ab012"` is the task ID (not the name in the named map). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.bigquery.migration.v2.MigrationSubtask|MigrationSubtask}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listMigrationSubtasksAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listMigrationSubtasks( - request?: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, - options?: CallOptions, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask[], - protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest | null, - protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse, - ] - >; - listMigrationSubtasks( - request: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, - | protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask - >, - ): void; - listMigrationSubtasks( - request: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, - callback: PaginationCallback< - protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, - | protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask - >, - ): void; - listMigrationSubtasks( - request?: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, - | protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask - >, - callback?: PaginationCallback< - protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, - | protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask - >, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask[], - protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest | null, - protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse, - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - this.initialize().catch((err) => { - throw err; - }); - const wrappedCallback: - | PaginationCallback< - protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, - | protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask - > - | undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listMigrationSubtasks values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listMigrationSubtasks request %j', request); - return this.innerApiCalls - .listMigrationSubtasks(request, options, wrappedCallback) - ?.then( - ([response, input, output]: [ - protos.google.cloud.bigquery.migration.v2.IMigrationSubtask[], - protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest | null, - protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksResponse, - ]) => { - this._log.info('listMigrationSubtasks values %j', response); - return [response, input, output]; - }, - ); - } - - /** - * Equivalent to `listMigrationSubtasks`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The migration task of the subtasks to list. - * Example: `projects/123/locations/us/workflows/1234` - * @param {google.protobuf.FieldMask} [request.readMask] - * Optional. The list of fields to be retrieved. - * @param {number} [request.pageSize] - * Optional. The maximum number of migration tasks to return. The service may - * return fewer than this number. - * @param {string} [request.pageToken] - * Optional. A page token, received from previous `ListMigrationSubtasks` - * call. Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListMigrationSubtasks` - * must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. The filter to apply. This can be used to get the subtasks of a - * specific tasks in a workflow, e.g. `migration_task = "ab012"` where - * `"ab012"` is the task ID (not the name in the named map). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.bigquery.migration.v2.MigrationSubtask|MigrationSubtask} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listMigrationSubtasksAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listMigrationSubtasksStream( - request?: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, - options?: CallOptions, - ): Transform { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listMigrationSubtasks']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('listMigrationSubtasks stream %j', request); - return this.descriptors.page.listMigrationSubtasks.createStream( - this.innerApiCalls.listMigrationSubtasks as GaxCall, - request, - callSettings, - ); - } - - /** - * Equivalent to `listMigrationSubtasks`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The migration task of the subtasks to list. - * Example: `projects/123/locations/us/workflows/1234` - * @param {google.protobuf.FieldMask} [request.readMask] - * Optional. The list of fields to be retrieved. - * @param {number} [request.pageSize] - * Optional. The maximum number of migration tasks to return. The service may - * return fewer than this number. - * @param {string} [request.pageToken] - * Optional. A page token, received from previous `ListMigrationSubtasks` - * call. Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListMigrationSubtasks` - * must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. The filter to apply. This can be used to get the subtasks of a - * specific tasks in a workflow, e.g. `migration_task = "ab012"` where - * `"ab012"` is the task ID (not the name in the named map). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.bigquery.migration.v2.MigrationSubtask|MigrationSubtask}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v2/migration_service.list_migration_subtasks.js - * region_tag:bigquerymigration_v2_generated_MigrationService_ListMigrationSubtasks_async - */ - listMigrationSubtasksAsync( - request?: protos.google.cloud.bigquery.migration.v2.IListMigrationSubtasksRequest, - options?: CallOptions, - ): AsyncIterable { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listMigrationSubtasks']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('listMigrationSubtasks iterate %j', request); - return this.descriptors.page.listMigrationSubtasks.asyncIterate( - this.innerApiCalls['listMigrationSubtasks'] as GaxCall, - request as {}, - callSettings, - ) as AsyncIterable; - } - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified location resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - locationPath(project: string, location: string) { - return this.pathTemplates.locationPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).project; - } - - /** - * Parse the location from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).location; - } - - /** - * Return a fully-qualified migrationSubtask resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} workflow - * @param {string} subtask - * @returns {string} Resource name string. - */ - migrationSubtaskPath( - project: string, - location: string, - workflow: string, - subtask: string, - ) { - return this.pathTemplates.migrationSubtaskPathTemplate.render({ - project: project, - location: location, - workflow: workflow, - subtask: subtask, - }); - } - - /** - * Parse the project from MigrationSubtask resource. - * - * @param {string} migrationSubtaskName - * A fully-qualified path representing MigrationSubtask resource. - * @returns {string} A string representing the project. - */ - matchProjectFromMigrationSubtaskName(migrationSubtaskName: string) { - return this.pathTemplates.migrationSubtaskPathTemplate.match( - migrationSubtaskName, - ).project; - } - - /** - * Parse the location from MigrationSubtask resource. - * - * @param {string} migrationSubtaskName - * A fully-qualified path representing MigrationSubtask resource. - * @returns {string} A string representing the location. - */ - matchLocationFromMigrationSubtaskName(migrationSubtaskName: string) { - return this.pathTemplates.migrationSubtaskPathTemplate.match( - migrationSubtaskName, - ).location; - } - - /** - * Parse the workflow from MigrationSubtask resource. - * - * @param {string} migrationSubtaskName - * A fully-qualified path representing MigrationSubtask resource. - * @returns {string} A string representing the workflow. - */ - matchWorkflowFromMigrationSubtaskName(migrationSubtaskName: string) { - return this.pathTemplates.migrationSubtaskPathTemplate.match( - migrationSubtaskName, - ).workflow; - } - - /** - * Parse the subtask from MigrationSubtask resource. - * - * @param {string} migrationSubtaskName - * A fully-qualified path representing MigrationSubtask resource. - * @returns {string} A string representing the subtask. - */ - matchSubtaskFromMigrationSubtaskName(migrationSubtaskName: string) { - return this.pathTemplates.migrationSubtaskPathTemplate.match( - migrationSubtaskName, - ).subtask; - } - - /** - * Return a fully-qualified migrationWorkflow resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} workflow - * @returns {string} Resource name string. - */ - migrationWorkflowPath(project: string, location: string, workflow: string) { - return this.pathTemplates.migrationWorkflowPathTemplate.render({ - project: project, - location: location, - workflow: workflow, - }); - } - - /** - * Parse the project from MigrationWorkflow resource. - * - * @param {string} migrationWorkflowName - * A fully-qualified path representing MigrationWorkflow resource. - * @returns {string} A string representing the project. - */ - matchProjectFromMigrationWorkflowName(migrationWorkflowName: string) { - return this.pathTemplates.migrationWorkflowPathTemplate.match( - migrationWorkflowName, - ).project; - } - - /** - * Parse the location from MigrationWorkflow resource. - * - * @param {string} migrationWorkflowName - * A fully-qualified path representing MigrationWorkflow resource. - * @returns {string} A string representing the location. - */ - matchLocationFromMigrationWorkflowName(migrationWorkflowName: string) { - return this.pathTemplates.migrationWorkflowPathTemplate.match( - migrationWorkflowName, - ).location; - } - - /** - * Parse the workflow from MigrationWorkflow resource. - * - * @param {string} migrationWorkflowName - * A fully-qualified path representing MigrationWorkflow resource. - * @returns {string} A string representing the workflow. - */ - matchWorkflowFromMigrationWorkflowName(migrationWorkflowName: string) { - return this.pathTemplates.migrationWorkflowPathTemplate.match( - migrationWorkflowName, - ).workflow; - } - - /** - * Terminate the gRPC channel and close the client. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - if (this.migrationServiceStub && !this._terminated) { - return this.migrationServiceStub.then((stub) => { - this._log.info('ending gRPC channel'); - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client_config.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client_config.json deleted file mode 100644 index 5832815a0a9b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_client_config.json +++ /dev/null @@ -1,71 +0,0 @@ -{ - "interfaces": { - "google.cloud.bigquery.migration.v2.MigrationService": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - }, - "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateMigrationWorkflow": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetMigrationWorkflow": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListMigrationWorkflows": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeleteMigrationWorkflow": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "StartMigrationWorkflow": { - "timeout_millis": 60000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetMigrationSubtask": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "ListMigrationSubtasks": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json deleted file mode 100644 index 7dc6828feb59..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json +++ /dev/null @@ -1,11 +0,0 @@ -[ - "../../protos/google/cloud/bigquery/migration/v2/assessment_task.proto", - "../../protos/google/cloud/bigquery/migration/v2/migration_entities.proto", - "../../protos/google/cloud/bigquery/migration/v2/migration_error_details.proto", - "../../protos/google/cloud/bigquery/migration/v2/migration_metrics.proto", - "../../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_details.proto", - "../../protos/google/cloud/bigquery/migration/v2/translation_suggestion.proto", - "../../protos/google/cloud/bigquery/migration/v2/translation_usability.proto" -] diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/gapic_metadata.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/gapic_metadata.json deleted file mode 100644 index 9621cae014fa..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/gapic_metadata.json +++ /dev/null @@ -1,125 +0,0 @@ -{ - "schema": "1.0", - "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", - "language": "typescript", - "protoPackage": "google.cloud.bigquery.migration.v2alpha", - "libraryPackage": "@google-cloud/bigquery-migration", - "services": { - "MigrationService": { - "clients": { - "grpc": { - "libraryClient": "MigrationServiceClient", - "rpcs": { - "CreateMigrationWorkflow": { - "methods": [ - "createMigrationWorkflow" - ] - }, - "GetMigrationWorkflow": { - "methods": [ - "getMigrationWorkflow" - ] - }, - "DeleteMigrationWorkflow": { - "methods": [ - "deleteMigrationWorkflow" - ] - }, - "StartMigrationWorkflow": { - "methods": [ - "startMigrationWorkflow" - ] - }, - "GetMigrationSubtask": { - "methods": [ - "getMigrationSubtask" - ] - }, - "ListMigrationWorkflows": { - "methods": [ - "listMigrationWorkflows", - "listMigrationWorkflowsStream", - "listMigrationWorkflowsAsync" - ] - }, - "ListMigrationSubtasks": { - "methods": [ - "listMigrationSubtasks", - "listMigrationSubtasksStream", - "listMigrationSubtasksAsync" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "MigrationServiceClient", - "rpcs": { - "CreateMigrationWorkflow": { - "methods": [ - "createMigrationWorkflow" - ] - }, - "GetMigrationWorkflow": { - "methods": [ - "getMigrationWorkflow" - ] - }, - "DeleteMigrationWorkflow": { - "methods": [ - "deleteMigrationWorkflow" - ] - }, - "StartMigrationWorkflow": { - "methods": [ - "startMigrationWorkflow" - ] - }, - "GetMigrationSubtask": { - "methods": [ - "getMigrationSubtask" - ] - }, - "ListMigrationWorkflows": { - "methods": [ - "listMigrationWorkflows", - "listMigrationWorkflowsStream", - "listMigrationWorkflowsAsync" - ] - }, - "ListMigrationSubtasks": { - "methods": [ - "listMigrationSubtasks", - "listMigrationSubtasksStream", - "listMigrationSubtasksAsync" - ] - } - } - } - } - }, - "SqlTranslationService": { - "clients": { - "grpc": { - "libraryClient": "SqlTranslationServiceClient", - "rpcs": { - "TranslateQuery": { - "methods": [ - "translateQuery" - ] - } - } - }, - "grpc-fallback": { - "libraryClient": "SqlTranslationServiceClient", - "rpcs": { - "TranslateQuery": { - "methods": [ - "translateQuery" - ] - } - } - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/index.ts b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/index.ts deleted file mode 100644 index fb06e379fdf9..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/index.ts +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -export { MigrationServiceClient } from './migration_service_client'; -export { SqlTranslationServiceClient } from './sql_translation_service_client'; diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client.ts b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client.ts deleted file mode 100644 index d09ff9bca9d4..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client.ts +++ /dev/null @@ -1,1817 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type { - Callback, - CallOptions, - Descriptors, - ClientOptions, - PaginationCallback, - GaxCall, -} from 'google-gax'; -import { Transform } from 'stream'; -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -import { loggingUtils as logging, decodeAnyProtosInArray } from 'google-gax'; - -/** - * Client JSON configuration object, loaded from - * `src/v2alpha/migration_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './migration_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Service to handle EDW migrations. - * @class - * @memberof v2alpha - */ -export class MigrationServiceClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: { [method: string]: gax.CallSettings }; - private _universeDomain: string; - private _servicePath: string; - private _log = logging.log('bigquery-migration'); - - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: { [name: string]: Function }; - pathTemplates: { [name: string]: gax.PathTemplate }; - migrationServiceStub?: Promise<{ [name: string]: Function }>; - - /** - * Construct an instance of MigrationServiceClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new MigrationServiceClient({fallback: true}, gax); - * ``` - */ - constructor( - opts?: ClientOptions, - gaxInstance?: typeof gax | typeof gax.fallback, - ) { - // Ensure that options include all the required fields. - const staticMembers = this.constructor as typeof MigrationServiceClient; - if ( - opts?.universe_domain && - opts?.universeDomain && - opts?.universe_domain !== opts?.universeDomain - ) { - throw new Error( - 'Please set either universe_domain or universeDomain, but not both.', - ); - } - const universeDomainEnvVar = - typeof process === 'object' && typeof process.env === 'object' - ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] - : undefined; - this._universeDomain = - opts?.universeDomain ?? - opts?.universe_domain ?? - universeDomainEnvVar ?? - 'googleapis.com'; - this._servicePath = 'bigquerymigration.' + this._universeDomain; - const servicePath = - opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!( - opts?.servicePath || opts?.apiEndpoint - ); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = - opts?.fallback ?? - (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = this._gaxGrpc.auth as gax.GoogleAuth; - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}', - ), - migrationSubtaskPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}', - ), - migrationWorkflowPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/workflows/{workflow}', - ), - }; - - // Some of the methods on this service return "paged" results, - // (e.g. 50 results at a time, with tokens to get subsequent - // pages). Denote the keys used for pagination and results. - this.descriptors.page = { - listMigrationWorkflows: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'migrationWorkflows', - ), - listMigrationSubtasks: new this._gaxModule.PageDescriptor( - 'pageToken', - 'nextPageToken', - 'migrationSubtasks', - ), - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.bigquery.migration.v2alpha.MigrationService', - gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, - { 'x-goog-api-client': clientHeader.join(' ') }, - ); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - - // Add a warn function to the client constructor so it can be easily tested. - this.warn = this._gaxModule.warn; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.migrationServiceStub) { - return this.migrationServiceStub; - } - - // Put together the "service stub" for - // google.cloud.bigquery.migration.v2alpha.MigrationService. - this.migrationServiceStub = this._gaxGrpc.createStub( - this._opts.fallback - ? (this._protos as protobuf.Root).lookupService( - 'google.cloud.bigquery.migration.v2alpha.MigrationService', - ) - : // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.bigquery.migration.v2alpha - .MigrationService, - this._opts, - this._providedCustomServicePath, - ) as Promise<{ [method: string]: Function }>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const migrationServiceStubMethods = [ - 'createMigrationWorkflow', - 'getMigrationWorkflow', - 'listMigrationWorkflows', - 'deleteMigrationWorkflow', - 'startMigrationWorkflow', - 'getMigrationSubtask', - 'listMigrationSubtasks', - ]; - for (const methodName of migrationServiceStubMethods) { - const callPromise = this.migrationServiceStub.then( - (stub) => - (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error | null | undefined) => () => { - throw err; - }, - ); - - const descriptor = this.descriptors.page[methodName] || undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback, - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.migrationServiceStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if ( - typeof process === 'object' && - typeof process.emitWarning === 'function' - ) { - process.emitWarning( - 'Static servicePath is deprecated, please use the instance method instead.', - 'DeprecationWarning', - ); - } - return 'bigquerymigration.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if ( - typeof process === 'object' && - typeof process.emitWarning === 'function' - ) { - process.emitWarning( - 'Static apiEndpoint is deprecated, please use the instance method instead.', - 'DeprecationWarning', - ); - } - return 'bigquerymigration.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return ['https://www.googleapis.com/auth/cloud-platform']; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId( - callback?: Callback, - ): Promise | void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- - /** - * Creates a migration workflow. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the project to which this migration workflow belongs. - * Example: `projects/foo/locations/bar` - * @param {google.cloud.bigquery.migration.v2alpha.MigrationWorkflow} request.migrationWorkflow - * Required. The migration workflow to create. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow|MigrationWorkflow}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v2alpha/migration_service.create_migration_workflow.js - * region_tag:bigquerymigration_v2alpha_generated_MigrationService_CreateMigrationWorkflow_async - */ - createMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest, - options?: CallOptions, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - ( - | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - >; - createMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - createMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest, - callback: Callback< - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - createMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - ( - | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('createMigrationWorkflow request %j', request); - const wrappedCallback: - | Callback< - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - > - | undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('createMigrationWorkflow response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls - .createMigrationWorkflow(request, options, wrappedCallback) - ?.then( - ([response, options, rawResponse]: [ - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - ( - | protos.google.cloud.bigquery.migration.v2alpha.ICreateMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ]) => { - this._log.info('createMigrationWorkflow response %j', response); - return [response, options, rawResponse]; - }, - ) - .catch((error: any) => { - if ( - error && - 'statusDetails' in error && - error.statusDetails instanceof Array - ) { - const protos = this._gaxModule.protobuf.Root.fromJSON( - jsonProtos, - ) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray( - error.statusDetails, - protos, - ); - } - throw error; - }); - } - /** - * Gets a previously created migration workflow. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * @param {google.protobuf.FieldMask} request.readMask - * The list of fields to be retrieved. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow|MigrationWorkflow}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v2alpha/migration_service.get_migration_workflow.js - * region_tag:bigquerymigration_v2alpha_generated_MigrationService_GetMigrationWorkflow_async - */ - getMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest, - options?: CallOptions, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - ( - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - >; - getMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - getMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest, - callback: Callback< - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - getMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - ( - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('getMigrationWorkflow request %j', request); - const wrappedCallback: - | Callback< - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - > - | undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getMigrationWorkflow response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls - .getMigrationWorkflow(request, options, wrappedCallback) - ?.then( - ([response, options, rawResponse]: [ - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow, - ( - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ]) => { - this._log.info('getMigrationWorkflow response %j', response); - return [response, options, rawResponse]; - }, - ) - .catch((error: any) => { - if ( - error && - 'statusDetails' in error && - error.statusDetails instanceof Array - ) { - const protos = this._gaxModule.protobuf.Root.fromJSON( - jsonProtos, - ) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray( - error.statusDetails, - protos, - ); - } - throw error; - }); - } - /** - * Deletes a migration workflow by name. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v2alpha/migration_service.delete_migration_workflow.js - * region_tag:bigquerymigration_v2alpha_generated_MigrationService_DeleteMigrationWorkflow_async - */ - deleteMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest, - options?: CallOptions, - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - >; - deleteMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - deleteMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - deleteMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('deleteMigrationWorkflow request %j', request); - const wrappedCallback: - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - > - | undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('deleteMigrationWorkflow response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls - .deleteMigrationWorkflow(request, options, wrappedCallback) - ?.then( - ([response, options, rawResponse]: [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.bigquery.migration.v2alpha.IDeleteMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ]) => { - this._log.info('deleteMigrationWorkflow response %j', response); - return [response, options, rawResponse]; - }, - ) - .catch((error: any) => { - if ( - error && - 'statusDetails' in error && - error.statusDetails instanceof Array - ) { - const protos = this._gaxModule.protobuf.Root.fromJSON( - jsonProtos, - ) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray( - error.statusDetails, - protos, - ); - } - throw error; - }); - } - /** - * Starts a previously created migration workflow. I.e., the state transitions - * from DRAFT to RUNNING. This is a no-op if the state is already RUNNING. - * An error will be signaled if the state is anything other than DRAFT or - * RUNNING. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The unique identifier for the migration workflow. - * Example: `projects/123/locations/us/workflows/1234` - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v2alpha/migration_service.start_migration_workflow.js - * region_tag:bigquerymigration_v2alpha_generated_MigrationService_StartMigrationWorkflow_async - */ - startMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest, - options?: CallOptions, - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - >; - startMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest, - options: CallOptions, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - startMigrationWorkflow( - request: protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest, - callback: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - startMigrationWorkflow( - request?: protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - >, - ): Promise< - [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('startMigrationWorkflow request %j', request); - const wrappedCallback: - | Callback< - protos.google.protobuf.IEmpty, - | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest - | null - | undefined, - {} | null | undefined - > - | undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('startMigrationWorkflow response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls - .startMigrationWorkflow(request, options, wrappedCallback) - ?.then( - ([response, options, rawResponse]: [ - protos.google.protobuf.IEmpty, - ( - | protos.google.cloud.bigquery.migration.v2alpha.IStartMigrationWorkflowRequest - | undefined - ), - {} | undefined, - ]) => { - this._log.info('startMigrationWorkflow response %j', response); - return [response, options, rawResponse]; - }, - ) - .catch((error: any) => { - if ( - error && - 'statusDetails' in error && - error.statusDetails instanceof Array - ) { - const protos = this._gaxModule.protobuf.Root.fromJSON( - jsonProtos, - ) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray( - error.statusDetails, - protos, - ); - } - throw error; - }); - } - /** - * Gets a previously created migration subtask. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.name - * Required. The unique identifier for the migration subtask. - * Example: `projects/123/locations/us/workflows/1234/subtasks/543` - * @param {google.protobuf.FieldMask} [request.readMask] - * Optional. The list of fields to be retrieved. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask|MigrationSubtask}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v2alpha/migration_service.get_migration_subtask.js - * region_tag:bigquerymigration_v2alpha_generated_MigrationService_GetMigrationSubtask_async - */ - getMigrationSubtask( - request?: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest, - options?: CallOptions, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, - ( - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest - | undefined - ), - {} | undefined, - ] - >; - getMigrationSubtask( - request: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - getMigrationSubtask( - request: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest, - callback: Callback< - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - getMigrationSubtask( - request?: protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest - | null - | undefined, - {} | null | undefined - >, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, - ( - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest - | undefined - ), - {} | undefined, - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - name: request.name ?? '', - }); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('getMigrationSubtask request %j', request); - const wrappedCallback: - | Callback< - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest - | null - | undefined, - {} | null | undefined - > - | undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('getMigrationSubtask response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls - .getMigrationSubtask(request, options, wrappedCallback) - ?.then( - ([response, options, rawResponse]: [ - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask, - ( - | protos.google.cloud.bigquery.migration.v2alpha.IGetMigrationSubtaskRequest - | undefined - ), - {} | undefined, - ]) => { - this._log.info('getMigrationSubtask response %j', response); - return [response, options, rawResponse]; - }, - ) - .catch((error: any) => { - if ( - error && - 'statusDetails' in error && - error.statusDetails instanceof Array - ) { - const protos = this._gaxModule.protobuf.Root.fromJSON( - jsonProtos, - ) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray( - error.statusDetails, - protos, - ); - } - throw error; - }); - } - - /** - * Lists previously created migration workflow. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location of the migration workflows to list. - * Example: `projects/123/locations/us` - * @param {google.protobuf.FieldMask} request.readMask - * The list of fields to be retrieved. - * @param {number} request.pageSize - * The maximum number of migration workflows to return. The service may return - * fewer than this number. - * @param {string} request.pageToken - * A page token, received from previous `ListMigrationWorkflows` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListMigrationWorkflows` - * must match the call that provided the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow|MigrationWorkflow}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listMigrationWorkflowsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listMigrationWorkflows( - request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, - options?: CallOptions, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[], - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest | null, - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse, - ] - >; - listMigrationWorkflows( - request: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, - | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow - >, - ): void; - listMigrationWorkflows( - request: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, - callback: PaginationCallback< - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, - | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow - >, - ): void; - listMigrationWorkflows( - request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, - | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow - >, - callback?: PaginationCallback< - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, - | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow - >, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[], - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest | null, - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse, - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - this.initialize().catch((err) => { - throw err; - }); - const wrappedCallback: - | PaginationCallback< - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, - | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow - > - | undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listMigrationWorkflows values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listMigrationWorkflows request %j', request); - return this.innerApiCalls - .listMigrationWorkflows(request, options, wrappedCallback) - ?.then( - ([response, input, output]: [ - protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[], - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest | null, - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsResponse, - ]) => { - this._log.info('listMigrationWorkflows values %j', response); - return [response, input, output]; - }, - ); - } - - /** - * Equivalent to `listMigrationWorkflows`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location of the migration workflows to list. - * Example: `projects/123/locations/us` - * @param {google.protobuf.FieldMask} request.readMask - * The list of fields to be retrieved. - * @param {number} request.pageSize - * The maximum number of migration workflows to return. The service may return - * fewer than this number. - * @param {string} request.pageToken - * A page token, received from previous `ListMigrationWorkflows` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListMigrationWorkflows` - * must match the call that provided the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow|MigrationWorkflow} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listMigrationWorkflowsAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listMigrationWorkflowsStream( - request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, - options?: CallOptions, - ): Transform { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listMigrationWorkflows']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('listMigrationWorkflows stream %j', request); - return this.descriptors.page.listMigrationWorkflows.createStream( - this.innerApiCalls.listMigrationWorkflows as GaxCall, - request, - callSettings, - ); - } - - /** - * Equivalent to `listMigrationWorkflows`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The project and location of the migration workflows to list. - * Example: `projects/123/locations/us` - * @param {google.protobuf.FieldMask} request.readMask - * The list of fields to be retrieved. - * @param {number} request.pageSize - * The maximum number of migration workflows to return. The service may return - * fewer than this number. - * @param {string} request.pageToken - * A page token, received from previous `ListMigrationWorkflows` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListMigrationWorkflows` - * must match the call that provided the page token. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow|MigrationWorkflow}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v2alpha/migration_service.list_migration_workflows.js - * region_tag:bigquerymigration_v2alpha_generated_MigrationService_ListMigrationWorkflows_async - */ - listMigrationWorkflowsAsync( - request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationWorkflowsRequest, - options?: CallOptions, - ): AsyncIterable { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listMigrationWorkflows']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('listMigrationWorkflows iterate %j', request); - return this.descriptors.page.listMigrationWorkflows.asyncIterate( - this.innerApiCalls['listMigrationWorkflows'] as GaxCall, - request as {}, - callSettings, - ) as AsyncIterable; - } - /** - * Lists previously created migration subtasks. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The migration task of the subtasks to list. - * Example: `projects/123/locations/us/workflows/1234` - * @param {google.protobuf.FieldMask} [request.readMask] - * Optional. The list of fields to be retrieved. - * @param {number} [request.pageSize] - * Optional. The maximum number of migration tasks to return. The service may return - * fewer than this number. - * @param {string} [request.pageToken] - * Optional. A page token, received from previous `ListMigrationSubtasks` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListMigrationSubtasks` - * must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. The filter to apply. This can be used to get the subtasks of a specific - * tasks in a workflow, e.g. `migration_task = "ab012"` where `"ab012"` is the - * task ID (not the name in the named map). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is Array of {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask|MigrationSubtask}. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed and will merge results from all the pages into this array. - * Note that it can affect your quota. - * We recommend using `listMigrationSubtasksAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listMigrationSubtasks( - request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, - options?: CallOptions, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[], - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest | null, - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse, - ] - >; - listMigrationSubtasks( - request: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, - options: CallOptions, - callback: PaginationCallback< - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, - | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask - >, - ): void; - listMigrationSubtasks( - request: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, - callback: PaginationCallback< - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, - | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask - >, - ): void; - listMigrationSubtasks( - request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, - optionsOrCallback?: - | CallOptions - | PaginationCallback< - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, - | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask - >, - callback?: PaginationCallback< - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, - | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask - >, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[], - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest | null, - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse, - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - this.initialize().catch((err) => { - throw err; - }); - const wrappedCallback: - | PaginationCallback< - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, - | protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse - | null - | undefined, - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask - > - | undefined = callback - ? (error, values, nextPageRequest, rawResponse) => { - this._log.info('listMigrationSubtasks values %j', values); - callback!(error, values, nextPageRequest, rawResponse); // We verified callback above. - } - : undefined; - this._log.info('listMigrationSubtasks request %j', request); - return this.innerApiCalls - .listMigrationSubtasks(request, options, wrappedCallback) - ?.then( - ([response, input, output]: [ - protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[], - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest | null, - protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksResponse, - ]) => { - this._log.info('listMigrationSubtasks values %j', response); - return [response, input, output]; - }, - ); - } - - /** - * Equivalent to `listMigrationSubtasks`, but returns a NodeJS Stream object. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The migration task of the subtasks to list. - * Example: `projects/123/locations/us/workflows/1234` - * @param {google.protobuf.FieldMask} [request.readMask] - * Optional. The list of fields to be retrieved. - * @param {number} [request.pageSize] - * Optional. The maximum number of migration tasks to return. The service may return - * fewer than this number. - * @param {string} [request.pageToken] - * Optional. A page token, received from previous `ListMigrationSubtasks` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListMigrationSubtasks` - * must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. The filter to apply. This can be used to get the subtasks of a specific - * tasks in a workflow, e.g. `migration_task = "ab012"` where `"ab012"` is the - * task ID (not the name in the named map). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Stream} - * An object stream which emits an object representing {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask|MigrationSubtask} on 'data' event. - * The client library will perform auto-pagination by default: it will call the API as many - * times as needed. Note that it can affect your quota. - * We recommend using `listMigrationSubtasksAsync()` - * method described below for async iteration which you can stop as needed. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - */ - listMigrationSubtasksStream( - request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, - options?: CallOptions, - ): Transform { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listMigrationSubtasks']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('listMigrationSubtasks stream %j', request); - return this.descriptors.page.listMigrationSubtasks.createStream( - this.innerApiCalls.listMigrationSubtasks as GaxCall, - request, - callSettings, - ); - } - - /** - * Equivalent to `listMigrationSubtasks`, but returns an iterable object. - * - * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The migration task of the subtasks to list. - * Example: `projects/123/locations/us/workflows/1234` - * @param {google.protobuf.FieldMask} [request.readMask] - * Optional. The list of fields to be retrieved. - * @param {number} [request.pageSize] - * Optional. The maximum number of migration tasks to return. The service may return - * fewer than this number. - * @param {string} [request.pageToken] - * Optional. A page token, received from previous `ListMigrationSubtasks` call. - * Provide this to retrieve the subsequent page. - * - * When paginating, all other parameters provided to `ListMigrationSubtasks` - * must match the call that provided the page token. - * @param {string} [request.filter] - * Optional. The filter to apply. This can be used to get the subtasks of a specific - * tasks in a workflow, e.g. `migration_task = "ab012"` where `"ab012"` is the - * task ID (not the name in the named map). - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Object} - * An iterable Object that allows {@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Iteration_protocols | async iteration }. - * When you iterate the returned iterable, each element will be an object representing - * {@link protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask|MigrationSubtask}. The API will be called under the hood as needed, once per the page, - * so you can stop the iteration when you don't need more results. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } - * for more details and examples. - * @example include:samples/generated/v2alpha/migration_service.list_migration_subtasks.js - * region_tag:bigquerymigration_v2alpha_generated_MigrationService_ListMigrationSubtasks_async - */ - listMigrationSubtasksAsync( - request?: protos.google.cloud.bigquery.migration.v2alpha.IListMigrationSubtasksRequest, - options?: CallOptions, - ): AsyncIterable { - request = request || {}; - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - const defaultCallSettings = this._defaults['listMigrationSubtasks']; - const callSettings = defaultCallSettings.merge(options); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('listMigrationSubtasks iterate %j', request); - return this.descriptors.page.listMigrationSubtasks.asyncIterate( - this.innerApiCalls['listMigrationSubtasks'] as GaxCall, - request as {}, - callSettings, - ) as AsyncIterable; - } - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified location resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - locationPath(project: string, location: string) { - return this.pathTemplates.locationPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).project; - } - - /** - * Parse the location from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).location; - } - - /** - * Return a fully-qualified migrationSubtask resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} workflow - * @param {string} subtask - * @returns {string} Resource name string. - */ - migrationSubtaskPath( - project: string, - location: string, - workflow: string, - subtask: string, - ) { - return this.pathTemplates.migrationSubtaskPathTemplate.render({ - project: project, - location: location, - workflow: workflow, - subtask: subtask, - }); - } - - /** - * Parse the project from MigrationSubtask resource. - * - * @param {string} migrationSubtaskName - * A fully-qualified path representing MigrationSubtask resource. - * @returns {string} A string representing the project. - */ - matchProjectFromMigrationSubtaskName(migrationSubtaskName: string) { - return this.pathTemplates.migrationSubtaskPathTemplate.match( - migrationSubtaskName, - ).project; - } - - /** - * Parse the location from MigrationSubtask resource. - * - * @param {string} migrationSubtaskName - * A fully-qualified path representing MigrationSubtask resource. - * @returns {string} A string representing the location. - */ - matchLocationFromMigrationSubtaskName(migrationSubtaskName: string) { - return this.pathTemplates.migrationSubtaskPathTemplate.match( - migrationSubtaskName, - ).location; - } - - /** - * Parse the workflow from MigrationSubtask resource. - * - * @param {string} migrationSubtaskName - * A fully-qualified path representing MigrationSubtask resource. - * @returns {string} A string representing the workflow. - */ - matchWorkflowFromMigrationSubtaskName(migrationSubtaskName: string) { - return this.pathTemplates.migrationSubtaskPathTemplate.match( - migrationSubtaskName, - ).workflow; - } - - /** - * Parse the subtask from MigrationSubtask resource. - * - * @param {string} migrationSubtaskName - * A fully-qualified path representing MigrationSubtask resource. - * @returns {string} A string representing the subtask. - */ - matchSubtaskFromMigrationSubtaskName(migrationSubtaskName: string) { - return this.pathTemplates.migrationSubtaskPathTemplate.match( - migrationSubtaskName, - ).subtask; - } - - /** - * Return a fully-qualified migrationWorkflow resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} workflow - * @returns {string} Resource name string. - */ - migrationWorkflowPath(project: string, location: string, workflow: string) { - return this.pathTemplates.migrationWorkflowPathTemplate.render({ - project: project, - location: location, - workflow: workflow, - }); - } - - /** - * Parse the project from MigrationWorkflow resource. - * - * @param {string} migrationWorkflowName - * A fully-qualified path representing MigrationWorkflow resource. - * @returns {string} A string representing the project. - */ - matchProjectFromMigrationWorkflowName(migrationWorkflowName: string) { - return this.pathTemplates.migrationWorkflowPathTemplate.match( - migrationWorkflowName, - ).project; - } - - /** - * Parse the location from MigrationWorkflow resource. - * - * @param {string} migrationWorkflowName - * A fully-qualified path representing MigrationWorkflow resource. - * @returns {string} A string representing the location. - */ - matchLocationFromMigrationWorkflowName(migrationWorkflowName: string) { - return this.pathTemplates.migrationWorkflowPathTemplate.match( - migrationWorkflowName, - ).location; - } - - /** - * Parse the workflow from MigrationWorkflow resource. - * - * @param {string} migrationWorkflowName - * A fully-qualified path representing MigrationWorkflow resource. - * @returns {string} A string representing the workflow. - */ - matchWorkflowFromMigrationWorkflowName(migrationWorkflowName: string) { - return this.pathTemplates.migrationWorkflowPathTemplate.match( - migrationWorkflowName, - ).workflow; - } - - /** - * Terminate the gRPC channel and close the client. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - if (this.migrationServiceStub && !this._terminated) { - return this.migrationServiceStub.then((stub) => { - this._log.info('ending gRPC channel'); - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client_config.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client_config.json deleted file mode 100644 index 2184b83b5e7d..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_client_config.json +++ /dev/null @@ -1,73 +0,0 @@ -{ - "interfaces": { - "google.cloud.bigquery.migration.v2alpha.MigrationService": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ], - "unavailable": [ - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - }, - "ce5b960a6ed052e690863808e4f0deff3dc7d49f": { - "initial_retry_delay_millis": 1000, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 10000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "CreateMigrationWorkflow": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "GetMigrationWorkflow": { - "timeout_millis": 120000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListMigrationWorkflows": { - "timeout_millis": 120000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "DeleteMigrationWorkflow": { - "timeout_millis": 60000, - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - }, - "StartMigrationWorkflow": { - "timeout_millis": 120000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "GetMigrationSubtask": { - "timeout_millis": 120000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - }, - "ListMigrationSubtasks": { - "timeout_millis": 120000, - "retry_codes_name": "unavailable", - "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_proto_list.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_proto_list.json deleted file mode 100644 index fdbd5988dca7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/migration_service_proto_list.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - "../../protos/google/cloud/bigquery/migration/v2alpha/assessment_task.proto", - "../../protos/google/cloud/bigquery/migration/v2alpha/migration_entities.proto", - "../../protos/google/cloud/bigquery/migration/v2alpha/migration_error_details.proto", - "../../protos/google/cloud/bigquery/migration/v2alpha/migration_metrics.proto", - "../../protos/google/cloud/bigquery/migration/v2alpha/migration_service.proto", - "../../protos/google/cloud/bigquery/migration/v2alpha/translation_service.proto", - "../../protos/google/cloud/bigquery/migration/v2alpha/translation_task.proto" -] diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client.ts b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client.ts deleted file mode 100644 index 7861ebbd0022..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client.ts +++ /dev/null @@ -1,711 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -/* global window */ -import type * as gax from 'google-gax'; -import type { - Callback, - CallOptions, - Descriptors, - ClientOptions, -} from 'google-gax'; - -import * as protos from '../../protos/protos'; -import jsonProtos = require('../../protos/protos.json'); -import { loggingUtils as logging, decodeAnyProtosInArray } from 'google-gax'; - -/** - * Client JSON configuration object, loaded from - * `src/v2alpha/sql_translation_service_client_config.json`. - * This file defines retry strategy and timeouts for all API methods in this library. - */ -import * as gapicConfig from './sql_translation_service_client_config.json'; -const version = require('../../../package.json').version; - -/** - * Provides other SQL dialects to GoogleSQL translation operations. - * @class - * @memberof v2alpha - */ -export class SqlTranslationServiceClient { - private _terminated = false; - private _opts: ClientOptions; - private _providedCustomServicePath: boolean; - private _gaxModule: typeof gax | typeof gax.fallback; - private _gaxGrpc: gax.GrpcClient | gax.fallback.GrpcClient; - private _protos: {}; - private _defaults: { [method: string]: gax.CallSettings }; - private _universeDomain: string; - private _servicePath: string; - private _log = logging.log('bigquery-migration'); - - auth: gax.GoogleAuth; - descriptors: Descriptors = { - page: {}, - stream: {}, - longrunning: {}, - batching: {}, - }; - warn: (code: string, message: string, warnType?: string) => void; - innerApiCalls: { [name: string]: Function }; - pathTemplates: { [name: string]: gax.PathTemplate }; - sqlTranslationServiceStub?: Promise<{ [name: string]: Function }>; - - /** - * Construct an instance of SqlTranslationServiceClient. - * - * @param {object} [options] - The configuration object. - * The options accepted by the constructor are described in detail - * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). - * The common options are: - * @param {object} [options.credentials] - Credentials object. - * @param {string} [options.credentials.client_email] - * @param {string} [options.credentials.private_key] - * @param {string} [options.email] - Account email address. Required when - * using a .pem or .p12 keyFilename. - * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or - * .p12 key downloaded from the Google Developers Console. If you provide - * a path to a JSON file, the projectId option below is not necessary. - * NOTE: .pem and .p12 require you to specify options.email as well. - * @param {number} [options.port] - The port on which to connect to - * the remote host. - * @param {string} [options.projectId] - The project ID from the Google - * Developer's Console, e.g. 'grape-spaceship-123'. We will also check - * the environment variable GCLOUD_PROJECT for your project ID. If your - * app is running in an environment which supports - * {@link https://cloud.google.com/docs/authentication/application-default-credentials Application Default Credentials}, - * your project ID will be detected automatically. - * @param {string} [options.apiEndpoint] - The domain name of the - * API remote host. - * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. - * Follows the structure of {@link gapicConfig}. - * @param {boolean} [options.fallback] - Use HTTP/1.1 REST mode. - * For more information, please check the - * {@link https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#http11-rest-api-mode documentation}. - * @param {gax} [gaxInstance]: loaded instance of `google-gax`. Useful if you - * need to avoid loading the default gRPC version and want to use the fallback - * HTTP implementation. Load only fallback version and pass it to the constructor: - * ``` - * const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC - * const client = new SqlTranslationServiceClient({fallback: true}, gax); - * ``` - */ - constructor( - opts?: ClientOptions, - gaxInstance?: typeof gax | typeof gax.fallback, - ) { - // Ensure that options include all the required fields. - const staticMembers = this - .constructor as typeof SqlTranslationServiceClient; - if ( - opts?.universe_domain && - opts?.universeDomain && - opts?.universe_domain !== opts?.universeDomain - ) { - throw new Error( - 'Please set either universe_domain or universeDomain, but not both.', - ); - } - const universeDomainEnvVar = - typeof process === 'object' && typeof process.env === 'object' - ? process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] - : undefined; - this._universeDomain = - opts?.universeDomain ?? - opts?.universe_domain ?? - universeDomainEnvVar ?? - 'googleapis.com'; - this._servicePath = 'bigquerymigration.' + this._universeDomain; - const servicePath = - opts?.servicePath || opts?.apiEndpoint || this._servicePath; - this._providedCustomServicePath = !!( - opts?.servicePath || opts?.apiEndpoint - ); - const port = opts?.port || staticMembers.port; - const clientConfig = opts?.clientConfig ?? {}; - const fallback = - opts?.fallback ?? - (typeof window !== 'undefined' && typeof window?.fetch === 'function'); - opts = Object.assign({ servicePath, port, clientConfig, fallback }, opts); - - // If scopes are unset in options and we're connecting to a non-default endpoint, set scopes just in case. - if (servicePath !== this._servicePath && !('scopes' in opts)) { - opts['scopes'] = staticMembers.scopes; - } - - // Load google-gax module synchronously if needed - if (!gaxInstance) { - gaxInstance = require('google-gax') as typeof gax; - } - - // Choose either gRPC or proto-over-HTTP implementation of google-gax. - this._gaxModule = opts.fallback ? gaxInstance.fallback : gaxInstance; - - // Create a `gaxGrpc` object, with any grpc-specific options sent to the client. - this._gaxGrpc = new this._gaxModule.GrpcClient(opts); - - // Save options to use in initialize() method. - this._opts = opts; - - // Save the auth object to the client, for use by other methods. - this.auth = this._gaxGrpc.auth as gax.GoogleAuth; - - // Set useJWTAccessWithScope on the auth object. - this.auth.useJWTAccessWithScope = true; - - // Set defaultServicePath on the auth object. - this.auth.defaultServicePath = this._servicePath; - - // Set the default scopes in auth client if needed. - if (servicePath === this._servicePath) { - this.auth.defaultScopes = staticMembers.scopes; - } - - // Determine the client header string. - const clientHeader = [`gax/${this._gaxModule.version}`, `gapic/${version}`]; - if (typeof process === 'object' && 'versions' in process) { - clientHeader.push(`gl-node/${process.versions.node}`); - } else { - clientHeader.push(`gl-web/${this._gaxModule.version}`); - } - if (!opts.fallback) { - clientHeader.push(`grpc/${this._gaxGrpc.grpcVersion}`); - } else { - clientHeader.push(`rest/${this._gaxGrpc.grpcVersion}`); - } - if (opts.libName && opts.libVersion) { - clientHeader.push(`${opts.libName}/${opts.libVersion}`); - } - // Load the applicable protos. - this._protos = this._gaxGrpc.loadProtoJSON(jsonProtos); - - // This API contains "path templates"; forward-slash-separated - // identifiers to uniquely identify resources within the API. - // Create useful helper objects for these. - this.pathTemplates = { - locationPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}', - ), - migrationSubtaskPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/workflows/{workflow}/subtasks/{subtask}', - ), - migrationWorkflowPathTemplate: new this._gaxModule.PathTemplate( - 'projects/{project}/locations/{location}/workflows/{workflow}', - ), - }; - - // Put together the default options sent with requests. - this._defaults = this._gaxGrpc.constructSettings( - 'google.cloud.bigquery.migration.v2alpha.SqlTranslationService', - gapicConfig as gax.ClientConfig, - opts.clientConfig || {}, - { 'x-goog-api-client': clientHeader.join(' ') }, - ); - - // Set up a dictionary of "inner API calls"; the core implementation - // of calling the API is handled in `google-gax`, with this code - // merely providing the destination and request information. - this.innerApiCalls = {}; - - // Add a warn function to the client constructor so it can be easily tested. - this.warn = this._gaxModule.warn; - } - - /** - * Initialize the client. - * Performs asynchronous operations (such as authentication) and prepares the client. - * This function will be called automatically when any class method is called for the - * first time, but if you need to initialize it before calling an actual method, - * feel free to call initialize() directly. - * - * You can await on this method if you want to make sure the client is initialized. - * - * @returns {Promise} A promise that resolves to an authenticated service stub. - */ - initialize() { - // If the client stub promise is already initialized, return immediately. - if (this.sqlTranslationServiceStub) { - return this.sqlTranslationServiceStub; - } - - // Put together the "service stub" for - // google.cloud.bigquery.migration.v2alpha.SqlTranslationService. - this.sqlTranslationServiceStub = this._gaxGrpc.createStub( - this._opts.fallback - ? (this._protos as protobuf.Root).lookupService( - 'google.cloud.bigquery.migration.v2alpha.SqlTranslationService', - ) - : // eslint-disable-next-line @typescript-eslint/no-explicit-any - (this._protos as any).google.cloud.bigquery.migration.v2alpha - .SqlTranslationService, - this._opts, - this._providedCustomServicePath, - ) as Promise<{ [method: string]: Function }>; - - // Iterate over each of the methods that the service provides - // and create an API call method for each. - const sqlTranslationServiceStubMethods = ['translateQuery']; - for (const methodName of sqlTranslationServiceStubMethods) { - const callPromise = this.sqlTranslationServiceStub.then( - (stub) => - (...args: Array<{}>) => { - if (this._terminated) { - return Promise.reject('The client has already been closed.'); - } - const func = stub[methodName]; - return func.apply(stub, args); - }, - (err: Error | null | undefined) => () => { - throw err; - }, - ); - - const descriptor = undefined; - const apiCall = this._gaxModule.createApiCall( - callPromise, - this._defaults[methodName], - descriptor, - this._opts.fallback, - ); - - this.innerApiCalls[methodName] = apiCall; - } - - return this.sqlTranslationServiceStub; - } - - /** - * The DNS address for this API service. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get servicePath() { - if ( - typeof process === 'object' && - typeof process.emitWarning === 'function' - ) { - process.emitWarning( - 'Static servicePath is deprecated, please use the instance method instead.', - 'DeprecationWarning', - ); - } - return 'bigquerymigration.googleapis.com'; - } - - /** - * The DNS address for this API service - same as servicePath. - * @deprecated Use the apiEndpoint method of the client instance. - * @returns {string} The DNS address for this service. - */ - static get apiEndpoint() { - if ( - typeof process === 'object' && - typeof process.emitWarning === 'function' - ) { - process.emitWarning( - 'Static apiEndpoint is deprecated, please use the instance method instead.', - 'DeprecationWarning', - ); - } - return 'bigquerymigration.googleapis.com'; - } - - /** - * The DNS address for this API service. - * @returns {string} The DNS address for this service. - */ - get apiEndpoint() { - return this._servicePath; - } - - get universeDomain() { - return this._universeDomain; - } - - /** - * The port for this API service. - * @returns {number} The default port for this service. - */ - static get port() { - return 443; - } - - /** - * The scopes needed to make gRPC calls for every method defined - * in this service. - * @returns {string[]} List of default scopes. - */ - static get scopes() { - return ['https://www.googleapis.com/auth/cloud-platform']; - } - - getProjectId(): Promise; - getProjectId(callback: Callback): void; - /** - * Return the project ID used by this class. - * @returns {Promise} A promise that resolves to string containing the project ID. - */ - getProjectId( - callback?: Callback, - ): Promise | void { - if (callback) { - this.auth.getProjectId(callback); - return; - } - return this.auth.getProjectId(); - } - - // ------------------- - // -- Service calls -- - // ------------------- - /** - * Translates input queries from source dialects to GoogleSQL. - * - * @param {Object} request - * The request object that will be sent. - * @param {string} request.parent - * Required. The name of the project to which this translation request belongs. - * Example: `projects/foo/locations/bar` - * @param {google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest.SqlTranslationSourceDialect} request.sourceDialect - * Required. The source SQL dialect of `queries`. - * @param {string} request.query - * Required. The query to be translated. - * @param {object} [options] - * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. - * @returns {Promise} - The promise which resolves to an array. - * The first element of the array is an object representing {@link protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse|TranslateQueryResponse}. - * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } - * for more details and examples. - * @example include:samples/generated/v2alpha/sql_translation_service.translate_query.js - * region_tag:bigquerymigration_v2alpha_generated_SqlTranslationService_TranslateQuery_async - */ - translateQuery( - request?: protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest, - options?: CallOptions, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, - ( - | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest - | undefined - ), - {} | undefined, - ] - >; - translateQuery( - request: protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest, - options: CallOptions, - callback: Callback< - protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, - | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - translateQuery( - request: protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest, - callback: Callback< - protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, - | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest - | null - | undefined, - {} | null | undefined - >, - ): void; - translateQuery( - request?: protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest, - optionsOrCallback?: - | CallOptions - | Callback< - protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, - | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest - | null - | undefined, - {} | null | undefined - >, - callback?: Callback< - protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, - | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest - | null - | undefined, - {} | null | undefined - >, - ): Promise< - [ - protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, - ( - | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest - | undefined - ), - {} | undefined, - ] - > | void { - request = request || {}; - let options: CallOptions; - if (typeof optionsOrCallback === 'function' && callback === undefined) { - callback = optionsOrCallback; - options = {}; - } else { - options = optionsOrCallback as CallOptions; - } - options = options || {}; - options.otherArgs = options.otherArgs || {}; - options.otherArgs.headers = options.otherArgs.headers || {}; - options.otherArgs.headers['x-goog-request-params'] = - this._gaxModule.routingHeader.fromParams({ - parent: request.parent ?? '', - }); - this.initialize().catch((err) => { - throw err; - }); - this._log.info('translateQuery request %j', request); - const wrappedCallback: - | Callback< - protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, - | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest - | null - | undefined, - {} | null | undefined - > - | undefined = callback - ? (error, response, options, rawResponse) => { - this._log.info('translateQuery response %j', response); - callback!(error, response, options, rawResponse); // We verified callback above. - } - : undefined; - return this.innerApiCalls - .translateQuery(request, options, wrappedCallback) - ?.then( - ([response, options, rawResponse]: [ - protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse, - ( - | protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryRequest - | undefined - ), - {} | undefined, - ]) => { - this._log.info('translateQuery response %j', response); - return [response, options, rawResponse]; - }, - ) - .catch((error: any) => { - if ( - error && - 'statusDetails' in error && - error.statusDetails instanceof Array - ) { - const protos = this._gaxModule.protobuf.Root.fromJSON( - jsonProtos, - ) as unknown as gax.protobuf.Type; - error.statusDetails = decodeAnyProtosInArray( - error.statusDetails, - protos, - ); - } - throw error; - }); - } - - // -------------------- - // -- Path templates -- - // -------------------- - - /** - * Return a fully-qualified location resource name string. - * - * @param {string} project - * @param {string} location - * @returns {string} Resource name string. - */ - locationPath(project: string, location: string) { - return this.pathTemplates.locationPathTemplate.render({ - project: project, - location: location, - }); - } - - /** - * Parse the project from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the project. - */ - matchProjectFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).project; - } - - /** - * Parse the location from Location resource. - * - * @param {string} locationName - * A fully-qualified path representing Location resource. - * @returns {string} A string representing the location. - */ - matchLocationFromLocationName(locationName: string) { - return this.pathTemplates.locationPathTemplate.match(locationName).location; - } - - /** - * Return a fully-qualified migrationSubtask resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} workflow - * @param {string} subtask - * @returns {string} Resource name string. - */ - migrationSubtaskPath( - project: string, - location: string, - workflow: string, - subtask: string, - ) { - return this.pathTemplates.migrationSubtaskPathTemplate.render({ - project: project, - location: location, - workflow: workflow, - subtask: subtask, - }); - } - - /** - * Parse the project from MigrationSubtask resource. - * - * @param {string} migrationSubtaskName - * A fully-qualified path representing MigrationSubtask resource. - * @returns {string} A string representing the project. - */ - matchProjectFromMigrationSubtaskName(migrationSubtaskName: string) { - return this.pathTemplates.migrationSubtaskPathTemplate.match( - migrationSubtaskName, - ).project; - } - - /** - * Parse the location from MigrationSubtask resource. - * - * @param {string} migrationSubtaskName - * A fully-qualified path representing MigrationSubtask resource. - * @returns {string} A string representing the location. - */ - matchLocationFromMigrationSubtaskName(migrationSubtaskName: string) { - return this.pathTemplates.migrationSubtaskPathTemplate.match( - migrationSubtaskName, - ).location; - } - - /** - * Parse the workflow from MigrationSubtask resource. - * - * @param {string} migrationSubtaskName - * A fully-qualified path representing MigrationSubtask resource. - * @returns {string} A string representing the workflow. - */ - matchWorkflowFromMigrationSubtaskName(migrationSubtaskName: string) { - return this.pathTemplates.migrationSubtaskPathTemplate.match( - migrationSubtaskName, - ).workflow; - } - - /** - * Parse the subtask from MigrationSubtask resource. - * - * @param {string} migrationSubtaskName - * A fully-qualified path representing MigrationSubtask resource. - * @returns {string} A string representing the subtask. - */ - matchSubtaskFromMigrationSubtaskName(migrationSubtaskName: string) { - return this.pathTemplates.migrationSubtaskPathTemplate.match( - migrationSubtaskName, - ).subtask; - } - - /** - * Return a fully-qualified migrationWorkflow resource name string. - * - * @param {string} project - * @param {string} location - * @param {string} workflow - * @returns {string} Resource name string. - */ - migrationWorkflowPath(project: string, location: string, workflow: string) { - return this.pathTemplates.migrationWorkflowPathTemplate.render({ - project: project, - location: location, - workflow: workflow, - }); - } - - /** - * Parse the project from MigrationWorkflow resource. - * - * @param {string} migrationWorkflowName - * A fully-qualified path representing MigrationWorkflow resource. - * @returns {string} A string representing the project. - */ - matchProjectFromMigrationWorkflowName(migrationWorkflowName: string) { - return this.pathTemplates.migrationWorkflowPathTemplate.match( - migrationWorkflowName, - ).project; - } - - /** - * Parse the location from MigrationWorkflow resource. - * - * @param {string} migrationWorkflowName - * A fully-qualified path representing MigrationWorkflow resource. - * @returns {string} A string representing the location. - */ - matchLocationFromMigrationWorkflowName(migrationWorkflowName: string) { - return this.pathTemplates.migrationWorkflowPathTemplate.match( - migrationWorkflowName, - ).location; - } - - /** - * Parse the workflow from MigrationWorkflow resource. - * - * @param {string} migrationWorkflowName - * A fully-qualified path representing MigrationWorkflow resource. - * @returns {string} A string representing the workflow. - */ - matchWorkflowFromMigrationWorkflowName(migrationWorkflowName: string) { - return this.pathTemplates.migrationWorkflowPathTemplate.match( - migrationWorkflowName, - ).workflow; - } - - /** - * Terminate the gRPC channel and close the client. - * - * The client will no longer be usable and all future behavior is undefined. - * @returns {Promise} A promise that resolves when the client is closed. - */ - close(): Promise { - if (this.sqlTranslationServiceStub && !this._terminated) { - return this.sqlTranslationServiceStub.then((stub) => { - this._log.info('ending gRPC channel'); - this._terminated = true; - stub.close(); - }); - } - return Promise.resolve(); - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client_config.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client_config.json deleted file mode 100644 index 8c186d79da31..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_client_config.json +++ /dev/null @@ -1,30 +0,0 @@ -{ - "interfaces": { - "google.cloud.bigquery.migration.v2alpha.SqlTranslationService": { - "retry_codes": { - "non_idempotent": [], - "idempotent": [ - "DEADLINE_EXCEEDED", - "UNAVAILABLE" - ] - }, - "retry_params": { - "default": { - "initial_retry_delay_millis": 100, - "retry_delay_multiplier": 1.3, - "max_retry_delay_millis": 60000, - "initial_rpc_timeout_millis": 60000, - "rpc_timeout_multiplier": 1, - "max_rpc_timeout_millis": 60000, - "total_timeout_millis": 600000 - } - }, - "methods": { - "TranslateQuery": { - "retry_codes_name": "non_idempotent", - "retry_params_name": "default" - } - } - } - } -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_proto_list.json b/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_proto_list.json deleted file mode 100644 index fdbd5988dca7..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/src/v2alpha/sql_translation_service_proto_list.json +++ /dev/null @@ -1,9 +0,0 @@ -[ - "../../protos/google/cloud/bigquery/migration/v2alpha/assessment_task.proto", - "../../protos/google/cloud/bigquery/migration/v2alpha/migration_entities.proto", - "../../protos/google/cloud/bigquery/migration/v2alpha/migration_error_details.proto", - "../../protos/google/cloud/bigquery/migration/v2alpha/migration_metrics.proto", - "../../protos/google/cloud/bigquery/migration/v2alpha/migration_service.proto", - "../../protos/google/cloud/bigquery/migration/v2alpha/translation_service.proto", - "../../protos/google/cloud/bigquery/migration/v2alpha/translation_task.proto" -] diff --git a/owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.js b/owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.js deleted file mode 100644 index 72627c46161f..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.js +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - - -/* eslint-disable node/no-missing-require, no-unused-vars */ -const migration = require('@google-cloud/bigquery-migration'); - -function main() { - const migrationServiceClient = new migration.MigrationServiceClient(); -} - -main(); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.ts b/owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.ts deleted file mode 100644 index 28368e498d74..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/system-test/fixtures/sample/src/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import { MigrationServiceClient } from '@google-cloud/bigquery-migration'; - -// check that the client class type name can be used -function doStuffWithMigrationServiceClient(client: MigrationServiceClient) { - client.close(); -} - -function main() { - // check that the client instance can be created - const migrationServiceClient = new MigrationServiceClient(); - doStuffWithMigrationServiceClient(migrationServiceClient); -} - -main(); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/system-test/install.ts b/owl-bot-staging/google-cloud-bigquery-migration/system-test/install.ts deleted file mode 100644 index ccf167042d2e..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/system-test/install.ts +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import { packNTest } from 'pack-n-play'; -import { readFileSync } from 'fs'; -import { describe, it } from 'mocha'; - -describe('📦 pack-n-play test', () => { - it('TypeScript code', async function () { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'TypeScript user can use the type definitions', - ts: readFileSync( - './system-test/fixtures/sample/src/index.ts', - ).toString(), - }, - }; - await packNTest(options); - }); - - it('JavaScript code', async function () { - this.timeout(300000); - const options = { - packageDir: process.cwd(), - sample: { - description: 'JavaScript user can use the library', - cjs: readFileSync( - './system-test/fixtures/sample/src/index.js', - ).toString(), - }, - }; - await packNTest(options); - }); -}); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2.ts b/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2.ts deleted file mode 100644 index edf3de2058aa..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2.ts +++ /dev/null @@ -1,1929 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import { SinonStub } from 'sinon'; -import { describe, it } from 'mocha'; -import * as migrationserviceModule from '../src'; - -import { PassThrough } from 'stream'; - -import { protobuf } from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON( - require('../protos/protos.json'), -).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = ( - instance.constructor as typeof protobuf.Message - ).toObject(instance as protobuf.Message, { defaults: true }); - return (instance.constructor as typeof protobuf.Message).fromObject( - filledObject, - ) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error - ? sinon.stub().rejects(error) - : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback( - response?: ResponseType, - error?: Error, -) { - return error - ? sinon.stub().callsArgWith(2, error) - : sinon.stub().callsArgWith(2, null, response); -} - -function stubPageStreamingCall( - responses?: ResponseType[], - error?: Error, -) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error - ? sinon.stub().callsArgWith(2, error) - : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { - mockStream.write({}); - }); - } - setImmediate(() => { - mockStream.end(); - }); - } else { - setImmediate(() => { - mockStream.write({}); - }); - setImmediate(() => { - mockStream.end(); - }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall( - responses?: ResponseType[], - error?: Error, -) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({ done: true, value: undefined }); - } - return Promise.resolve({ done: false, value: responses![counter++] }); - }, - }; - }, - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v2.MigrationServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = new migrationserviceModule.v2.MigrationServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'bigquerymigration.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = new migrationserviceModule.v2.MigrationServiceClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, 'googleapis.com'); - }); - - if ( - typeof process === 'object' && - typeof process.emitWarning === 'function' - ) { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = - migrationserviceModule.v2.MigrationServiceClient.servicePath; - assert.strictEqual(servicePath, 'bigquerymigration.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = - migrationserviceModule.v2.MigrationServiceClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'bigquerymigration.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - universeDomain: 'example.com', - }); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'bigquerymigration.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - universe_domain: 'example.com', - }); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'bigquerymigration.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new migrationserviceModule.v2.MigrationServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'bigquerymigration.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = new migrationserviceModule.v2.MigrationServiceClient({ - universeDomain: 'configured.example.com', - }); - const servicePath = client.apiEndpoint; - assert.strictEqual( - servicePath, - 'bigquerymigration.configured.example.com', - ); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { - new migrationserviceModule.v2.MigrationServiceClient({ - universe_domain: 'example.com', - universeDomain: 'example.net', - }); - }); - }); - - it('has port', () => { - const port = migrationserviceModule.v2.MigrationServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = new migrationserviceModule.v2.MigrationServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - assert.strictEqual(client.migrationServiceStub, undefined); - await client.initialize(); - assert(client.migrationServiceStub); - }); - - it('has close method for the initialized client', (done) => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.initialize().catch((err) => { - throw err; - }); - assert(client.migrationServiceStub); - client - .close() - .then(() => { - done(); - }) - .catch((err) => { - throw err; - }); - }); - - it('has close method for the non-initialized client', (done) => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - assert.strictEqual(client.migrationServiceStub, undefined); - client - .close() - .then(() => { - done(); - }) - .catch((err) => { - throw err; - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); - }); - }); - - describe('createMigrationWorkflow', () => { - it('invokes createMigrationWorkflow without error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ); - client.innerApiCalls.createMigrationWorkflow = - stubSimpleCall(expectedResponse); - const [response] = await client.createMigrationWorkflow(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createMigrationWorkflow without error using callback', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ); - client.innerApiCalls.createMigrationWorkflow = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createMigrationWorkflow( - request, - ( - err?: Error | null, - result?: protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow | null, - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }, - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createMigrationWorkflow with error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createMigrationWorkflow = stubSimpleCall( - undefined, - expectedError, - ); - await assert.rejects( - client.createMigrationWorkflow(request), - expectedError, - ); - const actualRequest = ( - client.innerApiCalls.createMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createMigrationWorkflow with closed client', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.CreateMigrationWorkflowRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch((err) => { - throw err; - }); - await assert.rejects( - client.createMigrationWorkflow(request), - expectedError, - ); - }); - }); - - describe('getMigrationWorkflow', () => { - it('invokes getMigrationWorkflow without error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ); - client.innerApiCalls.getMigrationWorkflow = - stubSimpleCall(expectedResponse); - const [response] = await client.getMigrationWorkflow(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMigrationWorkflow without error using callback', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ); - client.innerApiCalls.getMigrationWorkflow = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getMigrationWorkflow( - request, - ( - err?: Error | null, - result?: protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow | null, - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }, - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMigrationWorkflow with error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getMigrationWorkflow = stubSimpleCall( - undefined, - expectedError, - ); - await assert.rejects(client.getMigrationWorkflow(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMigrationWorkflow with closed client', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.GetMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch((err) => { - throw err; - }); - await assert.rejects(client.getMigrationWorkflow(request), expectedError); - }); - }); - - describe('deleteMigrationWorkflow', () => { - it('invokes deleteMigrationWorkflow without error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty(), - ); - client.innerApiCalls.deleteMigrationWorkflow = - stubSimpleCall(expectedResponse); - const [response] = await client.deleteMigrationWorkflow(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteMigrationWorkflow without error using callback', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty(), - ); - client.innerApiCalls.deleteMigrationWorkflow = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteMigrationWorkflow( - request, - ( - err?: Error | null, - result?: protos.google.protobuf.IEmpty | null, - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }, - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteMigrationWorkflow with error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteMigrationWorkflow = stubSimpleCall( - undefined, - expectedError, - ); - await assert.rejects( - client.deleteMigrationWorkflow(request), - expectedError, - ); - const actualRequest = ( - client.innerApiCalls.deleteMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteMigrationWorkflow with closed client', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.DeleteMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch((err) => { - throw err; - }); - await assert.rejects( - client.deleteMigrationWorkflow(request), - expectedError, - ); - }); - }); - - describe('startMigrationWorkflow', () => { - it('invokes startMigrationWorkflow without error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty(), - ); - client.innerApiCalls.startMigrationWorkflow = - stubSimpleCall(expectedResponse); - const [response] = await client.startMigrationWorkflow(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.startMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.startMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes startMigrationWorkflow without error using callback', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty(), - ); - client.innerApiCalls.startMigrationWorkflow = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.startMigrationWorkflow( - request, - ( - err?: Error | null, - result?: protos.google.protobuf.IEmpty | null, - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }, - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.startMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.startMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes startMigrationWorkflow with error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.startMigrationWorkflow = stubSimpleCall( - undefined, - expectedError, - ); - await assert.rejects( - client.startMigrationWorkflow(request), - expectedError, - ); - const actualRequest = ( - client.innerApiCalls.startMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.startMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes startMigrationWorkflow with closed client', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.StartMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch((err) => { - throw err; - }); - await assert.rejects( - client.startMigrationWorkflow(request), - expectedError, - ); - }); - }); - - describe('getMigrationSubtask', () => { - it('invokes getMigrationSubtask without error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), - ); - client.innerApiCalls.getMigrationSubtask = - stubSimpleCall(expectedResponse); - const [response] = await client.getMigrationSubtask(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getMigrationSubtask as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getMigrationSubtask as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMigrationSubtask without error using callback', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), - ); - client.innerApiCalls.getMigrationSubtask = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getMigrationSubtask( - request, - ( - err?: Error | null, - result?: protos.google.cloud.bigquery.migration.v2.IMigrationSubtask | null, - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }, - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getMigrationSubtask as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getMigrationSubtask as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMigrationSubtask with error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getMigrationSubtask = stubSimpleCall( - undefined, - expectedError, - ); - await assert.rejects(client.getMigrationSubtask(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getMigrationSubtask as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getMigrationSubtask as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMigrationSubtask with closed client', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.GetMigrationSubtaskRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch((err) => { - throw err; - }); - await assert.rejects(client.getMigrationSubtask(request), expectedError); - }); - }); - - describe('listMigrationWorkflows', () => { - it('invokes listMigrationWorkflows without error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ), - ]; - client.innerApiCalls.listMigrationWorkflows = - stubSimpleCall(expectedResponse); - const [response] = await client.listMigrationWorkflows(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listMigrationWorkflows as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listMigrationWorkflows as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMigrationWorkflows without error using callback', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ), - ]; - client.innerApiCalls.listMigrationWorkflows = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listMigrationWorkflows( - request, - ( - err?: Error | null, - result?: - | protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow[] - | null, - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }, - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listMigrationWorkflows as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listMigrationWorkflows as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMigrationWorkflows with error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listMigrationWorkflows = stubSimpleCall( - undefined, - expectedError, - ); - await assert.rejects( - client.listMigrationWorkflows(request), - expectedError, - ); - const actualRequest = ( - client.innerApiCalls.listMigrationWorkflows as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listMigrationWorkflows as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMigrationWorkflowsStream without error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ), - ]; - client.descriptors.page.listMigrationWorkflows.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listMigrationWorkflowsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.bigquery.migration.v2.MigrationWorkflow[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.bigquery.migration.v2.MigrationWorkflow, - ) => { - responses.push(response); - }, - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert( - ( - client.descriptors.page.listMigrationWorkflows - .createStream as SinonStub - ) - .getCall(0) - .calledWith(client.innerApiCalls.listMigrationWorkflows, request), - ); - assert( - ( - client.descriptors.page.listMigrationWorkflows - .createStream as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - - it('invokes listMigrationWorkflowsStream with error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listMigrationWorkflows.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listMigrationWorkflowsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.bigquery.migration.v2.MigrationWorkflow[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.bigquery.migration.v2.MigrationWorkflow, - ) => { - responses.push(response); - }, - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - ( - client.descriptors.page.listMigrationWorkflows - .createStream as SinonStub - ) - .getCall(0) - .calledWith(client.innerApiCalls.listMigrationWorkflows, request), - ); - assert( - ( - client.descriptors.page.listMigrationWorkflows - .createStream as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - - it('uses async iteration with listMigrationWorkflows without error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationWorkflow(), - ), - ]; - client.descriptors.page.listMigrationWorkflows.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow[] = - []; - const iterable = client.listMigrationWorkflowsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.listMigrationWorkflows - .asyncIterate as SinonStub - ).getCall(0).args[1], - request, - ); - assert( - ( - client.descriptors.page.listMigrationWorkflows - .asyncIterate as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - - it('uses async iteration with listMigrationWorkflows with error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.ListMigrationWorkflowsRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listMigrationWorkflows.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listMigrationWorkflowsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.bigquery.migration.v2.IMigrationWorkflow[] = - []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.listMigrationWorkflows - .asyncIterate as SinonStub - ).getCall(0).args[1], - request, - ); - assert( - ( - client.descriptors.page.listMigrationWorkflows - .asyncIterate as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - }); - - describe('listMigrationSubtasks', () => { - it('invokes listMigrationSubtasks without error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), - ), - ]; - client.innerApiCalls.listMigrationSubtasks = - stubSimpleCall(expectedResponse); - const [response] = await client.listMigrationSubtasks(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listMigrationSubtasks as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listMigrationSubtasks as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMigrationSubtasks without error using callback', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), - ), - ]; - client.innerApiCalls.listMigrationSubtasks = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listMigrationSubtasks( - request, - ( - err?: Error | null, - result?: - | protos.google.cloud.bigquery.migration.v2.IMigrationSubtask[] - | null, - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }, - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listMigrationSubtasks as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listMigrationSubtasks as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMigrationSubtasks with error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listMigrationSubtasks = stubSimpleCall( - undefined, - expectedError, - ); - await assert.rejects( - client.listMigrationSubtasks(request), - expectedError, - ); - const actualRequest = ( - client.innerApiCalls.listMigrationSubtasks as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listMigrationSubtasks as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMigrationSubtasksStream without error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), - ), - ]; - client.descriptors.page.listMigrationSubtasks.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listMigrationSubtasksStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.bigquery.migration.v2.MigrationSubtask[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.bigquery.migration.v2.MigrationSubtask, - ) => { - responses.push(response); - }, - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert( - ( - client.descriptors.page.listMigrationSubtasks - .createStream as SinonStub - ) - .getCall(0) - .calledWith(client.innerApiCalls.listMigrationSubtasks, request), - ); - assert( - ( - client.descriptors.page.listMigrationSubtasks - .createStream as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - - it('invokes listMigrationSubtasksStream with error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listMigrationSubtasks.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listMigrationSubtasksStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.bigquery.migration.v2.MigrationSubtask[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.bigquery.migration.v2.MigrationSubtask, - ) => { - responses.push(response); - }, - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - ( - client.descriptors.page.listMigrationSubtasks - .createStream as SinonStub - ) - .getCall(0) - .calledWith(client.innerApiCalls.listMigrationSubtasks, request), - ); - assert( - ( - client.descriptors.page.listMigrationSubtasks - .createStream as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - - it('uses async iteration with listMigrationSubtasks without error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.MigrationSubtask(), - ), - ]; - client.descriptors.page.listMigrationSubtasks.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.bigquery.migration.v2.IMigrationSubtask[] = - []; - const iterable = client.listMigrationSubtasksAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.listMigrationSubtasks - .asyncIterate as SinonStub - ).getCall(0).args[1], - request, - ); - assert( - ( - client.descriptors.page.listMigrationSubtasks - .asyncIterate as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - - it('uses async iteration with listMigrationSubtasks with error', async () => { - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2.ListMigrationSubtasksRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listMigrationSubtasks.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listMigrationSubtasksAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.bigquery.migration.v2.IMigrationSubtask[] = - []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.listMigrationSubtasks - .asyncIterate as SinonStub - ).getCall(0).args[1], - request, - ); - assert( - ( - client.descriptors.page.listMigrationSubtasks - .asyncIterate as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - }); - - describe('Path templates', () => { - describe('location', async () => { - const fakePath = '/rendered/path/location'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - }; - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.locationPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.locationPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath('projectValue', 'locationValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters), - ); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - }); - - describe('migrationSubtask', async () => { - const fakePath = '/rendered/path/migrationSubtask'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - workflow: 'workflowValue', - subtask: 'subtaskValue', - }; - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.migrationSubtaskPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.migrationSubtaskPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('migrationSubtaskPath', () => { - const result = client.migrationSubtaskPath( - 'projectValue', - 'locationValue', - 'workflowValue', - 'subtaskValue', - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.migrationSubtaskPathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters), - ); - }); - - it('matchProjectFromMigrationSubtaskName', () => { - const result = client.matchProjectFromMigrationSubtaskName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchLocationFromMigrationSubtaskName', () => { - const result = client.matchLocationFromMigrationSubtaskName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchWorkflowFromMigrationSubtaskName', () => { - const result = client.matchWorkflowFromMigrationSubtaskName(fakePath); - assert.strictEqual(result, 'workflowValue'); - assert( - (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchSubtaskFromMigrationSubtaskName', () => { - const result = client.matchSubtaskFromMigrationSubtaskName(fakePath); - assert.strictEqual(result, 'subtaskValue'); - assert( - (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - }); - - describe('migrationWorkflow', async () => { - const fakePath = '/rendered/path/migrationWorkflow'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - workflow: 'workflowValue', - }; - const client = new migrationserviceModule.v2.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.migrationWorkflowPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.migrationWorkflowPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('migrationWorkflowPath', () => { - const result = client.migrationWorkflowPath( - 'projectValue', - 'locationValue', - 'workflowValue', - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.migrationWorkflowPathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters), - ); - }); - - it('matchProjectFromMigrationWorkflowName', () => { - const result = client.matchProjectFromMigrationWorkflowName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - ( - client.pathTemplates.migrationWorkflowPathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchLocationFromMigrationWorkflowName', () => { - const result = client.matchLocationFromMigrationWorkflowName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - ( - client.pathTemplates.migrationWorkflowPathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchWorkflowFromMigrationWorkflowName', () => { - const result = client.matchWorkflowFromMigrationWorkflowName(fakePath); - assert.strictEqual(result, 'workflowValue'); - assert( - ( - client.pathTemplates.migrationWorkflowPathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath), - ); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2alpha.ts b/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2alpha.ts deleted file mode 100644 index 2e058697e623..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_migration_service_v2alpha.ts +++ /dev/null @@ -1,1934 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import { SinonStub } from 'sinon'; -import { describe, it } from 'mocha'; -import * as migrationserviceModule from '../src'; - -import { PassThrough } from 'stream'; - -import { protobuf } from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON( - require('../protos/protos.json'), -).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = ( - instance.constructor as typeof protobuf.Message - ).toObject(instance as protobuf.Message, { defaults: true }); - return (instance.constructor as typeof protobuf.Message).fromObject( - filledObject, - ) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error - ? sinon.stub().rejects(error) - : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback( - response?: ResponseType, - error?: Error, -) { - return error - ? sinon.stub().callsArgWith(2, error) - : sinon.stub().callsArgWith(2, null, response); -} - -function stubPageStreamingCall( - responses?: ResponseType[], - error?: Error, -) { - const pagingStub = sinon.stub(); - if (responses) { - for (let i = 0; i < responses.length; ++i) { - pagingStub.onCall(i).callsArgWith(2, null, responses[i]); - } - } - const transformStub = error - ? sinon.stub().callsArgWith(2, error) - : pagingStub; - const mockStream = new PassThrough({ - objectMode: true, - transform: transformStub, - }); - // trigger as many responses as needed - if (responses) { - for (let i = 0; i < responses.length; ++i) { - setImmediate(() => { - mockStream.write({}); - }); - } - setImmediate(() => { - mockStream.end(); - }); - } else { - setImmediate(() => { - mockStream.write({}); - }); - setImmediate(() => { - mockStream.end(); - }); - } - return sinon.stub().returns(mockStream); -} - -function stubAsyncIterationCall( - responses?: ResponseType[], - error?: Error, -) { - let counter = 0; - const asyncIterable = { - [Symbol.asyncIterator]() { - return { - async next() { - if (error) { - return Promise.reject(error); - } - if (counter >= responses!.length) { - return Promise.resolve({ done: true, value: undefined }); - } - return Promise.resolve({ done: false, value: responses![counter++] }); - }, - }; - }, - }; - return sinon.stub().returns(asyncIterable); -} - -describe('v2alpha.MigrationServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = - new migrationserviceModule.v2alpha.MigrationServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'bigquerymigration.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = - new migrationserviceModule.v2alpha.MigrationServiceClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, 'googleapis.com'); - }); - - if ( - typeof process === 'object' && - typeof process.emitWarning === 'function' - ) { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = - migrationserviceModule.v2alpha.MigrationServiceClient.servicePath; - assert.strictEqual(servicePath, 'bigquerymigration.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = - migrationserviceModule.v2alpha.MigrationServiceClient.apiEndpoint; - assert.strictEqual(apiEndpoint, 'bigquerymigration.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - universeDomain: 'example.com', - }); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'bigquerymigration.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - universe_domain: 'example.com', - }); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'bigquerymigration.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = - new migrationserviceModule.v2alpha.MigrationServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'bigquerymigration.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = - new migrationserviceModule.v2alpha.MigrationServiceClient({ - universeDomain: 'configured.example.com', - }); - const servicePath = client.apiEndpoint; - assert.strictEqual( - servicePath, - 'bigquerymigration.configured.example.com', - ); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { - new migrationserviceModule.v2alpha.MigrationServiceClient({ - universe_domain: 'example.com', - universeDomain: 'example.net', - }); - }); - }); - - it('has port', () => { - const port = migrationserviceModule.v2alpha.MigrationServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = - new migrationserviceModule.v2alpha.MigrationServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - assert.strictEqual(client.migrationServiceStub, undefined); - await client.initialize(); - assert(client.migrationServiceStub); - }); - - it('has close method for the initialized client', (done) => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.initialize().catch((err) => { - throw err; - }); - assert(client.migrationServiceStub); - client - .close() - .then(() => { - done(); - }) - .catch((err) => { - throw err; - }); - }); - - it('has close method for the non-initialized client', (done) => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - assert.strictEqual(client.migrationServiceStub, undefined); - client - .close() - .then(() => { - done(); - }) - .catch((err) => { - throw err; - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); - }); - }); - - describe('createMigrationWorkflow', () => { - it('invokes createMigrationWorkflow without error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ); - client.innerApiCalls.createMigrationWorkflow = - stubSimpleCall(expectedResponse); - const [response] = await client.createMigrationWorkflow(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createMigrationWorkflow without error using callback', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ); - client.innerApiCalls.createMigrationWorkflow = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.createMigrationWorkflow( - request, - ( - err?: Error | null, - result?: protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow | null, - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }, - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.createMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createMigrationWorkflow with error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.createMigrationWorkflow = stubSimpleCall( - undefined, - expectedError, - ); - await assert.rejects( - client.createMigrationWorkflow(request), - expectedError, - ); - const actualRequest = ( - client.innerApiCalls.createMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.createMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes createMigrationWorkflow with closed client', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.CreateMigrationWorkflowRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch((err) => { - throw err; - }); - await assert.rejects( - client.createMigrationWorkflow(request), - expectedError, - ); - }); - }); - - describe('getMigrationWorkflow', () => { - it('invokes getMigrationWorkflow without error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ); - client.innerApiCalls.getMigrationWorkflow = - stubSimpleCall(expectedResponse); - const [response] = await client.getMigrationWorkflow(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMigrationWorkflow without error using callback', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ); - client.innerApiCalls.getMigrationWorkflow = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getMigrationWorkflow( - request, - ( - err?: Error | null, - result?: protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow | null, - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }, - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMigrationWorkflow with error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getMigrationWorkflow = stubSimpleCall( - undefined, - expectedError, - ); - await assert.rejects(client.getMigrationWorkflow(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMigrationWorkflow with closed client', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.GetMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch((err) => { - throw err; - }); - await assert.rejects(client.getMigrationWorkflow(request), expectedError); - }); - }); - - describe('deleteMigrationWorkflow', () => { - it('invokes deleteMigrationWorkflow without error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty(), - ); - client.innerApiCalls.deleteMigrationWorkflow = - stubSimpleCall(expectedResponse); - const [response] = await client.deleteMigrationWorkflow(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteMigrationWorkflow without error using callback', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty(), - ); - client.innerApiCalls.deleteMigrationWorkflow = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.deleteMigrationWorkflow( - request, - ( - err?: Error | null, - result?: protos.google.protobuf.IEmpty | null, - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }, - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.deleteMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteMigrationWorkflow with error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.deleteMigrationWorkflow = stubSimpleCall( - undefined, - expectedError, - ); - await assert.rejects( - client.deleteMigrationWorkflow(request), - expectedError, - ); - const actualRequest = ( - client.innerApiCalls.deleteMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.deleteMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes deleteMigrationWorkflow with closed client', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.DeleteMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch((err) => { - throw err; - }); - await assert.rejects( - client.deleteMigrationWorkflow(request), - expectedError, - ); - }); - }); - - describe('startMigrationWorkflow', () => { - it('invokes startMigrationWorkflow without error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty(), - ); - client.innerApiCalls.startMigrationWorkflow = - stubSimpleCall(expectedResponse); - const [response] = await client.startMigrationWorkflow(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.startMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.startMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes startMigrationWorkflow without error using callback', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.protobuf.Empty(), - ); - client.innerApiCalls.startMigrationWorkflow = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.startMigrationWorkflow( - request, - ( - err?: Error | null, - result?: protos.google.protobuf.IEmpty | null, - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }, - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.startMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.startMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes startMigrationWorkflow with error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.startMigrationWorkflow = stubSimpleCall( - undefined, - expectedError, - ); - await assert.rejects( - client.startMigrationWorkflow(request), - expectedError, - ); - const actualRequest = ( - client.innerApiCalls.startMigrationWorkflow as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.startMigrationWorkflow as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes startMigrationWorkflow with closed client', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.StartMigrationWorkflowRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch((err) => { - throw err; - }); - await assert.rejects( - client.startMigrationWorkflow(request), - expectedError, - ); - }); - }); - - describe('getMigrationSubtask', () => { - it('invokes getMigrationSubtask without error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), - ); - client.innerApiCalls.getMigrationSubtask = - stubSimpleCall(expectedResponse); - const [response] = await client.getMigrationSubtask(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getMigrationSubtask as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getMigrationSubtask as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMigrationSubtask without error using callback', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), - ); - client.innerApiCalls.getMigrationSubtask = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.getMigrationSubtask( - request, - ( - err?: Error | null, - result?: protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask | null, - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }, - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.getMigrationSubtask as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getMigrationSubtask as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMigrationSubtask with error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedHeaderRequestParams = `name=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.getMigrationSubtask = stubSimpleCall( - undefined, - expectedError, - ); - await assert.rejects(client.getMigrationSubtask(request), expectedError); - const actualRequest = ( - client.innerApiCalls.getMigrationSubtask as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.getMigrationSubtask as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes getMigrationSubtask with closed client', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.GetMigrationSubtaskRequest', - ['name'], - ); - request.name = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch((err) => { - throw err; - }); - await assert.rejects(client.getMigrationSubtask(request), expectedError); - }); - }); - - describe('listMigrationWorkflows', () => { - it('invokes listMigrationWorkflows without error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ), - ]; - client.innerApiCalls.listMigrationWorkflows = - stubSimpleCall(expectedResponse); - const [response] = await client.listMigrationWorkflows(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listMigrationWorkflows as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listMigrationWorkflows as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMigrationWorkflows without error using callback', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ), - ]; - client.innerApiCalls.listMigrationWorkflows = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listMigrationWorkflows( - request, - ( - err?: Error | null, - result?: - | protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[] - | null, - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }, - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listMigrationWorkflows as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listMigrationWorkflows as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMigrationWorkflows with error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listMigrationWorkflows = stubSimpleCall( - undefined, - expectedError, - ); - await assert.rejects( - client.listMigrationWorkflows(request), - expectedError, - ); - const actualRequest = ( - client.innerApiCalls.listMigrationWorkflows as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listMigrationWorkflows as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMigrationWorkflowsStream without error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ), - ]; - client.descriptors.page.listMigrationWorkflows.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listMigrationWorkflowsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow, - ) => { - responses.push(response); - }, - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert( - ( - client.descriptors.page.listMigrationWorkflows - .createStream as SinonStub - ) - .getCall(0) - .calledWith(client.innerApiCalls.listMigrationWorkflows, request), - ); - assert( - ( - client.descriptors.page.listMigrationWorkflows - .createStream as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - - it('invokes listMigrationWorkflowsStream with error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listMigrationWorkflows.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listMigrationWorkflowsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow, - ) => { - responses.push(response); - }, - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - ( - client.descriptors.page.listMigrationWorkflows - .createStream as SinonStub - ) - .getCall(0) - .calledWith(client.innerApiCalls.listMigrationWorkflows, request), - ); - assert( - ( - client.descriptors.page.listMigrationWorkflows - .createStream as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - - it('uses async iteration with listMigrationWorkflows without error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationWorkflow(), - ), - ]; - client.descriptors.page.listMigrationWorkflows.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[] = - []; - const iterable = client.listMigrationWorkflowsAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.listMigrationWorkflows - .asyncIterate as SinonStub - ).getCall(0).args[1], - request, - ); - assert( - ( - client.descriptors.page.listMigrationWorkflows - .asyncIterate as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - - it('uses async iteration with listMigrationWorkflows with error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.ListMigrationWorkflowsRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listMigrationWorkflows.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listMigrationWorkflowsAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.bigquery.migration.v2alpha.IMigrationWorkflow[] = - []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.listMigrationWorkflows - .asyncIterate as SinonStub - ).getCall(0).args[1], - request, - ); - assert( - ( - client.descriptors.page.listMigrationWorkflows - .asyncIterate as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - }); - - describe('listMigrationSubtasks', () => { - it('invokes listMigrationSubtasks without error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), - ), - ]; - client.innerApiCalls.listMigrationSubtasks = - stubSimpleCall(expectedResponse); - const [response] = await client.listMigrationSubtasks(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listMigrationSubtasks as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listMigrationSubtasks as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMigrationSubtasks without error using callback', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), - ), - ]; - client.innerApiCalls.listMigrationSubtasks = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.listMigrationSubtasks( - request, - ( - err?: Error | null, - result?: - | protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[] - | null, - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }, - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.listMigrationSubtasks as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listMigrationSubtasks as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMigrationSubtasks with error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.listMigrationSubtasks = stubSimpleCall( - undefined, - expectedError, - ); - await assert.rejects( - client.listMigrationSubtasks(request), - expectedError, - ); - const actualRequest = ( - client.innerApiCalls.listMigrationSubtasks as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.listMigrationSubtasks as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes listMigrationSubtasksStream without error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), - ), - ]; - client.descriptors.page.listMigrationSubtasks.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listMigrationSubtasksStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask, - ) => { - responses.push(response); - }, - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - const responses = await promise; - assert.deepStrictEqual(responses, expectedResponse); - assert( - ( - client.descriptors.page.listMigrationSubtasks - .createStream as SinonStub - ) - .getCall(0) - .calledWith(client.innerApiCalls.listMigrationSubtasks, request), - ); - assert( - ( - client.descriptors.page.listMigrationSubtasks - .createStream as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - - it('invokes listMigrationSubtasksStream with error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listMigrationSubtasks.createStream = - stubPageStreamingCall(undefined, expectedError); - const stream = client.listMigrationSubtasksStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask, - ) => { - responses.push(response); - }, - ); - stream.on('end', () => { - resolve(responses); - }); - stream.on('error', (err: Error) => { - reject(err); - }); - }); - await assert.rejects(promise, expectedError); - assert( - ( - client.descriptors.page.listMigrationSubtasks - .createStream as SinonStub - ) - .getCall(0) - .calledWith(client.innerApiCalls.listMigrationSubtasks, request), - ); - assert( - ( - client.descriptors.page.listMigrationSubtasks - .createStream as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - - it('uses async iteration with listMigrationSubtasks without error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), - ), - generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.MigrationSubtask(), - ), - ]; - client.descriptors.page.listMigrationSubtasks.asyncIterate = - stubAsyncIterationCall(expectedResponse); - const responses: protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[] = - []; - const iterable = client.listMigrationSubtasksAsync(request); - for await (const resource of iterable) { - responses.push(resource!); - } - assert.deepStrictEqual(responses, expectedResponse); - assert.deepStrictEqual( - ( - client.descriptors.page.listMigrationSubtasks - .asyncIterate as SinonStub - ).getCall(0).args[1], - request, - ); - assert( - ( - client.descriptors.page.listMigrationSubtasks - .asyncIterate as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - - it('uses async iteration with listMigrationSubtasks with error', async () => { - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.ListMigrationSubtasksRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.descriptors.page.listMigrationSubtasks.asyncIterate = - stubAsyncIterationCall(undefined, expectedError); - const iterable = client.listMigrationSubtasksAsync(request); - await assert.rejects(async () => { - const responses: protos.google.cloud.bigquery.migration.v2alpha.IMigrationSubtask[] = - []; - for await (const resource of iterable) { - responses.push(resource!); - } - }); - assert.deepStrictEqual( - ( - client.descriptors.page.listMigrationSubtasks - .asyncIterate as SinonStub - ).getCall(0).args[1], - request, - ); - assert( - ( - client.descriptors.page.listMigrationSubtasks - .asyncIterate as SinonStub - ) - .getCall(0) - .args[2].otherArgs.headers['x-goog-request-params'].includes( - expectedHeaderRequestParams, - ), - ); - }); - }); - - describe('Path templates', () => { - describe('location', async () => { - const fakePath = '/rendered/path/location'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - }; - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.locationPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.locationPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath('projectValue', 'locationValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters), - ); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - }); - - describe('migrationSubtask', async () => { - const fakePath = '/rendered/path/migrationSubtask'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - workflow: 'workflowValue', - subtask: 'subtaskValue', - }; - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.migrationSubtaskPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.migrationSubtaskPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('migrationSubtaskPath', () => { - const result = client.migrationSubtaskPath( - 'projectValue', - 'locationValue', - 'workflowValue', - 'subtaskValue', - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.migrationSubtaskPathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters), - ); - }); - - it('matchProjectFromMigrationSubtaskName', () => { - const result = client.matchProjectFromMigrationSubtaskName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchLocationFromMigrationSubtaskName', () => { - const result = client.matchLocationFromMigrationSubtaskName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchWorkflowFromMigrationSubtaskName', () => { - const result = client.matchWorkflowFromMigrationSubtaskName(fakePath); - assert.strictEqual(result, 'workflowValue'); - assert( - (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchSubtaskFromMigrationSubtaskName', () => { - const result = client.matchSubtaskFromMigrationSubtaskName(fakePath); - assert.strictEqual(result, 'subtaskValue'); - assert( - (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - }); - - describe('migrationWorkflow', async () => { - const fakePath = '/rendered/path/migrationWorkflow'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - workflow: 'workflowValue', - }; - const client = new migrationserviceModule.v2alpha.MigrationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.migrationWorkflowPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.migrationWorkflowPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('migrationWorkflowPath', () => { - const result = client.migrationWorkflowPath( - 'projectValue', - 'locationValue', - 'workflowValue', - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.migrationWorkflowPathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters), - ); - }); - - it('matchProjectFromMigrationWorkflowName', () => { - const result = client.matchProjectFromMigrationWorkflowName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - ( - client.pathTemplates.migrationWorkflowPathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchLocationFromMigrationWorkflowName', () => { - const result = client.matchLocationFromMigrationWorkflowName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - ( - client.pathTemplates.migrationWorkflowPathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchWorkflowFromMigrationWorkflowName', () => { - const result = client.matchWorkflowFromMigrationWorkflowName(fakePath); - assert.strictEqual(result, 'workflowValue'); - assert( - ( - client.pathTemplates.migrationWorkflowPathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath), - ); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_sql_translation_service_v2alpha.ts b/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_sql_translation_service_v2alpha.ts deleted file mode 100644 index 1edcf7e64f1b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/test/gapic_sql_translation_service_v2alpha.ts +++ /dev/null @@ -1,620 +0,0 @@ -// Copyright 2026 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://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. -// -// ** This file is automatically generated by gapic-generator-typescript. ** -// ** https://github.com/googleapis/gapic-generator-typescript ** -// ** All changes to this file may be overwritten. ** - -import * as protos from '../protos/protos'; -import * as assert from 'assert'; -import * as sinon from 'sinon'; -import { SinonStub } from 'sinon'; -import { describe, it } from 'mocha'; -import * as sqltranslationserviceModule from '../src'; - -import { protobuf } from 'google-gax'; - -// Dynamically loaded proto JSON is needed to get the type information -// to fill in default values for request objects -const root = protobuf.Root.fromJSON( - require('../protos/protos.json'), -).resolveAll(); - -// eslint-disable-next-line @typescript-eslint/no-unused-vars -function getTypeDefaultValue(typeName: string, fields: string[]) { - let type = root.lookupType(typeName) as protobuf.Type; - for (const field of fields.slice(0, -1)) { - type = type.fields[field]?.resolvedType as protobuf.Type; - } - return type.fields[fields[fields.length - 1]]?.defaultValue; -} - -function generateSampleMessage(instance: T) { - const filledObject = ( - instance.constructor as typeof protobuf.Message - ).toObject(instance as protobuf.Message, { defaults: true }); - return (instance.constructor as typeof protobuf.Message).fromObject( - filledObject, - ) as T; -} - -function stubSimpleCall(response?: ResponseType, error?: Error) { - return error - ? sinon.stub().rejects(error) - : sinon.stub().resolves([response]); -} - -function stubSimpleCallWithCallback( - response?: ResponseType, - error?: Error, -) { - return error - ? sinon.stub().callsArgWith(2, error) - : sinon.stub().callsArgWith(2, null, response); -} - -describe('v2alpha.SqlTranslationServiceClient', () => { - describe('Common methods', () => { - it('has apiEndpoint', () => { - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient(); - const apiEndpoint = client.apiEndpoint; - assert.strictEqual(apiEndpoint, 'bigquerymigration.googleapis.com'); - }); - - it('has universeDomain', () => { - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient(); - const universeDomain = client.universeDomain; - assert.strictEqual(universeDomain, 'googleapis.com'); - }); - - if ( - typeof process === 'object' && - typeof process.emitWarning === 'function' - ) { - it('throws DeprecationWarning if static servicePath is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const servicePath = - sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient - .servicePath; - assert.strictEqual(servicePath, 'bigquerymigration.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - - it('throws DeprecationWarning if static apiEndpoint is used', () => { - const stub = sinon.stub(process, 'emitWarning'); - const apiEndpoint = - sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient - .apiEndpoint; - assert.strictEqual(apiEndpoint, 'bigquerymigration.googleapis.com'); - assert(stub.called); - stub.restore(); - }); - } - it('sets apiEndpoint according to universe domain camelCase', () => { - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - universeDomain: 'example.com', - }); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'bigquerymigration.example.com'); - }); - - it('sets apiEndpoint according to universe domain snakeCase', () => { - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - universe_domain: 'example.com', - }); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'bigquerymigration.example.com'); - }); - - if (typeof process === 'object' && 'env' in process) { - describe('GOOGLE_CLOUD_UNIVERSE_DOMAIN environment variable', () => { - it('sets apiEndpoint from environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient(); - const servicePath = client.apiEndpoint; - assert.strictEqual(servicePath, 'bigquerymigration.example.com'); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - - it('value configured in code has priority over environment variable', () => { - const saved = process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = 'example.com'; - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient( - { universeDomain: 'configured.example.com' }, - ); - const servicePath = client.apiEndpoint; - assert.strictEqual( - servicePath, - 'bigquerymigration.configured.example.com', - ); - if (saved) { - process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN'] = saved; - } else { - delete process.env['GOOGLE_CLOUD_UNIVERSE_DOMAIN']; - } - }); - }); - } - it('does not allow setting both universeDomain and universe_domain', () => { - assert.throws(() => { - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - universe_domain: 'example.com', - universeDomain: 'example.net', - }); - }); - }); - - it('has port', () => { - const port = - sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient.port; - assert(port); - assert(typeof port === 'number'); - }); - - it('should create a client with no option', () => { - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient(); - assert(client); - }); - - it('should create a client with gRPC fallback', () => { - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - fallback: true, - }); - assert(client); - }); - - it('has initialize method and supports deferred initialization', async () => { - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - assert.strictEqual(client.sqlTranslationServiceStub, undefined); - await client.initialize(); - assert(client.sqlTranslationServiceStub); - }); - - it('has close method for the initialized client', (done) => { - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.initialize().catch((err) => { - throw err; - }); - assert(client.sqlTranslationServiceStub); - client - .close() - .then(() => { - done(); - }) - .catch((err) => { - throw err; - }); - }); - - it('has close method for the non-initialized client', (done) => { - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - assert.strictEqual(client.sqlTranslationServiceStub, undefined); - client - .close() - .then(() => { - done(); - }) - .catch((err) => { - throw err; - }); - }); - - it('has getProjectId method', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon.stub().resolves(fakeProjectId); - const result = await client.getProjectId(); - assert.strictEqual(result, fakeProjectId); - assert((client.auth.getProjectId as SinonStub).calledWithExactly()); - }); - - it('has getProjectId method with callback', async () => { - const fakeProjectId = 'fake-project-id'; - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - client.auth.getProjectId = sinon - .stub() - .callsArgWith(0, null, fakeProjectId); - const promise = new Promise((resolve, reject) => { - client.getProjectId((err?: Error | null, projectId?: string | null) => { - if (err) { - reject(err); - } else { - resolve(projectId); - } - }); - }); - const result = await promise; - assert.strictEqual(result, fakeProjectId); - }); - }); - - describe('translateQuery', () => { - it('invokes translateQuery without error', async () => { - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse(), - ); - client.innerApiCalls.translateQuery = stubSimpleCall(expectedResponse); - const [response] = await client.translateQuery(request); - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.translateQuery as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.translateQuery as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes translateQuery without error using callback', async () => { - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedResponse = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryResponse(), - ); - client.innerApiCalls.translateQuery = - stubSimpleCallWithCallback(expectedResponse); - const promise = new Promise((resolve, reject) => { - client.translateQuery( - request, - ( - err?: Error | null, - result?: protos.google.cloud.bigquery.migration.v2alpha.ITranslateQueryResponse | null, - ) => { - if (err) { - reject(err); - } else { - resolve(result); - } - }, - ); - }); - const response = await promise; - assert.deepStrictEqual(response, expectedResponse); - const actualRequest = ( - client.innerApiCalls.translateQuery as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.translateQuery as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes translateQuery with error', async () => { - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1 ?? ''}`; - const expectedError = new Error('expected'); - client.innerApiCalls.translateQuery = stubSimpleCall( - undefined, - expectedError, - ); - await assert.rejects(client.translateQuery(request), expectedError); - const actualRequest = ( - client.innerApiCalls.translateQuery as SinonStub - ).getCall(0).args[0]; - assert.deepStrictEqual(actualRequest, request); - const actualHeaderRequestParams = ( - client.innerApiCalls.translateQuery as SinonStub - ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; - assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - }); - - it('invokes translateQuery with closed client', async () => { - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest(), - ); - const defaultValue1 = getTypeDefaultValue( - '.google.cloud.bigquery.migration.v2alpha.TranslateQueryRequest', - ['parent'], - ); - request.parent = defaultValue1; - const expectedError = new Error('The client has already been closed.'); - client.close().catch((err) => { - throw err; - }); - await assert.rejects(client.translateQuery(request), expectedError); - }); - }); - - describe('Path templates', () => { - describe('location', async () => { - const fakePath = '/rendered/path/location'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - }; - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.locationPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.locationPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('locationPath', () => { - const result = client.locationPath('projectValue', 'locationValue'); - assert.strictEqual(result, fakePath); - assert( - (client.pathTemplates.locationPathTemplate.render as SinonStub) - .getCall(-1) - .calledWith(expectedParameters), - ); - }); - - it('matchProjectFromLocationName', () => { - const result = client.matchProjectFromLocationName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchLocationFromLocationName', () => { - const result = client.matchLocationFromLocationName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.locationPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - }); - - describe('migrationSubtask', async () => { - const fakePath = '/rendered/path/migrationSubtask'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - workflow: 'workflowValue', - subtask: 'subtaskValue', - }; - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.migrationSubtaskPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.migrationSubtaskPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('migrationSubtaskPath', () => { - const result = client.migrationSubtaskPath( - 'projectValue', - 'locationValue', - 'workflowValue', - 'subtaskValue', - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.migrationSubtaskPathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters), - ); - }); - - it('matchProjectFromMigrationSubtaskName', () => { - const result = client.matchProjectFromMigrationSubtaskName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchLocationFromMigrationSubtaskName', () => { - const result = client.matchLocationFromMigrationSubtaskName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchWorkflowFromMigrationSubtaskName', () => { - const result = client.matchWorkflowFromMigrationSubtaskName(fakePath); - assert.strictEqual(result, 'workflowValue'); - assert( - (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchSubtaskFromMigrationSubtaskName', () => { - const result = client.matchSubtaskFromMigrationSubtaskName(fakePath); - assert.strictEqual(result, 'subtaskValue'); - assert( - (client.pathTemplates.migrationSubtaskPathTemplate.match as SinonStub) - .getCall(-1) - .calledWith(fakePath), - ); - }); - }); - - describe('migrationWorkflow', async () => { - const fakePath = '/rendered/path/migrationWorkflow'; - const expectedParameters = { - project: 'projectValue', - location: 'locationValue', - workflow: 'workflowValue', - }; - const client = - new sqltranslationserviceModule.v2alpha.SqlTranslationServiceClient({ - credentials: { client_email: 'bogus', private_key: 'bogus' }, - projectId: 'bogus', - }); - await client.initialize(); - client.pathTemplates.migrationWorkflowPathTemplate.render = sinon - .stub() - .returns(fakePath); - client.pathTemplates.migrationWorkflowPathTemplate.match = sinon - .stub() - .returns(expectedParameters); - - it('migrationWorkflowPath', () => { - const result = client.migrationWorkflowPath( - 'projectValue', - 'locationValue', - 'workflowValue', - ); - assert.strictEqual(result, fakePath); - assert( - ( - client.pathTemplates.migrationWorkflowPathTemplate - .render as SinonStub - ) - .getCall(-1) - .calledWith(expectedParameters), - ); - }); - - it('matchProjectFromMigrationWorkflowName', () => { - const result = client.matchProjectFromMigrationWorkflowName(fakePath); - assert.strictEqual(result, 'projectValue'); - assert( - ( - client.pathTemplates.migrationWorkflowPathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchLocationFromMigrationWorkflowName', () => { - const result = client.matchLocationFromMigrationWorkflowName(fakePath); - assert.strictEqual(result, 'locationValue'); - assert( - ( - client.pathTemplates.migrationWorkflowPathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath), - ); - }); - - it('matchWorkflowFromMigrationWorkflowName', () => { - const result = client.matchWorkflowFromMigrationWorkflowName(fakePath); - assert.strictEqual(result, 'workflowValue'); - assert( - ( - client.pathTemplates.migrationWorkflowPathTemplate - .match as SinonStub - ) - .getCall(-1) - .calledWith(fakePath), - ); - }); - }); - }); -}); diff --git a/owl-bot-staging/google-cloud-bigquery-migration/tsconfig.json b/owl-bot-staging/google-cloud-bigquery-migration/tsconfig.json deleted file mode 100644 index ca73e7bfc824..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/tsconfig.json +++ /dev/null @@ -1,22 +0,0 @@ -{ - "extends": "./node_modules/gts/tsconfig-google.json", - "compilerOptions": { - "rootDir": ".", - "outDir": "build", - "resolveJsonModule": true, - "lib": [ - "es2023", - "dom" - ] - }, - "include": [ - "src/*.ts", - "src/**/*.ts", - "test/*.ts", - "test/**/*.ts", - "system-test/*.ts", - "src/**/*.json", - "samples/**/*.json", - "protos/protos.json" - ] -} diff --git a/owl-bot-staging/google-cloud-bigquery-migration/webpack.config.js b/owl-bot-staging/google-cloud-bigquery-migration/webpack.config.js deleted file mode 100644 index 9178c4b3e04b..000000000000 --- a/owl-bot-staging/google-cloud-bigquery-migration/webpack.config.js +++ /dev/null @@ -1,64 +0,0 @@ -// Copyright 2021 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 -// -// https://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. - -const path = require('path'); - -module.exports = { - entry: './src/index.ts', - output: { - library: 'MigrationService', - filename: './migration-service.js', - }, - node: { - child_process: 'empty', - fs: 'empty', - crypto: 'empty', - }, - resolve: { - alias: { - '../../../package.json': path.resolve(__dirname, 'package.json'), - }, - extensions: ['.js', '.json', '.ts'], - }, - module: { - rules: [ - { - test: /\.tsx?$/, - use: 'ts-loader', - exclude: /node_modules/ - }, - { - test: /node_modules[\\/]@grpc[\\/]grpc-js/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]grpc/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]retry-request/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]https?-proxy-agent/, - use: 'null-loader' - }, - { - test: /node_modules[\\/]gtoken/, - use: 'null-loader' - }, - ], - }, - mode: 'production', -}; diff --git a/owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/assessment_task.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/assessment_task.proto similarity index 100% rename from owl-bot-staging/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/assessment_task.proto rename to packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/assessment_task.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 cefbe0666c62..775e3d426ee4 100644 --- a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_entities.proto +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_entities.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -18,6 +18,7 @@ package google.cloud.bigquery.migration.v2; import "google/api/field_behavior.proto"; import "google/api/resource.proto"; +import "google/cloud/bigquery/migration/v2/assessment_task.proto"; import "google/cloud/bigquery/migration/v2/migration_error_details.proto"; import "google/cloud/bigquery/migration/v2/migration_metrics.proto"; import "google/cloud/bigquery/migration/v2/translation_config.proto"; @@ -85,11 +86,13 @@ message MigrationWorkflow { // Output only. That status of the workflow. State state = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Time when the workflow was created. - google.protobuf.Timestamp create_time = 4; + // Output only. Time when the workflow was created. + google.protobuf.Timestamp create_time = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Time when the workflow was last updated. - google.protobuf.Timestamp last_update_time = 5; + // Output only. Time when the workflow was last updated. + google.protobuf.Timestamp last_update_time = 5 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // A single task for a migration which has details about the configuration of @@ -109,7 +112,7 @@ message MigrationTask { // The task is running, i.e. its subtasks are ready for execution. RUNNING = 3; - // Tha task is paused. Assigned subtasks can continue, but no new subtasks + // The task is paused. Assigned subtasks can continue, but no new subtasks // will be scheduled. PAUSED = 4; @@ -122,6 +125,9 @@ message MigrationTask { // The details of the task. oneof task_details { + // Task configuration for Assessment. + AssessmentTaskDetails assessment_task_details = 12; + // Task configuration for CW Batch/Offline SQL Translation. TranslationConfigDetails translation_config_details = 14; @@ -136,13 +142,22 @@ message MigrationTask { (google.api.field_behavior) = IMMUTABLE ]; - // The type of the task. This must be one of the supported task types: - // Translation_Teradata2BQ, Translation_Redshift2BQ, Translation_Bteq2BQ, - // Translation_Oracle2BQ, Translation_HiveQL2BQ, Translation_SparkSQL2BQ, - // Translation_Snowflake2BQ, Translation_Netezza2BQ, - // Translation_AzureSynapse2BQ, Translation_Vertica2BQ, - // Translation_SQLServer2BQ, Translation_Presto2BQ, Translation_MySQL2BQ, - // Translation_Postgresql2BQ, Translation_SQLite2BQ, Translation_Greenplum2BQ. + // The type of the task. This must be one of the supported task types. + // + // Assessment: + // + // - `Assessment_Hive` - Assessment for Hive. + // - `Assessment_Redshift` - Assessment for Redshift. + // - `Assessment_Snowflake` - Assessment for Snowflake. + // - `Assessment_Teradata_v2` - Assessment for Teradata. + // - `Assessment_Oracle` - Assessment for Oracle. + // - `Assessment_Hadoop` - Assessment for Hadoop. + // - `Assessment_Informatica` - Assessment for Informatica. + // + // Translation: + // See [Supported Task + // Types](https://docs.cloud.google.com/bigquery/docs/api-sql-translator#supported_task_types) + // for a list of supported task types. string type = 2; // Output only. The current state of the task. @@ -153,11 +168,13 @@ message MigrationTask { google.rpc.ErrorInfo processing_error = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Time when the task was created. - google.protobuf.Timestamp create_time = 6; + // Output only. Time when the task was created. + google.protobuf.Timestamp create_time = 6 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Time when the task was last updated. - google.protobuf.Timestamp last_update_time = 7; + // Output only. Time when the task was last updated. + google.protobuf.Timestamp last_update_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Provides details to errors and issues encountered while // processing the task. Presence of error details does not mean that the task @@ -165,24 +182,28 @@ message MigrationTask { repeated ResourceErrorDetail resource_error_details = 17 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number or resources with errors. Note: This is not the total - // number of errors as each resource can have more than one error. - // This is used to indicate truncation by having a `resource_error_count` - // that is higher than the size of `resource_error_details`. - int32 resource_error_count = 18; + // Output only. The number or resources with errors. Note: This is not the + // total number of errors as each resource can have more than one error. This + // is used to indicate truncation by having a `resource_error_count` that is + // higher than the size of `resource_error_details`. + int32 resource_error_count = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The metrics for the task. - repeated TimeSeries metrics = 19; + // Output only. The metrics for the task. + repeated TimeSeries metrics = 19 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The result of the task. MigrationTaskResult task_result = 20 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Count of all the processing errors in this task and its subtasks. - int32 total_processing_error_count = 21; + // Output only. Count of all the processing errors in this task and its + // subtasks. + int32 total_processing_error_count = 21 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Count of all the resource errors in this task and its subtasks. - int32 total_resource_error_count = 22; + // Output only. Count of all the resource errors in this task and its + // subtasks. + int32 total_resource_error_count = 22 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // A subtask for a migration which carries details about the configuration of @@ -252,20 +273,22 @@ message MigrationSubtask { repeated ResourceErrorDetail resource_error_details = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; - // The number or resources with errors. Note: This is not the total - // number of errors as each resource can have more than one error. - // This is used to indicate truncation by having a `resource_error_count` - // that is higher than the size of `resource_error_details`. - int32 resource_error_count = 13; + // Output only. The number or resources with errors. Note: This is not the + // total number of errors as each resource can have more than one error. This + // is used to indicate truncation by having a `resource_error_count` that is + // higher than the size of `resource_error_details`. + int32 resource_error_count = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Time when the subtask was created. - google.protobuf.Timestamp create_time = 7; + // Output only. Time when the subtask was created. + google.protobuf.Timestamp create_time = 7 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // Time when the subtask was last updated. - google.protobuf.Timestamp last_update_time = 8; + // Output only. Time when the subtask was last updated. + google.protobuf.Timestamp last_update_time = 8 + [(google.api.field_behavior) = OUTPUT_ONLY]; - // The metrics for the subtask. - repeated TimeSeries metrics = 11; + // Output only. The metrics for the subtask. + repeated TimeSeries metrics = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } // The migration task result. @@ -284,4 +307,7 @@ message TranslationTaskResult { // The records from the aggregate CSV report for a migration workflow. repeated GcsReportLogMessage report_log_messages = 2; + + // The Cloud Console URI for the migration workflow. + string console_uri = 3; } diff --git a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto index b40ad642427a..4f7db8c68a06 100644 --- a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_error_details.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto index a2cb52a2ecc9..50b6e9b53632 100644 --- a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_metrics.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto index fa696fa8adbf..53032afd5780 100644 --- a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/migration_service.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto index c6cf897a0b30..82bbfb9b38e8 100644 --- a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_config.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto index 37e5ae3ba1aa..5737556cda17 100644 --- a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_details.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. @@ -47,6 +47,48 @@ message TranslationDetails { // targets will be generated. Some additional target types may be slower to // generate. See the documentation for the set of available target types. repeated string target_types = 5; + + // The configuration for the suggestion if requested as a target type. + SuggestionConfig suggestion_config = 6; +} + +// The configuration for the suggestion if requested as a target type. +message SuggestionConfig { + // The list of suggestion steps to skip. + repeated SuggestionStep skip_suggestion_steps = 1; +} + +// Suggestion step to skip. +message SuggestionStep { + // Suggestion type. + enum SuggestionType { + // Suggestion type unspecified. + SUGGESTION_TYPE_UNSPECIFIED = 0; + + // Query customization. + QUERY_CUSTOMIZATION = 1; + + // Translation explanation. + TRANSLATION_EXPLANATION = 2; + } + + // The target to apply the suggestion to. + enum RewriteTarget { + // Rewrite target unspecified. + REWRITE_TARGET_UNSPECIFIED = 0; + + // Source SQL. + SOURCE_SQL = 1; + + // Target SQL. + TARGET_SQL = 2; + } + + // The type of suggestion. + SuggestionType suggestion_type = 1; + + // The rewrite target. + RewriteTarget rewrite_target = 2; } // Represents one mapping from a source SQL to a target SQL. @@ -67,6 +109,9 @@ message SourceSpec { // Source literal. Literal literal = 2; + + // The path to a single source file in Cloud Storage. + string gcs_file_path = 4; } // Optional. The optional field to specify the encoding of the sql bytes. diff --git a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto index 012ee00fffcb..944a687f64de 100644 --- a/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto +++ b/packages/google-cloud-bigquery-migration/protos/google/cloud/bigquery/migration/v2/translation_usability.proto @@ -1,4 +1,4 @@ -// Copyright 2025 Google LLC +// Copyright 2026 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. diff --git a/packages/google-cloud-bigquery-migration/protos/protos.d.ts b/packages/google-cloud-bigquery-migration/protos/protos.d.ts index 71305b1bd2bb..4d0e9970c82e 100644 --- a/packages/google-cloud-bigquery-migration/protos/protos.d.ts +++ b/packages/google-cloud-bigquery-migration/protos/protos.d.ts @@ -29,6 +29,224 @@ export namespace google { /** Namespace v2. */ namespace v2 { + /** Properties of an AssessmentTaskDetails. */ + interface IAssessmentTaskDetails { + + /** AssessmentTaskDetails inputPath */ + inputPath?: (string|null); + + /** AssessmentTaskDetails outputDataset */ + outputDataset?: (string|null); + + /** AssessmentTaskDetails querylogsPath */ + querylogsPath?: (string|null); + + /** AssessmentTaskDetails dataSource */ + dataSource?: (string|null); + + /** AssessmentTaskDetails featureHandle */ + featureHandle?: (google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null); + } + + /** Represents an AssessmentTaskDetails. */ + class AssessmentTaskDetails implements IAssessmentTaskDetails { + + /** + * Constructs a new AssessmentTaskDetails. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails); + + /** AssessmentTaskDetails inputPath. */ + public inputPath: string; + + /** AssessmentTaskDetails outputDataset. */ + public outputDataset: string; + + /** AssessmentTaskDetails querylogsPath. */ + public querylogsPath: string; + + /** AssessmentTaskDetails dataSource. */ + public dataSource: string; + + /** AssessmentTaskDetails featureHandle. */ + public featureHandle?: (google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null); + + /** + * Creates a new AssessmentTaskDetails instance using the specified properties. + * @param [properties] Properties to set + * @returns AssessmentTaskDetails instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; + + /** + * Encodes the specified AssessmentTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. + * @param message AssessmentTaskDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AssessmentTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. + * @param message AssessmentTaskDetails message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IAssessmentTaskDetails, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AssessmentTaskDetails message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssessmentTaskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; + + /** + * Decodes an AssessmentTaskDetails message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssessmentTaskDetails + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; + + /** + * Verifies an AssessmentTaskDetails message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AssessmentTaskDetails message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssessmentTaskDetails + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.AssessmentTaskDetails; + + /** + * Creates a plain object from an AssessmentTaskDetails message. Also converts values to other types if specified. + * @param message AssessmentTaskDetails + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.AssessmentTaskDetails, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AssessmentTaskDetails to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AssessmentTaskDetails + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AssessmentFeatureHandle. */ + interface IAssessmentFeatureHandle { + + /** AssessmentFeatureHandle addShareableDataset */ + addShareableDataset?: (boolean|null); + } + + /** Represents an AssessmentFeatureHandle. */ + class AssessmentFeatureHandle implements IAssessmentFeatureHandle { + + /** + * Constructs a new AssessmentFeatureHandle. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle); + + /** AssessmentFeatureHandle addShareableDataset. */ + public addShareableDataset?: (boolean|null); + + /** + * Creates a new AssessmentFeatureHandle instance using the specified properties. + * @param [properties] Properties to set + * @returns AssessmentFeatureHandle instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; + + /** + * Encodes the specified AssessmentFeatureHandle message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. + * @param message AssessmentFeatureHandle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AssessmentFeatureHandle message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. + * @param message AssessmentFeatureHandle message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AssessmentFeatureHandle message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssessmentFeatureHandle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; + + /** + * Decodes an AssessmentFeatureHandle message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssessmentFeatureHandle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; + + /** + * Verifies an AssessmentFeatureHandle message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AssessmentFeatureHandle message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssessmentFeatureHandle + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.AssessmentFeatureHandle; + + /** + * Creates a plain object from an AssessmentFeatureHandle message. Also converts values to other types if specified. + * @param message AssessmentFeatureHandle + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.AssessmentFeatureHandle, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AssessmentFeatureHandle to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AssessmentFeatureHandle + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a MigrationWorkflow. */ interface IMigrationWorkflow { @@ -171,6 +389,9 @@ export namespace google { /** Properties of a MigrationTask. */ interface IMigrationTask { + /** MigrationTask assessmentTaskDetails */ + assessmentTaskDetails?: (google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null); + /** MigrationTask translationConfigDetails */ translationConfigDetails?: (google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null); @@ -223,6 +444,9 @@ export namespace google { */ constructor(properties?: google.cloud.bigquery.migration.v2.IMigrationTask); + /** MigrationTask assessmentTaskDetails. */ + public assessmentTaskDetails?: (google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null); + /** MigrationTask translationConfigDetails. */ public translationConfigDetails?: (google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null); @@ -266,7 +490,7 @@ export namespace google { public totalResourceErrorCount: number; /** MigrationTask taskDetails. */ - public taskDetails?: ("translationConfigDetails"|"translationDetails"); + public taskDetails?: ("assessmentTaskDetails"|"translationConfigDetails"|"translationDetails"); /** * Creates a new MigrationTask instance using the specified properties. @@ -633,6 +857,9 @@ export namespace google { /** TranslationTaskResult reportLogMessages */ reportLogMessages?: (google.cloud.bigquery.migration.v2.IGcsReportLogMessage[]|null); + + /** TranslationTaskResult consoleUri */ + consoleUri?: (string|null); } /** Represents a TranslationTaskResult. */ @@ -650,6 +877,9 @@ export namespace google { /** TranslationTaskResult reportLogMessages. */ public reportLogMessages: google.cloud.bigquery.migration.v2.IGcsReportLogMessage[]; + /** TranslationTaskResult consoleUri. */ + public consoleUri: string; + /** * Creates a new TranslationTaskResult instance using the specified properties. * @param [properties] Properties to set @@ -3972,6 +4202,9 @@ export namespace google { /** TranslationDetails targetTypes */ targetTypes?: (string[]|null); + + /** TranslationDetails suggestionConfig */ + suggestionConfig?: (google.cloud.bigquery.migration.v2.ISuggestionConfig|null); } /** Represents a TranslationDetails. */ @@ -3998,6 +4231,9 @@ export namespace google { /** TranslationDetails targetTypes. */ public targetTypes: string[]; + /** TranslationDetails suggestionConfig. */ + public suggestionConfig?: (google.cloud.bigquery.migration.v2.ISuggestionConfig|null); + /** * Creates a new TranslationDetails instance using the specified properties. * @param [properties] Properties to set @@ -4076,6 +4312,223 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a SuggestionConfig. */ + interface ISuggestionConfig { + + /** SuggestionConfig skipSuggestionSteps */ + skipSuggestionSteps?: (google.cloud.bigquery.migration.v2.ISuggestionStep[]|null); + } + + /** Represents a SuggestionConfig. */ + class SuggestionConfig implements ISuggestionConfig { + + /** + * Constructs a new SuggestionConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ISuggestionConfig); + + /** SuggestionConfig skipSuggestionSteps. */ + public skipSuggestionSteps: google.cloud.bigquery.migration.v2.ISuggestionStep[]; + + /** + * Creates a new SuggestionConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestionConfig instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ISuggestionConfig): google.cloud.bigquery.migration.v2.SuggestionConfig; + + /** + * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. + * @param message SuggestionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. + * @param message SuggestionConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISuggestionConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SuggestionConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.SuggestionConfig; + + /** + * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestionConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.SuggestionConfig; + + /** + * Verifies a SuggestionConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SuggestionConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestionConfig + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SuggestionConfig; + + /** + * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. + * @param message SuggestionConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.SuggestionConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SuggestionConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SuggestionConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SuggestionStep. */ + interface ISuggestionStep { + + /** SuggestionStep suggestionType */ + suggestionType?: (google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|null); + + /** SuggestionStep rewriteTarget */ + rewriteTarget?: (google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|null); + } + + /** Represents a SuggestionStep. */ + class SuggestionStep implements ISuggestionStep { + + /** + * Constructs a new SuggestionStep. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.bigquery.migration.v2.ISuggestionStep); + + /** SuggestionStep suggestionType. */ + public suggestionType: (google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType); + + /** SuggestionStep rewriteTarget. */ + public rewriteTarget: (google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|keyof typeof google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget); + + /** + * Creates a new SuggestionStep instance using the specified properties. + * @param [properties] Properties to set + * @returns SuggestionStep instance + */ + public static create(properties?: google.cloud.bigquery.migration.v2.ISuggestionStep): google.cloud.bigquery.migration.v2.SuggestionStep; + + /** + * Encodes the specified SuggestionStep message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. + * @param message SuggestionStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.bigquery.migration.v2.ISuggestionStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SuggestionStep message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. + * @param message SuggestionStep message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.bigquery.migration.v2.ISuggestionStep, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SuggestionStep message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SuggestionStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.bigquery.migration.v2.SuggestionStep; + + /** + * Decodes a SuggestionStep message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SuggestionStep + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.bigquery.migration.v2.SuggestionStep; + + /** + * Verifies a SuggestionStep message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SuggestionStep message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SuggestionStep + */ + public static fromObject(object: { [k: string]: any }): google.cloud.bigquery.migration.v2.SuggestionStep; + + /** + * Creates a plain object from a SuggestionStep message. Also converts values to other types if specified. + * @param message SuggestionStep + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.bigquery.migration.v2.SuggestionStep, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SuggestionStep to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SuggestionStep + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SuggestionStep { + + /** SuggestionType enum. */ + enum SuggestionType { + SUGGESTION_TYPE_UNSPECIFIED = 0, + QUERY_CUSTOMIZATION = 1, + TRANSLATION_EXPLANATION = 2 + } + + /** RewriteTarget enum. */ + enum RewriteTarget { + REWRITE_TARGET_UNSPECIFIED = 0, + SOURCE_SQL = 1, + TARGET_SQL = 2 + } + } + /** Properties of a SourceTargetMapping. */ interface ISourceTargetMapping { @@ -4188,6 +4641,9 @@ export namespace google { /** SourceSpec literal */ literal?: (google.cloud.bigquery.migration.v2.ILiteral|null); + /** SourceSpec gcsFilePath */ + gcsFilePath?: (string|null); + /** SourceSpec encoding */ encoding?: (string|null); } @@ -4207,11 +4663,14 @@ export namespace google { /** SourceSpec literal. */ public literal?: (google.cloud.bigquery.migration.v2.ILiteral|null); + /** SourceSpec gcsFilePath. */ + public gcsFilePath?: (string|null); + /** SourceSpec encoding. */ public encoding: string; /** SourceSpec source. */ - public source?: ("baseUri"|"literal"); + public source?: ("baseUri"|"literal"|"gcsFilePath"); /** * Creates a new SourceSpec instance using the specified properties. diff --git a/packages/google-cloud-bigquery-migration/protos/protos.js b/packages/google-cloud-bigquery-migration/protos/protos.js index 5cfe26d1ff19..2a2bf8e377b6 100644 --- a/packages/google-cloud-bigquery-migration/protos/protos.js +++ b/packages/google-cloud-bigquery-migration/protos/protos.js @@ -75,30 +75,28 @@ */ var v2 = {}; - v2.MigrationWorkflow = (function() { + v2.AssessmentTaskDetails = (function() { /** - * Properties of a MigrationWorkflow. + * Properties of an AssessmentTaskDetails. * @memberof google.cloud.bigquery.migration.v2 - * @interface IMigrationWorkflow - * @property {string|null} [name] MigrationWorkflow name - * @property {string|null} [displayName] MigrationWorkflow displayName - * @property {Object.|null} [tasks] MigrationWorkflow tasks - * @property {google.cloud.bigquery.migration.v2.MigrationWorkflow.State|null} [state] MigrationWorkflow state - * @property {google.protobuf.ITimestamp|null} [createTime] MigrationWorkflow createTime - * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationWorkflow lastUpdateTime + * @interface IAssessmentTaskDetails + * @property {string|null} [inputPath] AssessmentTaskDetails inputPath + * @property {string|null} [outputDataset] AssessmentTaskDetails outputDataset + * @property {string|null} [querylogsPath] AssessmentTaskDetails querylogsPath + * @property {string|null} [dataSource] AssessmentTaskDetails dataSource + * @property {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null} [featureHandle] AssessmentTaskDetails featureHandle */ /** - * Constructs a new MigrationWorkflow. + * Constructs a new AssessmentTaskDetails. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MigrationWorkflow. - * @implements IMigrationWorkflow + * @classdesc Represents an AssessmentTaskDetails. + * @implements IAssessmentTaskDetails * @constructor - * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails=} [properties] Properties to set */ - function MigrationWorkflow(properties) { - this.tasks = {}; + function AssessmentTaskDetails(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -106,169 +104,142 @@ } /** - * MigrationWorkflow name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * AssessmentTaskDetails inputPath. + * @member {string} inputPath + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @instance */ - MigrationWorkflow.prototype.name = ""; + AssessmentTaskDetails.prototype.inputPath = ""; /** - * MigrationWorkflow displayName. - * @member {string} displayName - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * AssessmentTaskDetails outputDataset. + * @member {string} outputDataset + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @instance */ - MigrationWorkflow.prototype.displayName = ""; + AssessmentTaskDetails.prototype.outputDataset = ""; /** - * MigrationWorkflow tasks. - * @member {Object.} tasks - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * AssessmentTaskDetails querylogsPath. + * @member {string} querylogsPath + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @instance */ - MigrationWorkflow.prototype.tasks = $util.emptyObject; + AssessmentTaskDetails.prototype.querylogsPath = ""; /** - * MigrationWorkflow state. - * @member {google.cloud.bigquery.migration.v2.MigrationWorkflow.State} state - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * AssessmentTaskDetails dataSource. + * @member {string} dataSource + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @instance */ - MigrationWorkflow.prototype.state = 0; + AssessmentTaskDetails.prototype.dataSource = ""; /** - * MigrationWorkflow createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * AssessmentTaskDetails featureHandle. + * @member {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle|null|undefined} featureHandle + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @instance */ - MigrationWorkflow.prototype.createTime = null; + AssessmentTaskDetails.prototype.featureHandle = null; - /** - * MigrationWorkflow lastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow - * @instance - */ - MigrationWorkflow.prototype.lastUpdateTime = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AssessmentTaskDetails.prototype, "_featureHandle", { + get: $util.oneOfGetter($oneOfFields = ["featureHandle"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new MigrationWorkflow instance using the specified properties. + * Creates a new AssessmentTaskDetails instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow instance + * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails instance */ - MigrationWorkflow.create = function create(properties) { - return new MigrationWorkflow(properties); + AssessmentTaskDetails.create = function create(properties) { + return new AssessmentTaskDetails(properties); }; /** - * Encodes the specified MigrationWorkflow message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. + * Encodes the specified AssessmentTaskDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails} message AssessmentTaskDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationWorkflow.encode = function encode(message, writer) { + AssessmentTaskDetails.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.tasks != null && Object.hasOwnProperty.call(message, "tasks")) - for (var keys = Object.keys(message.tasks), i = 0; i < keys.length; ++i) { - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); - $root.google.cloud.bigquery.migration.v2.MigrationTask.encode(message.tasks[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); - } - if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.inputPath != null && Object.hasOwnProperty.call(message, "inputPath")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.inputPath); + if (message.outputDataset != null && Object.hasOwnProperty.call(message, "outputDataset")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.outputDataset); + if (message.querylogsPath != null && Object.hasOwnProperty.call(message, "querylogsPath")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.querylogsPath); + if (message.dataSource != null && Object.hasOwnProperty.call(message, "dataSource")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.dataSource); + if (message.featureHandle != null && Object.hasOwnProperty.call(message, "featureHandle")) + $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.encode(message.featureHandle, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified MigrationWorkflow message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. + * Encodes the specified AssessmentTaskDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails} message AssessmentTaskDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationWorkflow.encodeDelimited = function encodeDelimited(message, writer) { + AssessmentTaskDetails.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrationWorkflow message from the specified reader or buffer. + * Decodes an AssessmentTaskDetails message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow + * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationWorkflow.decode = function decode(reader, length, error) { + AssessmentTaskDetails.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationWorkflow(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.name = reader.string(); - break; - } - case 6: { - message.displayName = reader.string(); + message.inputPath = reader.string(); break; } case 2: { - if (message.tasks === $util.emptyObject) - message.tasks = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = null; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = $root.google.cloud.bigquery.migration.v2.MigrationTask.decode(reader, reader.uint32()); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.tasks[key] = value; + message.outputDataset = reader.string(); break; } case 3: { - message.state = reader.int32(); + message.querylogsPath = reader.string(); break; } case 4: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.dataSource = reader.string(); break; } - case 5: { - message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 6: { + message.featureHandle = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.decode(reader, reader.uint32()); break; } default: @@ -280,262 +251,166 @@ }; /** - * Decodes a MigrationWorkflow message from the specified reader or buffer, length delimited. + * Decodes an AssessmentTaskDetails message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow + * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationWorkflow.decodeDelimited = function decodeDelimited(reader) { + AssessmentTaskDetails.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrationWorkflow message. + * Verifies an AssessmentTaskDetails message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrationWorkflow.verify = function verify(message) { + AssessmentTaskDetails.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.tasks != null && message.hasOwnProperty("tasks")) { - if (!$util.isObject(message.tasks)) - return "tasks: object expected"; - var key = Object.keys(message.tasks); - for (var i = 0; i < key.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.MigrationTask.verify(message.tasks[key[i]]); + var properties = {}; + if (message.inputPath != null && message.hasOwnProperty("inputPath")) + if (!$util.isString(message.inputPath)) + return "inputPath: string expected"; + if (message.outputDataset != null && message.hasOwnProperty("outputDataset")) + if (!$util.isString(message.outputDataset)) + return "outputDataset: string expected"; + if (message.querylogsPath != null && message.hasOwnProperty("querylogsPath")) + if (!$util.isString(message.querylogsPath)) + return "querylogsPath: string expected"; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + if (!$util.isString(message.dataSource)) + return "dataSource: string expected"; + if (message.featureHandle != null && message.hasOwnProperty("featureHandle")) { + properties._featureHandle = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify(message.featureHandle); if (error) - return "tasks." + error; - } - } - if (message.state != null && message.hasOwnProperty("state")) - switch (message.state) { - default: - return "state: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; + return "featureHandle." + error; } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); - if (error) - return "lastUpdateTime." + error; } return null; }; /** - * Creates a MigrationWorkflow message from a plain object. Also converts values to their respective internal types. + * Creates an AssessmentTaskDetails message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow + * @returns {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} AssessmentTaskDetails */ - MigrationWorkflow.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationWorkflow) + AssessmentTaskDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails) return object; - var message = new $root.google.cloud.bigquery.migration.v2.MigrationWorkflow(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.tasks) { - if (typeof object.tasks !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.tasks: object expected"); - message.tasks = {}; - for (var keys = Object.keys(object.tasks), i = 0; i < keys.length; ++i) { - if (typeof object.tasks[keys[i]] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.tasks: object expected"); - message.tasks[keys[i]] = $root.google.cloud.bigquery.migration.v2.MigrationTask.fromObject(object.tasks[keys[i]]); - } - } - switch (object.state) { - default: - if (typeof object.state === "number") { - message.state = object.state; - break; - } - break; - case "STATE_UNSPECIFIED": - case 0: - message.state = 0; - break; - case "DRAFT": - case 1: - message.state = 1; - break; - case "RUNNING": - case 2: - message.state = 2; - break; - case "PAUSED": - case 3: - message.state = 3; - break; - case "COMPLETED": - case 4: - message.state = 4; - break; - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.lastUpdateTime != null) { - if (typeof object.lastUpdateTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.lastUpdateTime: object expected"); - message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + var message = new $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails(); + if (object.inputPath != null) + message.inputPath = String(object.inputPath); + if (object.outputDataset != null) + message.outputDataset = String(object.outputDataset); + if (object.querylogsPath != null) + message.querylogsPath = String(object.querylogsPath); + if (object.dataSource != null) + message.dataSource = String(object.dataSource); + if (object.featureHandle != null) { + if (typeof object.featureHandle !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.AssessmentTaskDetails.featureHandle: object expected"); + message.featureHandle = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.fromObject(object.featureHandle); } return message; }; /** - * Creates a plain object from a MigrationWorkflow message. Also converts values to other types if specified. + * Creates a plain object from an AssessmentTaskDetails message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static - * @param {google.cloud.bigquery.migration.v2.MigrationWorkflow} message MigrationWorkflow + * @param {google.cloud.bigquery.migration.v2.AssessmentTaskDetails} message AssessmentTaskDetails * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigrationWorkflow.toObject = function toObject(message, options) { + AssessmentTaskDetails.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.tasks = {}; if (options.defaults) { - object.name = ""; - object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.createTime = null; - object.lastUpdateTime = null; - object.displayName = ""; + object.inputPath = ""; + object.outputDataset = ""; + object.querylogsPath = ""; + object.dataSource = ""; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - var keys2; - if (message.tasks && (keys2 = Object.keys(message.tasks)).length) { - object.tasks = {}; - for (var j = 0; j < keys2.length; ++j) - object.tasks[keys2[j]] = $root.google.cloud.bigquery.migration.v2.MigrationTask.toObject(message.tasks[keys2[j]], options); + if (message.inputPath != null && message.hasOwnProperty("inputPath")) + object.inputPath = message.inputPath; + if (message.outputDataset != null && message.hasOwnProperty("outputDataset")) + object.outputDataset = message.outputDataset; + if (message.querylogsPath != null && message.hasOwnProperty("querylogsPath")) + object.querylogsPath = message.querylogsPath; + if (message.dataSource != null && message.hasOwnProperty("dataSource")) + object.dataSource = message.dataSource; + if (message.featureHandle != null && message.hasOwnProperty("featureHandle")) { + object.featureHandle = $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.toObject(message.featureHandle, options); + if (options.oneofs) + object._featureHandle = "featureHandle"; } - if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.State[message.state] : message.state; - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) - object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; return object; }; /** - * Converts this MigrationWorkflow to JSON. + * Converts this AssessmentTaskDetails to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @instance * @returns {Object.} JSON object */ - MigrationWorkflow.prototype.toJSON = function toJSON() { + AssessmentTaskDetails.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MigrationWorkflow + * Gets the default type url for AssessmentTaskDetails * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @memberof google.cloud.bigquery.migration.v2.AssessmentTaskDetails * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MigrationWorkflow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AssessmentTaskDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationWorkflow"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.AssessmentTaskDetails"; }; - /** - * State enum. - * @name google.cloud.bigquery.migration.v2.MigrationWorkflow.State - * @enum {number} - * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} DRAFT=1 DRAFT value - * @property {number} RUNNING=2 RUNNING value - * @property {number} PAUSED=3 PAUSED value - * @property {number} COMPLETED=4 COMPLETED value - */ - MigrationWorkflow.State = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DRAFT"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "PAUSED"] = 3; - values[valuesById[4] = "COMPLETED"] = 4; - return values; - })(); - - return MigrationWorkflow; + return AssessmentTaskDetails; })(); - v2.MigrationTask = (function() { + v2.AssessmentFeatureHandle = (function() { /** - * Properties of a MigrationTask. + * Properties of an AssessmentFeatureHandle. * @memberof google.cloud.bigquery.migration.v2 - * @interface IMigrationTask - * @property {google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null} [translationConfigDetails] MigrationTask translationConfigDetails - * @property {google.cloud.bigquery.migration.v2.ITranslationDetails|null} [translationDetails] MigrationTask translationDetails - * @property {string|null} [id] MigrationTask id - * @property {string|null} [type] MigrationTask type - * @property {google.cloud.bigquery.migration.v2.MigrationTask.State|null} [state] MigrationTask state - * @property {google.rpc.IErrorInfo|null} [processingError] MigrationTask processingError - * @property {google.protobuf.ITimestamp|null} [createTime] MigrationTask createTime - * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationTask lastUpdateTime - * @property {Array.|null} [resourceErrorDetails] MigrationTask resourceErrorDetails - * @property {number|null} [resourceErrorCount] MigrationTask resourceErrorCount - * @property {Array.|null} [metrics] MigrationTask metrics - * @property {google.cloud.bigquery.migration.v2.IMigrationTaskResult|null} [taskResult] MigrationTask taskResult - * @property {number|null} [totalProcessingErrorCount] MigrationTask totalProcessingErrorCount - * @property {number|null} [totalResourceErrorCount] MigrationTask totalResourceErrorCount + * @interface IAssessmentFeatureHandle + * @property {boolean|null} [addShareableDataset] AssessmentFeatureHandle addShareableDataset */ /** - * Constructs a new MigrationTask. + * Constructs a new AssessmentFeatureHandle. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MigrationTask. - * @implements IMigrationTask + * @classdesc Represents an AssessmentFeatureHandle. + * @implements IAssessmentFeatureHandle * @constructor - * @param {google.cloud.bigquery.migration.v2.IMigrationTask=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle=} [properties] Properties to set */ - function MigrationTask(properties) { - this.resourceErrorDetails = []; - this.metrics = []; + function AssessmentFeatureHandle(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -543,281 +418,395 @@ } /** - * MigrationTask translationConfigDetails. - * @member {google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null|undefined} translationConfigDetails - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * AssessmentFeatureHandle addShareableDataset. + * @member {boolean|null|undefined} addShareableDataset + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle * @instance */ - MigrationTask.prototype.translationConfigDetails = null; + AssessmentFeatureHandle.prototype.addShareableDataset = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + // Virtual OneOf for proto3 optional field + Object.defineProperty(AssessmentFeatureHandle.prototype, "_addShareableDataset", { + get: $util.oneOfGetter($oneOfFields = ["addShareableDataset"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * MigrationTask translationDetails. - * @member {google.cloud.bigquery.migration.v2.ITranslationDetails|null|undefined} translationDetails - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Creates a new AssessmentFeatureHandle instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle instance */ - MigrationTask.prototype.translationDetails = null; + AssessmentFeatureHandle.create = function create(properties) { + return new AssessmentFeatureHandle(properties); + }; /** - * MigrationTask id. - * @member {string} id - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Encodes the specified AssessmentFeatureHandle message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle} message AssessmentFeatureHandle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - MigrationTask.prototype.id = ""; + AssessmentFeatureHandle.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.addShareableDataset != null && Object.hasOwnProperty.call(message, "addShareableDataset")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.addShareableDataset); + return writer; + }; /** - * MigrationTask type. - * @member {string} type - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Encodes the specified AssessmentFeatureHandle message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AssessmentFeatureHandle.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {google.cloud.bigquery.migration.v2.IAssessmentFeatureHandle} message AssessmentFeatureHandle message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - MigrationTask.prototype.type = ""; + AssessmentFeatureHandle.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * MigrationTask state. - * @member {google.cloud.bigquery.migration.v2.MigrationTask.State} state - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Decodes an AssessmentFeatureHandle message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationTask.prototype.state = 0; + AssessmentFeatureHandle.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.addShareableDataset = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * MigrationTask processingError. - * @member {google.rpc.IErrorInfo|null|undefined} processingError - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Decodes an AssessmentFeatureHandle message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationTask.prototype.processingError = null; + AssessmentFeatureHandle.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * MigrationTask createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Verifies an AssessmentFeatureHandle message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrationTask.prototype.createTime = null; + AssessmentFeatureHandle.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.addShareableDataset != null && message.hasOwnProperty("addShareableDataset")) { + properties._addShareableDataset = 1; + if (typeof message.addShareableDataset !== "boolean") + return "addShareableDataset: boolean expected"; + } + return null; + }; /** - * MigrationTask lastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Creates an AssessmentFeatureHandle message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} AssessmentFeatureHandle */ - MigrationTask.prototype.lastUpdateTime = null; + AssessmentFeatureHandle.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.AssessmentFeatureHandle(); + if (object.addShareableDataset != null) + message.addShareableDataset = Boolean(object.addShareableDataset); + return message; + }; /** - * MigrationTask resourceErrorDetails. - * @member {Array.} resourceErrorDetails - * @memberof google.cloud.bigquery.migration.v2.MigrationTask - * @instance + * Creates a plain object from an AssessmentFeatureHandle message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {google.cloud.bigquery.migration.v2.AssessmentFeatureHandle} message AssessmentFeatureHandle + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ - MigrationTask.prototype.resourceErrorDetails = $util.emptyArray; + AssessmentFeatureHandle.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.addShareableDataset != null && message.hasOwnProperty("addShareableDataset")) { + object.addShareableDataset = message.addShareableDataset; + if (options.oneofs) + object._addShareableDataset = "addShareableDataset"; + } + return object; + }; /** - * MigrationTask resourceErrorCount. - * @member {number} resourceErrorCount - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * Converts this AssessmentFeatureHandle to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle * @instance + * @returns {Object.} JSON object */ - MigrationTask.prototype.resourceErrorCount = 0; + AssessmentFeatureHandle.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * MigrationTask metrics. - * @member {Array.} metrics - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * Gets the default type url for AssessmentFeatureHandle + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.AssessmentFeatureHandle + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AssessmentFeatureHandle.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.AssessmentFeatureHandle"; + }; + + return AssessmentFeatureHandle; + })(); + + v2.MigrationWorkflow = (function() { + + /** + * Properties of a MigrationWorkflow. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IMigrationWorkflow + * @property {string|null} [name] MigrationWorkflow name + * @property {string|null} [displayName] MigrationWorkflow displayName + * @property {Object.|null} [tasks] MigrationWorkflow tasks + * @property {google.cloud.bigquery.migration.v2.MigrationWorkflow.State|null} [state] MigrationWorkflow state + * @property {google.protobuf.ITimestamp|null} [createTime] MigrationWorkflow createTime + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationWorkflow lastUpdateTime + */ + + /** + * Constructs a new MigrationWorkflow. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a MigrationWorkflow. + * @implements IMigrationWorkflow + * @constructor + * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow=} [properties] Properties to set + */ + function MigrationWorkflow(properties) { + this.tasks = {}; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MigrationWorkflow name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @instance */ - MigrationTask.prototype.metrics = $util.emptyArray; + MigrationWorkflow.prototype.name = ""; /** - * MigrationTask taskResult. - * @member {google.cloud.bigquery.migration.v2.IMigrationTaskResult|null|undefined} taskResult - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * MigrationWorkflow displayName. + * @member {string} displayName + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @instance */ - MigrationTask.prototype.taskResult = null; + MigrationWorkflow.prototype.displayName = ""; /** - * MigrationTask totalProcessingErrorCount. - * @member {number} totalProcessingErrorCount - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * MigrationWorkflow tasks. + * @member {Object.} tasks + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @instance */ - MigrationTask.prototype.totalProcessingErrorCount = 0; + MigrationWorkflow.prototype.tasks = $util.emptyObject; /** - * MigrationTask totalResourceErrorCount. - * @member {number} totalResourceErrorCount - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * MigrationWorkflow state. + * @member {google.cloud.bigquery.migration.v2.MigrationWorkflow.State} state + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @instance */ - MigrationTask.prototype.totalResourceErrorCount = 0; + MigrationWorkflow.prototype.state = 0; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * MigrationWorkflow createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow + * @instance + */ + MigrationWorkflow.prototype.createTime = null; /** - * MigrationTask taskDetails. - * @member {"translationConfigDetails"|"translationDetails"|undefined} taskDetails - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * MigrationWorkflow lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @instance */ - Object.defineProperty(MigrationTask.prototype, "taskDetails", { - get: $util.oneOfGetter($oneOfFields = ["translationConfigDetails", "translationDetails"]), - set: $util.oneOfSetter($oneOfFields) - }); + MigrationWorkflow.prototype.lastUpdateTime = null; /** - * Creates a new MigrationTask instance using the specified properties. + * Creates a new MigrationWorkflow instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTask=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask instance + * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow instance */ - MigrationTask.create = function create(properties) { - return new MigrationTask(properties); + MigrationWorkflow.create = function create(properties) { + return new MigrationWorkflow(properties); }; /** - * Encodes the specified MigrationTask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. + * Encodes the specified MigrationWorkflow message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTask} message MigrationTask message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationTask.encode = function encode(message, writer) { + MigrationWorkflow.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.tasks != null && Object.hasOwnProperty.call(message, "tasks")) + for (var keys = Object.keys(message.tasks), i = 0; i < keys.length; ++i) { + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]); + $root.google.cloud.bigquery.migration.v2.MigrationTask.encode(message.tasks[keys[i]], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim().ldelim(); + } if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); - if (message.processingError != null && Object.hasOwnProperty.call(message, "processingError")) - $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.state); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.translationConfigDetails != null && Object.hasOwnProperty.call(message, "translationConfigDetails")) - $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.encode(message.translationConfigDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); - if (message.translationDetails != null && Object.hasOwnProperty.call(message, "translationDetails")) - $root.google.cloud.bigquery.migration.v2.TranslationDetails.encode(message.translationDetails, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); - if (message.resourceErrorDetails != null && message.resourceErrorDetails.length) - for (var i = 0; i < message.resourceErrorDetails.length; ++i) - $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.encode(message.resourceErrorDetails[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); - if (message.resourceErrorCount != null && Object.hasOwnProperty.call(message, "resourceErrorCount")) - writer.uint32(/* id 18, wireType 0 =*/144).int32(message.resourceErrorCount); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.cloud.bigquery.migration.v2.TimeSeries.encode(message.metrics[i], writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); - if (message.taskResult != null && Object.hasOwnProperty.call(message, "taskResult")) - $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.encode(message.taskResult, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); - if (message.totalProcessingErrorCount != null && Object.hasOwnProperty.call(message, "totalProcessingErrorCount")) - writer.uint32(/* id 21, wireType 0 =*/168).int32(message.totalProcessingErrorCount); - if (message.totalResourceErrorCount != null && Object.hasOwnProperty.call(message, "totalResourceErrorCount")) - writer.uint32(/* id 22, wireType 0 =*/176).int32(message.totalResourceErrorCount); + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); return writer; }; /** - * Encodes the specified MigrationTask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. + * Encodes the specified MigrationWorkflow message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationWorkflow.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTask} message MigrationTask message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationWorkflow} message MigrationWorkflow message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationTask.encodeDelimited = function encodeDelimited(message, writer) { + MigrationWorkflow.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrationTask message from the specified reader or buffer. + * Decodes a MigrationWorkflow message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask + * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationTask.decode = function decode(reader, length, error) { + MigrationWorkflow.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationTask(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationWorkflow(), key, value; while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 14: { - message.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.decode(reader, reader.uint32()); - break; - } - case 16: { - message.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.decode(reader, reader.uint32()); + case 1: { + message.name = reader.string(); break; } - case 1: { - message.id = reader.string(); + case 6: { + message.displayName = reader.string(); break; } case 2: { - message.type = reader.string(); + if (message.tasks === $util.emptyObject) + message.tasks = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = null; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = $root.google.cloud.bigquery.migration.v2.MigrationTask.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.tasks[key] = value; break; } - case 4: { + case 3: { message.state = reader.int32(); break; } - case 5: { - message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); - break; - } - case 6: { + case 4: { message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 7: { + case 5: { message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 17: { - if (!(message.resourceErrorDetails && message.resourceErrorDetails.length)) - message.resourceErrorDetails = []; - message.resourceErrorDetails.push($root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.decode(reader, reader.uint32())); - break; - } - case 18: { - message.resourceErrorCount = reader.int32(); - break; - } - case 19: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.cloud.bigquery.migration.v2.TimeSeries.decode(reader, reader.uint32())); - break; - } - case 20: { - message.taskResult = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.decode(reader, reader.uint32()); - break; - } - case 21: { - message.totalProcessingErrorCount = reader.int32(); - break; - } - case 22: { - message.totalResourceErrorCount = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -827,57 +816,48 @@ }; /** - * Decodes a MigrationTask message from the specified reader or buffer, length delimited. + * Decodes a MigrationWorkflow message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask + * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationTask.decodeDelimited = function decodeDelimited(reader) { + MigrationWorkflow.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrationTask message. + * Verifies a MigrationWorkflow message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrationTask.verify = function verify(message) { + MigrationWorkflow.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.translationConfigDetails != null && message.hasOwnProperty("translationConfigDetails")) { - properties.taskDetails = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.verify(message.translationConfigDetails); - if (error) - return "translationConfigDetails." + error; - } - } - if (message.translationDetails != null && message.hasOwnProperty("translationDetails")) { - if (properties.taskDetails === 1) - return "taskDetails: multiple values"; - properties.taskDetails = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.TranslationDetails.verify(message.translationDetails); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.tasks != null && message.hasOwnProperty("tasks")) { + if (!$util.isObject(message.tasks)) + return "tasks: object expected"; + var key = Object.keys(message.tasks); + for (var i = 0; i < key.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.MigrationTask.verify(message.tasks[key[i]]); if (error) - return "translationDetails." + error; + return "tasks." + error; } } - if (message.id != null && message.hasOwnProperty("id")) - if (!$util.isString(message.id)) - return "id: string expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; if (message.state != null && message.hasOwnProperty("state")) switch (message.state) { default: @@ -887,15 +867,8 @@ case 2: case 3: case 4: - case 5: - case 6: break; } - if (message.processingError != null && message.hasOwnProperty("processingError")) { - var error = $root.google.rpc.ErrorInfo.verify(message.processingError); - if (error) - return "processingError." + error; - } if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) @@ -906,67 +879,35 @@ if (error) return "lastUpdateTime." + error; } - if (message.resourceErrorDetails != null && message.hasOwnProperty("resourceErrorDetails")) { - if (!Array.isArray(message.resourceErrorDetails)) - return "resourceErrorDetails: array expected"; - for (var i = 0; i < message.resourceErrorDetails.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify(message.resourceErrorDetails[i]); - if (error) - return "resourceErrorDetails." + error; - } - } - if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) - if (!$util.isInteger(message.resourceErrorCount)) - return "resourceErrorCount: integer expected"; - if (message.metrics != null && message.hasOwnProperty("metrics")) { - if (!Array.isArray(message.metrics)) - return "metrics: array expected"; - for (var i = 0; i < message.metrics.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.TimeSeries.verify(message.metrics[i]); - if (error) - return "metrics." + error; - } - } - if (message.taskResult != null && message.hasOwnProperty("taskResult")) { - var error = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.verify(message.taskResult); - if (error) - return "taskResult." + error; - } - if (message.totalProcessingErrorCount != null && message.hasOwnProperty("totalProcessingErrorCount")) - if (!$util.isInteger(message.totalProcessingErrorCount)) - return "totalProcessingErrorCount: integer expected"; - if (message.totalResourceErrorCount != null && message.hasOwnProperty("totalResourceErrorCount")) - if (!$util.isInteger(message.totalResourceErrorCount)) - return "totalResourceErrorCount: integer expected"; return null; }; /** - * Creates a MigrationTask message from a plain object. Also converts values to their respective internal types. + * Creates a MigrationWorkflow message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask + * @returns {google.cloud.bigquery.migration.v2.MigrationWorkflow} MigrationWorkflow */ - MigrationTask.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationTask) + MigrationWorkflow.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationWorkflow) return object; - var message = new $root.google.cloud.bigquery.migration.v2.MigrationTask(); - if (object.translationConfigDetails != null) { - if (typeof object.translationConfigDetails !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.translationConfigDetails: object expected"); - message.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.fromObject(object.translationConfigDetails); - } - if (object.translationDetails != null) { - if (typeof object.translationDetails !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.translationDetails: object expected"); - message.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.fromObject(object.translationDetails); + var message = new $root.google.cloud.bigquery.migration.v2.MigrationWorkflow(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.tasks) { + if (typeof object.tasks !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.tasks: object expected"); + message.tasks = {}; + for (var keys = Object.keys(object.tasks), i = 0; i < keys.length; ++i) { + if (typeof object.tasks[keys[i]] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.tasks: object expected"); + message.tasks[keys[i]] = $root.google.cloud.bigquery.migration.v2.MigrationTask.fromObject(object.tasks[keys[i]]); + } } - if (object.id != null) - message.id = String(object.id); - if (object.type != null) - message.type = String(object.type); switch (object.state) { default: if (typeof object.state === "number") { @@ -978,232 +919,158 @@ case 0: message.state = 0; break; - case "PENDING": + case "DRAFT": case 1: message.state = 1; break; - case "ORCHESTRATING": + case "RUNNING": case 2: message.state = 2; break; - case "RUNNING": + case "PAUSED": case 3: message.state = 3; break; - case "PAUSED": + case "COMPLETED": case 4: message.state = 4; break; - case "SUCCEEDED": - case 5: - message.state = 5; - break; - case "FAILED": - case 6: - message.state = 6; - break; - } - if (object.processingError != null) { - if (typeof object.processingError !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.processingError: object expected"); - message.processingError = $root.google.rpc.ErrorInfo.fromObject(object.processingError); } if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.createTime: object expected"); + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } if (object.lastUpdateTime != null) { if (typeof object.lastUpdateTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.lastUpdateTime: object expected"); + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationWorkflow.lastUpdateTime: object expected"); message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); } - if (object.resourceErrorDetails) { - if (!Array.isArray(object.resourceErrorDetails)) - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.resourceErrorDetails: array expected"); - message.resourceErrorDetails = []; - for (var i = 0; i < object.resourceErrorDetails.length; ++i) { - if (typeof object.resourceErrorDetails[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.resourceErrorDetails: object expected"); - message.resourceErrorDetails[i] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.fromObject(object.resourceErrorDetails[i]); - } - } - if (object.resourceErrorCount != null) - message.resourceErrorCount = object.resourceErrorCount | 0; - if (object.metrics) { - if (!Array.isArray(object.metrics)) - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.metrics: array expected"); - message.metrics = []; - for (var i = 0; i < object.metrics.length; ++i) { - if (typeof object.metrics[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.metrics: object expected"); - message.metrics[i] = $root.google.cloud.bigquery.migration.v2.TimeSeries.fromObject(object.metrics[i]); - } - } - if (object.taskResult != null) { - if (typeof object.taskResult !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.taskResult: object expected"); - message.taskResult = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.fromObject(object.taskResult); - } - if (object.totalProcessingErrorCount != null) - message.totalProcessingErrorCount = object.totalProcessingErrorCount | 0; - if (object.totalResourceErrorCount != null) - message.totalResourceErrorCount = object.totalResourceErrorCount | 0; return message; }; /** - * Creates a plain object from a MigrationTask message. Also converts values to other types if specified. + * Creates a plain object from a MigrationWorkflow message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static - * @param {google.cloud.bigquery.migration.v2.MigrationTask} message MigrationTask + * @param {google.cloud.bigquery.migration.v2.MigrationWorkflow} message MigrationWorkflow * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigrationTask.toObject = function toObject(message, options) { + MigrationWorkflow.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.resourceErrorDetails = []; - object.metrics = []; - } + if (options.objects || options.defaults) + object.tasks = {}; if (options.defaults) { - object.id = ""; - object.type = ""; + object.name = ""; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; - object.processingError = null; object.createTime = null; object.lastUpdateTime = null; - object.resourceErrorCount = 0; - object.taskResult = null; - object.totalProcessingErrorCount = 0; - object.totalResourceErrorCount = 0; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + var keys2; + if (message.tasks && (keys2 = Object.keys(message.tasks)).length) { + object.tasks = {}; + for (var j = 0; j < keys2.length; ++j) + object.tasks[keys2[j]] = $root.google.cloud.bigquery.migration.v2.MigrationTask.toObject(message.tasks[keys2[j]], options); } - if (message.id != null && message.hasOwnProperty("id")) - object.id = message.id; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationTask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationTask.State[message.state] : message.state; - if (message.processingError != null && message.hasOwnProperty("processingError")) - object.processingError = $root.google.rpc.ErrorInfo.toObject(message.processingError, options); + object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationWorkflow.State[message.state] : message.state; if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); - if (message.translationConfigDetails != null && message.hasOwnProperty("translationConfigDetails")) { - object.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.toObject(message.translationConfigDetails, options); - if (options.oneofs) - object.taskDetails = "translationConfigDetails"; - } - if (message.translationDetails != null && message.hasOwnProperty("translationDetails")) { - object.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.toObject(message.translationDetails, options); - if (options.oneofs) - object.taskDetails = "translationDetails"; - } - if (message.resourceErrorDetails && message.resourceErrorDetails.length) { - object.resourceErrorDetails = []; - for (var j = 0; j < message.resourceErrorDetails.length; ++j) - object.resourceErrorDetails[j] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.toObject(message.resourceErrorDetails[j], options); - } - if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) - object.resourceErrorCount = message.resourceErrorCount; - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.cloud.bigquery.migration.v2.TimeSeries.toObject(message.metrics[j], options); - } - if (message.taskResult != null && message.hasOwnProperty("taskResult")) - object.taskResult = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.toObject(message.taskResult, options); - if (message.totalProcessingErrorCount != null && message.hasOwnProperty("totalProcessingErrorCount")) - object.totalProcessingErrorCount = message.totalProcessingErrorCount; - if (message.totalResourceErrorCount != null && message.hasOwnProperty("totalResourceErrorCount")) - object.totalResourceErrorCount = message.totalResourceErrorCount; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; return object; }; /** - * Converts this MigrationTask to JSON. + * Converts this MigrationWorkflow to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @instance * @returns {Object.} JSON object */ - MigrationTask.prototype.toJSON = function toJSON() { + MigrationWorkflow.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MigrationTask + * Gets the default type url for MigrationWorkflow * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @memberof google.cloud.bigquery.migration.v2.MigrationWorkflow * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MigrationTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MigrationWorkflow.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationTask"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationWorkflow"; }; /** * State enum. - * @name google.cloud.bigquery.migration.v2.MigrationTask.State + * @name google.cloud.bigquery.migration.v2.MigrationWorkflow.State * @enum {number} * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} PENDING=1 PENDING value - * @property {number} ORCHESTRATING=2 ORCHESTRATING value - * @property {number} RUNNING=3 RUNNING value - * @property {number} PAUSED=4 PAUSED value - * @property {number} SUCCEEDED=5 SUCCEEDED value - * @property {number} FAILED=6 FAILED value + * @property {number} DRAFT=1 DRAFT value + * @property {number} RUNNING=2 RUNNING value + * @property {number} PAUSED=3 PAUSED value + * @property {number} COMPLETED=4 COMPLETED value */ - MigrationTask.State = (function() { + MigrationWorkflow.State = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PENDING"] = 1; - values[valuesById[2] = "ORCHESTRATING"] = 2; - values[valuesById[3] = "RUNNING"] = 3; - values[valuesById[4] = "PAUSED"] = 4; - values[valuesById[5] = "SUCCEEDED"] = 5; - values[valuesById[6] = "FAILED"] = 6; + values[valuesById[1] = "DRAFT"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "PAUSED"] = 3; + values[valuesById[4] = "COMPLETED"] = 4; return values; })(); - return MigrationTask; + return MigrationWorkflow; })(); - v2.MigrationSubtask = (function() { + v2.MigrationTask = (function() { /** - * Properties of a MigrationSubtask. + * Properties of a MigrationTask. * @memberof google.cloud.bigquery.migration.v2 - * @interface IMigrationSubtask - * @property {string|null} [name] MigrationSubtask name - * @property {string|null} [taskId] MigrationSubtask taskId - * @property {string|null} [type] MigrationSubtask type - * @property {google.cloud.bigquery.migration.v2.MigrationSubtask.State|null} [state] MigrationSubtask state - * @property {google.rpc.IErrorInfo|null} [processingError] MigrationSubtask processingError - * @property {Array.|null} [resourceErrorDetails] MigrationSubtask resourceErrorDetails - * @property {number|null} [resourceErrorCount] MigrationSubtask resourceErrorCount - * @property {google.protobuf.ITimestamp|null} [createTime] MigrationSubtask createTime - * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationSubtask lastUpdateTime - * @property {Array.|null} [metrics] MigrationSubtask metrics + * @interface IMigrationTask + * @property {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null} [assessmentTaskDetails] MigrationTask assessmentTaskDetails + * @property {google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null} [translationConfigDetails] MigrationTask translationConfigDetails + * @property {google.cloud.bigquery.migration.v2.ITranslationDetails|null} [translationDetails] MigrationTask translationDetails + * @property {string|null} [id] MigrationTask id + * @property {string|null} [type] MigrationTask type + * @property {google.cloud.bigquery.migration.v2.MigrationTask.State|null} [state] MigrationTask state + * @property {google.rpc.IErrorInfo|null} [processingError] MigrationTask processingError + * @property {google.protobuf.ITimestamp|null} [createTime] MigrationTask createTime + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationTask lastUpdateTime + * @property {Array.|null} [resourceErrorDetails] MigrationTask resourceErrorDetails + * @property {number|null} [resourceErrorCount] MigrationTask resourceErrorCount + * @property {Array.|null} [metrics] MigrationTask metrics + * @property {google.cloud.bigquery.migration.v2.IMigrationTaskResult|null} [taskResult] MigrationTask taskResult + * @property {number|null} [totalProcessingErrorCount] MigrationTask totalProcessingErrorCount + * @property {number|null} [totalResourceErrorCount] MigrationTask totalResourceErrorCount */ /** - * Constructs a new MigrationSubtask. + * Constructs a new MigrationTask. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MigrationSubtask. - * @implements IMigrationSubtask + * @classdesc Represents a MigrationTask. + * @implements IMigrationTask * @constructor - * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IMigrationTask=} [properties] Properties to set */ - function MigrationSubtask(properties) { + function MigrationTask(properties) { this.resourceErrorDetails = []; this.metrics = []; if (properties) @@ -1213,209 +1080,293 @@ } /** - * MigrationSubtask name. - * @member {string} name - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * MigrationTask assessmentTaskDetails. + * @member {google.cloud.bigquery.migration.v2.IAssessmentTaskDetails|null|undefined} assessmentTaskDetails + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.name = ""; + MigrationTask.prototype.assessmentTaskDetails = null; /** - * MigrationSubtask taskId. - * @member {string} taskId - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * MigrationTask translationConfigDetails. + * @member {google.cloud.bigquery.migration.v2.ITranslationConfigDetails|null|undefined} translationConfigDetails + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.taskId = ""; + MigrationTask.prototype.translationConfigDetails = null; /** - * MigrationSubtask type. + * MigrationTask translationDetails. + * @member {google.cloud.bigquery.migration.v2.ITranslationDetails|null|undefined} translationDetails + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.translationDetails = null; + + /** + * MigrationTask id. + * @member {string} id + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.id = ""; + + /** + * MigrationTask type. * @member {string} type - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.type = ""; + MigrationTask.prototype.type = ""; /** - * MigrationSubtask state. - * @member {google.cloud.bigquery.migration.v2.MigrationSubtask.State} state - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * MigrationTask state. + * @member {google.cloud.bigquery.migration.v2.MigrationTask.State} state + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.state = 0; + MigrationTask.prototype.state = 0; /** - * MigrationSubtask processingError. + * MigrationTask processingError. * @member {google.rpc.IErrorInfo|null|undefined} processingError - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.processingError = null; + MigrationTask.prototype.processingError = null; /** - * MigrationSubtask resourceErrorDetails. + * MigrationTask createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.createTime = null; + + /** + * MigrationTask lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.lastUpdateTime = null; + + /** + * MigrationTask resourceErrorDetails. * @member {Array.} resourceErrorDetails - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.resourceErrorDetails = $util.emptyArray; + MigrationTask.prototype.resourceErrorDetails = $util.emptyArray; /** - * MigrationSubtask resourceErrorCount. + * MigrationTask resourceErrorCount. * @member {number} resourceErrorCount - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.resourceErrorCount = 0; + MigrationTask.prototype.resourceErrorCount = 0; /** - * MigrationSubtask createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * MigrationTask metrics. + * @member {Array.} metrics + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.createTime = null; + MigrationTask.prototype.metrics = $util.emptyArray; /** - * MigrationSubtask lastUpdateTime. - * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * MigrationTask taskResult. + * @member {google.cloud.bigquery.migration.v2.IMigrationTaskResult|null|undefined} taskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.lastUpdateTime = null; + MigrationTask.prototype.taskResult = null; /** - * MigrationSubtask metrics. - * @member {Array.} metrics - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * MigrationTask totalProcessingErrorCount. + * @member {number} totalProcessingErrorCount + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance */ - MigrationSubtask.prototype.metrics = $util.emptyArray; + MigrationTask.prototype.totalProcessingErrorCount = 0; /** - * Creates a new MigrationSubtask instance using the specified properties. + * MigrationTask totalResourceErrorCount. + * @member {number} totalResourceErrorCount + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + MigrationTask.prototype.totalResourceErrorCount = 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * MigrationTask taskDetails. + * @member {"assessmentTaskDetails"|"translationConfigDetails"|"translationDetails"|undefined} taskDetails + * @memberof google.cloud.bigquery.migration.v2.MigrationTask + * @instance + */ + Object.defineProperty(MigrationTask.prototype, "taskDetails", { + get: $util.oneOfGetter($oneOfFields = ["assessmentTaskDetails", "translationConfigDetails", "translationDetails"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new MigrationTask instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask instance + * @param {google.cloud.bigquery.migration.v2.IMigrationTask=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask instance */ - MigrationSubtask.create = function create(properties) { - return new MigrationSubtask(properties); + MigrationTask.create = function create(properties) { + return new MigrationTask(properties); }; /** - * Encodes the specified MigrationSubtask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. + * Encodes the specified MigrationTask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask} message MigrationSubtask message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationTask} message MigrationTask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationSubtask.encode = function encode(message, writer) { + MigrationTask.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.taskId != null && Object.hasOwnProperty.call(message, "taskId")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.id); if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); if (message.state != null && Object.hasOwnProperty.call(message, "state")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.state); if (message.processingError != null && Object.hasOwnProperty.call(message, "processingError")) - $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) - $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.metrics != null && message.metrics.length) - for (var i = 0; i < message.metrics.length; ++i) - $root.google.cloud.bigquery.migration.v2.TimeSeries.encode(message.metrics[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.assessmentTaskDetails != null && Object.hasOwnProperty.call(message, "assessmentTaskDetails")) + $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.encode(message.assessmentTaskDetails, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.translationConfigDetails != null && Object.hasOwnProperty.call(message, "translationConfigDetails")) + $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.encode(message.translationConfigDetails, writer.uint32(/* id 14, wireType 2 =*/114).fork()).ldelim(); + if (message.translationDetails != null && Object.hasOwnProperty.call(message, "translationDetails")) + $root.google.cloud.bigquery.migration.v2.TranslationDetails.encode(message.translationDetails, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); if (message.resourceErrorDetails != null && message.resourceErrorDetails.length) for (var i = 0; i < message.resourceErrorDetails.length; ++i) - $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.encode(message.resourceErrorDetails[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.encode(message.resourceErrorDetails[i], writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.resourceErrorCount != null && Object.hasOwnProperty.call(message, "resourceErrorCount")) - writer.uint32(/* id 13, wireType 0 =*/104).int32(message.resourceErrorCount); + writer.uint32(/* id 18, wireType 0 =*/144).int32(message.resourceErrorCount); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.cloud.bigquery.migration.v2.TimeSeries.encode(message.metrics[i], writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); + if (message.taskResult != null && Object.hasOwnProperty.call(message, "taskResult")) + $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.encode(message.taskResult, writer.uint32(/* id 20, wireType 2 =*/162).fork()).ldelim(); + if (message.totalProcessingErrorCount != null && Object.hasOwnProperty.call(message, "totalProcessingErrorCount")) + writer.uint32(/* id 21, wireType 0 =*/168).int32(message.totalProcessingErrorCount); + if (message.totalResourceErrorCount != null && Object.hasOwnProperty.call(message, "totalResourceErrorCount")) + writer.uint32(/* id 22, wireType 0 =*/176).int32(message.totalResourceErrorCount); return writer; }; /** - * Encodes the specified MigrationSubtask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. + * Encodes the specified MigrationTask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTask.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask} message MigrationSubtask message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationTask} message MigrationTask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationSubtask.encodeDelimited = function encodeDelimited(message, writer) { + MigrationTask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrationSubtask message from the specified reader or buffer. + * Decodes a MigrationTask message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask + * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationSubtask.decode = function decode(reader, length, error) { + MigrationTask.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationSubtask(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationTask(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 12: { + message.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.decode(reader, reader.uint32()); + break; + } + case 14: { + message.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.decode(reader, reader.uint32()); + break; + } + case 16: { + message.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.decode(reader, reader.uint32()); + break; + } case 1: { - message.name = reader.string(); + message.id = reader.string(); break; } case 2: { - message.taskId = reader.string(); + message.type = reader.string(); break; } - case 3: { - message.type = reader.string(); + case 4: { + message.state = reader.int32(); break; } case 5: { - message.state = reader.int32(); + message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); break; } case 6: { - message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 12: { + case 7: { + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 17: { if (!(message.resourceErrorDetails && message.resourceErrorDetails.length)) message.resourceErrorDetails = []; message.resourceErrorDetails.push($root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.decode(reader, reader.uint32())); break; } - case 13: { + case 18: { message.resourceErrorCount = reader.int32(); break; } - case 7: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 19: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.cloud.bigquery.migration.v2.TimeSeries.decode(reader, reader.uint32())); break; } - case 8: { - message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 20: { + message.taskResult = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.decode(reader, reader.uint32()); break; } - case 11: { - if (!(message.metrics && message.metrics.length)) - message.metrics = []; - message.metrics.push($root.google.cloud.bigquery.migration.v2.TimeSeries.decode(reader, reader.uint32())); + case 21: { + message.totalProcessingErrorCount = reader.int32(); + break; + } + case 22: { + message.totalResourceErrorCount = reader.int32(); break; } default: @@ -1427,38 +1378,64 @@ }; /** - * Decodes a MigrationSubtask message from the specified reader or buffer, length delimited. + * Decodes a MigrationTask message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask + * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationSubtask.decodeDelimited = function decodeDelimited(reader) { + MigrationTask.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrationSubtask message. + * Verifies a MigrationTask message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrationSubtask.verify = function verify(message) { + MigrationTask.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.taskId != null && message.hasOwnProperty("taskId")) - if (!$util.isString(message.taskId)) - return "taskId: string expected"; + var properties = {}; + if (message.assessmentTaskDetails != null && message.hasOwnProperty("assessmentTaskDetails")) { + properties.taskDetails = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.verify(message.assessmentTaskDetails); + if (error) + return "assessmentTaskDetails." + error; + } + } + if (message.translationConfigDetails != null && message.hasOwnProperty("translationConfigDetails")) { + if (properties.taskDetails === 1) + return "taskDetails: multiple values"; + properties.taskDetails = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.verify(message.translationConfigDetails); + if (error) + return "translationConfigDetails." + error; + } + } + if (message.translationDetails != null && message.hasOwnProperty("translationDetails")) { + if (properties.taskDetails === 1) + return "taskDetails: multiple values"; + properties.taskDetails = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.TranslationDetails.verify(message.translationDetails); + if (error) + return "translationDetails." + error; + } + } + if (message.id != null && message.hasOwnProperty("id")) + if (!$util.isString(message.id)) + return "id: string expected"; if (message.type != null && message.hasOwnProperty("type")) if (!$util.isString(message.type)) return "type: string expected"; @@ -1480,6 +1457,16 @@ if (error) return "processingError." + error; } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } if (message.resourceErrorDetails != null && message.hasOwnProperty("resourceErrorDetails")) { if (!Array.isArray(message.resourceErrorDetails)) return "resourceErrorDetails: array expected"; @@ -1492,16 +1479,6 @@ if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) if (!$util.isInteger(message.resourceErrorCount)) return "resourceErrorCount: integer expected"; - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); - if (error) - return "lastUpdateTime." + error; - } if (message.metrics != null && message.hasOwnProperty("metrics")) { if (!Array.isArray(message.metrics)) return "metrics: array expected"; @@ -1511,25 +1488,49 @@ return "metrics." + error; } } + if (message.taskResult != null && message.hasOwnProperty("taskResult")) { + var error = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.verify(message.taskResult); + if (error) + return "taskResult." + error; + } + if (message.totalProcessingErrorCount != null && message.hasOwnProperty("totalProcessingErrorCount")) + if (!$util.isInteger(message.totalProcessingErrorCount)) + return "totalProcessingErrorCount: integer expected"; + if (message.totalResourceErrorCount != null && message.hasOwnProperty("totalResourceErrorCount")) + if (!$util.isInteger(message.totalResourceErrorCount)) + return "totalResourceErrorCount: integer expected"; return null; }; /** - * Creates a MigrationSubtask message from a plain object. Also converts values to their respective internal types. + * Creates a MigrationTask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask + * @returns {google.cloud.bigquery.migration.v2.MigrationTask} MigrationTask */ - MigrationSubtask.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationSubtask) + MigrationTask.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationTask) return object; - var message = new $root.google.cloud.bigquery.migration.v2.MigrationSubtask(); - if (object.name != null) - message.name = String(object.name); - if (object.taskId != null) - message.taskId = String(object.taskId); + var message = new $root.google.cloud.bigquery.migration.v2.MigrationTask(); + if (object.assessmentTaskDetails != null) { + if (typeof object.assessmentTaskDetails !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.assessmentTaskDetails: object expected"); + message.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.fromObject(object.assessmentTaskDetails); + } + if (object.translationConfigDetails != null) { + if (typeof object.translationConfigDetails !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.translationConfigDetails: object expected"); + message.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.fromObject(object.translationConfigDetails); + } + if (object.translationDetails != null) { + if (typeof object.translationDetails !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.translationDetails: object expected"); + message.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.fromObject(object.translationDetails); + } + if (object.id != null) + message.id = String(object.id); if (object.type != null) message.type = String(object.type); switch (object.state) { @@ -1543,116 +1544,135 @@ case 0: message.state = 0; break; - case "ACTIVE": + case "PENDING": case 1: message.state = 1; break; - case "RUNNING": + case "ORCHESTRATING": case 2: message.state = 2; break; - case "SUCCEEDED": + case "RUNNING": case 3: message.state = 3; break; - case "FAILED": + case "PAUSED": case 4: message.state = 4; break; - case "PAUSED": + case "SUCCEEDED": case 5: message.state = 5; break; - case "PENDING_DEPENDENCY": + case "FAILED": case 6: message.state = 6; break; } if (object.processingError != null) { if (typeof object.processingError !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.processingError: object expected"); + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.processingError: object expected"); message.processingError = $root.google.rpc.ErrorInfo.fromObject(object.processingError); } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } if (object.resourceErrorDetails) { if (!Array.isArray(object.resourceErrorDetails)) - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.resourceErrorDetails: array expected"); + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.resourceErrorDetails: array expected"); message.resourceErrorDetails = []; for (var i = 0; i < object.resourceErrorDetails.length; ++i) { if (typeof object.resourceErrorDetails[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.resourceErrorDetails: object expected"); + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.resourceErrorDetails: object expected"); message.resourceErrorDetails[i] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.fromObject(object.resourceErrorDetails[i]); } } if (object.resourceErrorCount != null) message.resourceErrorCount = object.resourceErrorCount | 0; - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.lastUpdateTime != null) { - if (typeof object.lastUpdateTime !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.lastUpdateTime: object expected"); - message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); - } if (object.metrics) { if (!Array.isArray(object.metrics)) - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.metrics: array expected"); + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.metrics: array expected"); message.metrics = []; for (var i = 0; i < object.metrics.length; ++i) { if (typeof object.metrics[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.metrics: object expected"); + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.metrics: object expected"); message.metrics[i] = $root.google.cloud.bigquery.migration.v2.TimeSeries.fromObject(object.metrics[i]); } } + if (object.taskResult != null) { + if (typeof object.taskResult !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTask.taskResult: object expected"); + message.taskResult = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.fromObject(object.taskResult); + } + if (object.totalProcessingErrorCount != null) + message.totalProcessingErrorCount = object.totalProcessingErrorCount | 0; + if (object.totalResourceErrorCount != null) + message.totalResourceErrorCount = object.totalResourceErrorCount | 0; return message; }; /** - * Creates a plain object from a MigrationSubtask message. Also converts values to other types if specified. + * Creates a plain object from a MigrationTask message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static - * @param {google.cloud.bigquery.migration.v2.MigrationSubtask} message MigrationSubtask + * @param {google.cloud.bigquery.migration.v2.MigrationTask} message MigrationTask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigrationSubtask.toObject = function toObject(message, options) { + MigrationTask.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) { - object.metrics = []; object.resourceErrorDetails = []; + object.metrics = []; } if (options.defaults) { - object.name = ""; - object.taskId = ""; + object.id = ""; object.type = ""; object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; object.processingError = null; object.createTime = null; object.lastUpdateTime = null; object.resourceErrorCount = 0; + object.taskResult = null; + object.totalProcessingErrorCount = 0; + object.totalResourceErrorCount = 0; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.taskId != null && message.hasOwnProperty("taskId")) - object.taskId = message.taskId; + if (message.id != null && message.hasOwnProperty("id")) + object.id = message.id; if (message.type != null && message.hasOwnProperty("type")) object.type = message.type; if (message.state != null && message.hasOwnProperty("state")) - object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationSubtask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationSubtask.State[message.state] : message.state; + object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationTask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationTask.State[message.state] : message.state; if (message.processingError != null && message.hasOwnProperty("processingError")) object.processingError = $root.google.rpc.ErrorInfo.toObject(message.processingError, options); if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); - if (message.metrics && message.metrics.length) { - object.metrics = []; - for (var j = 0; j < message.metrics.length; ++j) - object.metrics[j] = $root.google.cloud.bigquery.migration.v2.TimeSeries.toObject(message.metrics[j], options); + if (message.assessmentTaskDetails != null && message.hasOwnProperty("assessmentTaskDetails")) { + object.assessmentTaskDetails = $root.google.cloud.bigquery.migration.v2.AssessmentTaskDetails.toObject(message.assessmentTaskDetails, options); + if (options.oneofs) + object.taskDetails = "assessmentTaskDetails"; + } + if (message.translationConfigDetails != null && message.hasOwnProperty("translationConfigDetails")) { + object.translationConfigDetails = $root.google.cloud.bigquery.migration.v2.TranslationConfigDetails.toObject(message.translationConfigDetails, options); + if (options.oneofs) + object.taskDetails = "translationConfigDetails"; + } + if (message.translationDetails != null && message.hasOwnProperty("translationDetails")) { + object.translationDetails = $root.google.cloud.bigquery.migration.v2.TranslationDetails.toObject(message.translationDetails, options); + if (options.oneofs) + object.taskDetails = "translationDetails"; } if (message.resourceErrorDetails && message.resourceErrorDetails.length) { object.resourceErrorDetails = []; @@ -1661,80 +1681,102 @@ } if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) object.resourceErrorCount = message.resourceErrorCount; + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.cloud.bigquery.migration.v2.TimeSeries.toObject(message.metrics[j], options); + } + if (message.taskResult != null && message.hasOwnProperty("taskResult")) + object.taskResult = $root.google.cloud.bigquery.migration.v2.MigrationTaskResult.toObject(message.taskResult, options); + if (message.totalProcessingErrorCount != null && message.hasOwnProperty("totalProcessingErrorCount")) + object.totalProcessingErrorCount = message.totalProcessingErrorCount; + if (message.totalResourceErrorCount != null && message.hasOwnProperty("totalResourceErrorCount")) + object.totalResourceErrorCount = message.totalResourceErrorCount; return object; }; /** - * Converts this MigrationSubtask to JSON. + * Converts this MigrationTask to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @instance * @returns {Object.} JSON object */ - MigrationSubtask.prototype.toJSON = function toJSON() { + MigrationTask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MigrationSubtask + * Gets the default type url for MigrationTask * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @memberof google.cloud.bigquery.migration.v2.MigrationTask * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MigrationSubtask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MigrationTask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationSubtask"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationTask"; }; /** * State enum. - * @name google.cloud.bigquery.migration.v2.MigrationSubtask.State + * @name google.cloud.bigquery.migration.v2.MigrationTask.State * @enum {number} * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value - * @property {number} ACTIVE=1 ACTIVE value - * @property {number} RUNNING=2 RUNNING value - * @property {number} SUCCEEDED=3 SUCCEEDED value - * @property {number} FAILED=4 FAILED value - * @property {number} PAUSED=5 PAUSED value - * @property {number} PENDING_DEPENDENCY=6 PENDING_DEPENDENCY value + * @property {number} PENDING=1 PENDING value + * @property {number} ORCHESTRATING=2 ORCHESTRATING value + * @property {number} RUNNING=3 RUNNING value + * @property {number} PAUSED=4 PAUSED value + * @property {number} SUCCEEDED=5 SUCCEEDED value + * @property {number} FAILED=6 FAILED value */ - MigrationSubtask.State = (function() { + MigrationTask.State = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "ACTIVE"] = 1; - values[valuesById[2] = "RUNNING"] = 2; - values[valuesById[3] = "SUCCEEDED"] = 3; - values[valuesById[4] = "FAILED"] = 4; - values[valuesById[5] = "PAUSED"] = 5; - values[valuesById[6] = "PENDING_DEPENDENCY"] = 6; + values[valuesById[1] = "PENDING"] = 1; + values[valuesById[2] = "ORCHESTRATING"] = 2; + values[valuesById[3] = "RUNNING"] = 3; + values[valuesById[4] = "PAUSED"] = 4; + values[valuesById[5] = "SUCCEEDED"] = 5; + values[valuesById[6] = "FAILED"] = 6; return values; })(); - return MigrationSubtask; + return MigrationTask; })(); - v2.MigrationTaskResult = (function() { + v2.MigrationSubtask = (function() { /** - * Properties of a MigrationTaskResult. + * Properties of a MigrationSubtask. * @memberof google.cloud.bigquery.migration.v2 - * @interface IMigrationTaskResult - * @property {google.cloud.bigquery.migration.v2.ITranslationTaskResult|null} [translationTaskResult] MigrationTaskResult translationTaskResult + * @interface IMigrationSubtask + * @property {string|null} [name] MigrationSubtask name + * @property {string|null} [taskId] MigrationSubtask taskId + * @property {string|null} [type] MigrationSubtask type + * @property {google.cloud.bigquery.migration.v2.MigrationSubtask.State|null} [state] MigrationSubtask state + * @property {google.rpc.IErrorInfo|null} [processingError] MigrationSubtask processingError + * @property {Array.|null} [resourceErrorDetails] MigrationSubtask resourceErrorDetails + * @property {number|null} [resourceErrorCount] MigrationSubtask resourceErrorCount + * @property {google.protobuf.ITimestamp|null} [createTime] MigrationSubtask createTime + * @property {google.protobuf.ITimestamp|null} [lastUpdateTime] MigrationSubtask lastUpdateTime + * @property {Array.|null} [metrics] MigrationSubtask metrics */ /** - * Constructs a new MigrationTaskResult. + * Constructs a new MigrationSubtask. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MigrationTaskResult. - * @implements IMigrationTaskResult + * @classdesc Represents a MigrationSubtask. + * @implements IMigrationSubtask * @constructor - * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask=} [properties] Properties to set */ - function MigrationTaskResult(properties) { + function MigrationSubtask(properties) { + this.resourceErrorDetails = []; + this.metrics = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1742,231 +1784,528 @@ } /** - * MigrationTaskResult translationTaskResult. - * @member {google.cloud.bigquery.migration.v2.ITranslationTaskResult|null|undefined} translationTaskResult - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * MigrationSubtask name. + * @member {string} name + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @instance */ - MigrationTaskResult.prototype.translationTaskResult = null; + MigrationSubtask.prototype.name = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * MigrationSubtask taskId. + * @member {string} taskId + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.taskId = ""; /** - * MigrationTaskResult details. - * @member {"translationTaskResult"|undefined} details - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * MigrationSubtask type. + * @member {string} type + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @instance */ - Object.defineProperty(MigrationTaskResult.prototype, "details", { - get: $util.oneOfGetter($oneOfFields = ["translationTaskResult"]), - set: $util.oneOfSetter($oneOfFields) - }); + MigrationSubtask.prototype.type = ""; /** - * Creates a new MigrationTaskResult instance using the specified properties. + * MigrationSubtask state. + * @member {google.cloud.bigquery.migration.v2.MigrationSubtask.State} state + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.state = 0; + + /** + * MigrationSubtask processingError. + * @member {google.rpc.IErrorInfo|null|undefined} processingError + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.processingError = null; + + /** + * MigrationSubtask resourceErrorDetails. + * @member {Array.} resourceErrorDetails + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.resourceErrorDetails = $util.emptyArray; + + /** + * MigrationSubtask resourceErrorCount. + * @member {number} resourceErrorCount + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.resourceErrorCount = 0; + + /** + * MigrationSubtask createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.createTime = null; + + /** + * MigrationSubtask lastUpdateTime. + * @member {google.protobuf.ITimestamp|null|undefined} lastUpdateTime + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.lastUpdateTime = null; + + /** + * MigrationSubtask metrics. + * @member {Array.} metrics + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + */ + MigrationSubtask.prototype.metrics = $util.emptyArray; + + /** + * Creates a new MigrationSubtask instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult instance + * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask instance */ - MigrationTaskResult.create = function create(properties) { - return new MigrationTaskResult(properties); + MigrationSubtask.create = function create(properties) { + return new MigrationSubtask(properties); }; /** - * Encodes the specified MigrationTaskResult message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTaskResult.verify|verify} messages. + * Encodes the specified MigrationSubtask message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult} message MigrationTaskResult message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask} message MigrationSubtask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationTaskResult.encode = function encode(message, writer) { + MigrationSubtask.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.translationTaskResult != null && Object.hasOwnProperty.call(message, "translationTaskResult")) - $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.encode(message.translationTaskResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.taskId != null && Object.hasOwnProperty.call(message, "taskId")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.taskId); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.type); + if (message.state != null && Object.hasOwnProperty.call(message, "state")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.state); + if (message.processingError != null && Object.hasOwnProperty.call(message, "processingError")) + $root.google.rpc.ErrorInfo.encode(message.processingError, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.lastUpdateTime != null && Object.hasOwnProperty.call(message, "lastUpdateTime")) + $root.google.protobuf.Timestamp.encode(message.lastUpdateTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.metrics != null && message.metrics.length) + for (var i = 0; i < message.metrics.length; ++i) + $root.google.cloud.bigquery.migration.v2.TimeSeries.encode(message.metrics[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.resourceErrorDetails != null && message.resourceErrorDetails.length) + for (var i = 0; i < message.resourceErrorDetails.length; ++i) + $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.encode(message.resourceErrorDetails[i], writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.resourceErrorCount != null && Object.hasOwnProperty.call(message, "resourceErrorCount")) + writer.uint32(/* id 13, wireType 0 =*/104).int32(message.resourceErrorCount); return writer; }; /** - * Encodes the specified MigrationTaskResult message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTaskResult.verify|verify} messages. + * Encodes the specified MigrationSubtask message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationSubtask.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @static - * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult} message MigrationTaskResult message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationSubtask} message MigrationSubtask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MigrationTaskResult.encodeDelimited = function encodeDelimited(message, writer) { + MigrationSubtask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MigrationTaskResult message from the specified reader or buffer. + * Decodes a MigrationSubtask message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult + * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MigrationTaskResult.decode = function decode(reader, length, error) { + MigrationSubtask.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationTaskResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationSubtask(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } case 2: { - message.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.decode(reader, reader.uint32()); + message.taskId = reader.string(); break; } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a MigrationTaskResult message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - MigrationTaskResult.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) + case 3: { + message.type = reader.string(); + break; + } + case 5: { + message.state = reader.int32(); + break; + } + case 6: { + message.processingError = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + if (!(message.resourceErrorDetails && message.resourceErrorDetails.length)) + message.resourceErrorDetails = []; + message.resourceErrorDetails.push($root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.decode(reader, reader.uint32())); + break; + } + case 13: { + message.resourceErrorCount = reader.int32(); + break; + } + case 7: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.lastUpdateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + if (!(message.metrics && message.metrics.length)) + message.metrics = []; + message.metrics.push($root.google.cloud.bigquery.migration.v2.TimeSeries.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MigrationSubtask message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MigrationSubtask.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MigrationTaskResult message. + * Verifies a MigrationSubtask message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MigrationTaskResult.verify = function verify(message) { + MigrationSubtask.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.translationTaskResult != null && message.hasOwnProperty("translationTaskResult")) { - properties.details = 1; - { - var error = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.verify(message.translationTaskResult); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.taskId != null && message.hasOwnProperty("taskId")) + if (!$util.isString(message.taskId)) + return "taskId: string expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.state != null && message.hasOwnProperty("state")) + switch (message.state) { + default: + return "state: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.processingError != null && message.hasOwnProperty("processingError")) { + var error = $root.google.rpc.ErrorInfo.verify(message.processingError); + if (error) + return "processingError." + error; + } + if (message.resourceErrorDetails != null && message.hasOwnProperty("resourceErrorDetails")) { + if (!Array.isArray(message.resourceErrorDetails)) + return "resourceErrorDetails: array expected"; + for (var i = 0; i < message.resourceErrorDetails.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify(message.resourceErrorDetails[i]); if (error) - return "translationTaskResult." + error; + return "resourceErrorDetails." + error; + } + } + if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) + if (!$util.isInteger(message.resourceErrorCount)) + return "resourceErrorCount: integer expected"; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.lastUpdateTime); + if (error) + return "lastUpdateTime." + error; + } + if (message.metrics != null && message.hasOwnProperty("metrics")) { + if (!Array.isArray(message.metrics)) + return "metrics: array expected"; + for (var i = 0; i < message.metrics.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.TimeSeries.verify(message.metrics[i]); + if (error) + return "metrics." + error; } } return null; }; /** - * Creates a MigrationTaskResult message from a plain object. Also converts values to their respective internal types. + * Creates a MigrationSubtask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult + * @returns {google.cloud.bigquery.migration.v2.MigrationSubtask} MigrationSubtask */ - MigrationTaskResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationTaskResult) + MigrationSubtask.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationSubtask) return object; - var message = new $root.google.cloud.bigquery.migration.v2.MigrationTaskResult(); - if (object.translationTaskResult != null) { - if (typeof object.translationTaskResult !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTaskResult.translationTaskResult: object expected"); - message.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.fromObject(object.translationTaskResult); + var message = new $root.google.cloud.bigquery.migration.v2.MigrationSubtask(); + if (object.name != null) + message.name = String(object.name); + if (object.taskId != null) + message.taskId = String(object.taskId); + if (object.type != null) + message.type = String(object.type); + switch (object.state) { + default: + if (typeof object.state === "number") { + message.state = object.state; + break; + } + break; + case "STATE_UNSPECIFIED": + case 0: + message.state = 0; + break; + case "ACTIVE": + case 1: + message.state = 1; + break; + case "RUNNING": + case 2: + message.state = 2; + break; + case "SUCCEEDED": + case 3: + message.state = 3; + break; + case "FAILED": + case 4: + message.state = 4; + break; + case "PAUSED": + case 5: + message.state = 5; + break; + case "PENDING_DEPENDENCY": + case 6: + message.state = 6; + break; + } + if (object.processingError != null) { + if (typeof object.processingError !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.processingError: object expected"); + message.processingError = $root.google.rpc.ErrorInfo.fromObject(object.processingError); + } + if (object.resourceErrorDetails) { + if (!Array.isArray(object.resourceErrorDetails)) + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.resourceErrorDetails: array expected"); + message.resourceErrorDetails = []; + for (var i = 0; i < object.resourceErrorDetails.length; ++i) { + if (typeof object.resourceErrorDetails[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.resourceErrorDetails: object expected"); + message.resourceErrorDetails[i] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.fromObject(object.resourceErrorDetails[i]); + } + } + if (object.resourceErrorCount != null) + message.resourceErrorCount = object.resourceErrorCount | 0; + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.lastUpdateTime != null) { + if (typeof object.lastUpdateTime !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.lastUpdateTime: object expected"); + message.lastUpdateTime = $root.google.protobuf.Timestamp.fromObject(object.lastUpdateTime); + } + if (object.metrics) { + if (!Array.isArray(object.metrics)) + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.metrics: array expected"); + message.metrics = []; + for (var i = 0; i < object.metrics.length; ++i) { + if (typeof object.metrics[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationSubtask.metrics: object expected"); + message.metrics[i] = $root.google.cloud.bigquery.migration.v2.TimeSeries.fromObject(object.metrics[i]); + } } return message; }; /** - * Creates a plain object from a MigrationTaskResult message. Also converts values to other types if specified. + * Creates a plain object from a MigrationSubtask message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask * @static - * @param {google.cloud.bigquery.migration.v2.MigrationTaskResult} message MigrationTaskResult + * @param {google.cloud.bigquery.migration.v2.MigrationSubtask} message MigrationSubtask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MigrationTaskResult.toObject = function toObject(message, options) { + MigrationSubtask.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.translationTaskResult != null && message.hasOwnProperty("translationTaskResult")) { - object.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.toObject(message.translationTaskResult, options); - if (options.oneofs) - object.details = "translationTaskResult"; + if (options.arrays || options.defaults) { + object.metrics = []; + object.resourceErrorDetails = []; } - return object; - }; - - /** - * Converts this MigrationTaskResult to JSON. - * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult - * @instance - * @returns {Object.} JSON object - */ - MigrationTaskResult.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for MigrationTaskResult - * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - MigrationTaskResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { + if (options.defaults) { + object.name = ""; + object.taskId = ""; + object.type = ""; + object.state = options.enums === String ? "STATE_UNSPECIFIED" : 0; + object.processingError = null; + object.createTime = null; + object.lastUpdateTime = null; + object.resourceErrorCount = 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.taskId != null && message.hasOwnProperty("taskId")) + object.taskId = message.taskId; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.state != null && message.hasOwnProperty("state")) + object.state = options.enums === String ? $root.google.cloud.bigquery.migration.v2.MigrationSubtask.State[message.state] === undefined ? message.state : $root.google.cloud.bigquery.migration.v2.MigrationSubtask.State[message.state] : message.state; + if (message.processingError != null && message.hasOwnProperty("processingError")) + object.processingError = $root.google.rpc.ErrorInfo.toObject(message.processingError, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.lastUpdateTime != null && message.hasOwnProperty("lastUpdateTime")) + object.lastUpdateTime = $root.google.protobuf.Timestamp.toObject(message.lastUpdateTime, options); + if (message.metrics && message.metrics.length) { + object.metrics = []; + for (var j = 0; j < message.metrics.length; ++j) + object.metrics[j] = $root.google.cloud.bigquery.migration.v2.TimeSeries.toObject(message.metrics[j], options); + } + if (message.resourceErrorDetails && message.resourceErrorDetails.length) { + object.resourceErrorDetails = []; + for (var j = 0; j < message.resourceErrorDetails.length; ++j) + object.resourceErrorDetails[j] = $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail.toObject(message.resourceErrorDetails[j], options); + } + if (message.resourceErrorCount != null && message.hasOwnProperty("resourceErrorCount")) + object.resourceErrorCount = message.resourceErrorCount; + return object; + }; + + /** + * Converts this MigrationSubtask to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @instance + * @returns {Object.} JSON object + */ + MigrationSubtask.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MigrationSubtask + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.MigrationSubtask + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MigrationSubtask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationTaskResult"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationSubtask"; }; - return MigrationTaskResult; + /** + * State enum. + * @name google.cloud.bigquery.migration.v2.MigrationSubtask.State + * @enum {number} + * @property {number} STATE_UNSPECIFIED=0 STATE_UNSPECIFIED value + * @property {number} ACTIVE=1 ACTIVE value + * @property {number} RUNNING=2 RUNNING value + * @property {number} SUCCEEDED=3 SUCCEEDED value + * @property {number} FAILED=4 FAILED value + * @property {number} PAUSED=5 PAUSED value + * @property {number} PENDING_DEPENDENCY=6 PENDING_DEPENDENCY value + */ + MigrationSubtask.State = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "ACTIVE"] = 1; + values[valuesById[2] = "RUNNING"] = 2; + values[valuesById[3] = "SUCCEEDED"] = 3; + values[valuesById[4] = "FAILED"] = 4; + values[valuesById[5] = "PAUSED"] = 5; + values[valuesById[6] = "PENDING_DEPENDENCY"] = 6; + return values; + })(); + + return MigrationSubtask; })(); - v2.TranslationTaskResult = (function() { + v2.MigrationTaskResult = (function() { /** - * Properties of a TranslationTaskResult. + * Properties of a MigrationTaskResult. * @memberof google.cloud.bigquery.migration.v2 - * @interface ITranslationTaskResult - * @property {Array.|null} [translatedLiterals] TranslationTaskResult translatedLiterals - * @property {Array.|null} [reportLogMessages] TranslationTaskResult reportLogMessages + * @interface IMigrationTaskResult + * @property {google.cloud.bigquery.migration.v2.ITranslationTaskResult|null} [translationTaskResult] MigrationTaskResult translationTaskResult */ /** - * Constructs a new TranslationTaskResult. + * Constructs a new MigrationTaskResult. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TranslationTaskResult. - * @implements ITranslationTaskResult + * @classdesc Represents a MigrationTaskResult. + * @implements IMigrationTaskResult * @constructor - * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult=} [properties] Properties to set */ - function TranslationTaskResult(properties) { - this.translatedLiterals = []; - this.reportLogMessages = []; + function MigrationTaskResult(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1974,97 +2313,91 @@ } /** - * TranslationTaskResult translatedLiterals. - * @member {Array.} translatedLiterals - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * MigrationTaskResult translationTaskResult. + * @member {google.cloud.bigquery.migration.v2.ITranslationTaskResult|null|undefined} translationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @instance */ - TranslationTaskResult.prototype.translatedLiterals = $util.emptyArray; + MigrationTaskResult.prototype.translationTaskResult = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * TranslationTaskResult reportLogMessages. - * @member {Array.} reportLogMessages - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * MigrationTaskResult details. + * @member {"translationTaskResult"|undefined} details + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @instance */ - TranslationTaskResult.prototype.reportLogMessages = $util.emptyArray; + Object.defineProperty(MigrationTaskResult.prototype, "details", { + get: $util.oneOfGetter($oneOfFields = ["translationTaskResult"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new TranslationTaskResult instance using the specified properties. + * Creates a new MigrationTaskResult instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult instance + * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult instance */ - TranslationTaskResult.create = function create(properties) { - return new TranslationTaskResult(properties); + MigrationTaskResult.create = function create(properties) { + return new MigrationTaskResult(properties); }; /** - * Encodes the specified TranslationTaskResult message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationTaskResult.verify|verify} messages. + * Encodes the specified MigrationTaskResult message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTaskResult.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult} message TranslationTaskResult message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult} message MigrationTaskResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationTaskResult.encode = function encode(message, writer) { + MigrationTaskResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.translatedLiterals != null && message.translatedLiterals.length) - for (var i = 0; i < message.translatedLiterals.length; ++i) - $root.google.cloud.bigquery.migration.v2.Literal.encode(message.translatedLiterals[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.reportLogMessages != null && message.reportLogMessages.length) - for (var i = 0; i < message.reportLogMessages.length; ++i) - $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.encode(message.reportLogMessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.translationTaskResult != null && Object.hasOwnProperty.call(message, "translationTaskResult")) + $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.encode(message.translationTaskResult, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified TranslationTaskResult message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationTaskResult.verify|verify} messages. + * Encodes the specified MigrationTaskResult message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MigrationTaskResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult} message TranslationTaskResult message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMigrationTaskResult} message MigrationTaskResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationTaskResult.encodeDelimited = function encodeDelimited(message, writer) { + MigrationTaskResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TranslationTaskResult message from the specified reader or buffer. + * Decodes a MigrationTaskResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult + * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationTaskResult.decode = function decode(reader, length, error) { + MigrationTaskResult.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationTaskResult(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MigrationTaskResult(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - if (!(message.translatedLiterals && message.translatedLiterals.length)) - message.translatedLiterals = []; - message.translatedLiterals.push($root.google.cloud.bigquery.migration.v2.Literal.decode(reader, reader.uint32())); - break; - } case 2: { - if (!(message.reportLogMessages && message.reportLogMessages.length)) - message.reportLogMessages = []; - message.reportLogMessages.push($root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.decode(reader, reader.uint32())); + message.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.decode(reader, reader.uint32()); break; } default: @@ -2076,168 +2409,136 @@ }; /** - * Decodes a TranslationTaskResult message from the specified reader or buffer, length delimited. + * Decodes a MigrationTaskResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult + * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationTaskResult.decodeDelimited = function decodeDelimited(reader) { + MigrationTaskResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TranslationTaskResult message. + * Verifies a MigrationTaskResult message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TranslationTaskResult.verify = function verify(message) { + MigrationTaskResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.translatedLiterals != null && message.hasOwnProperty("translatedLiterals")) { - if (!Array.isArray(message.translatedLiterals)) - return "translatedLiterals: array expected"; - for (var i = 0; i < message.translatedLiterals.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.Literal.verify(message.translatedLiterals[i]); - if (error) - return "translatedLiterals." + error; - } - } - if (message.reportLogMessages != null && message.hasOwnProperty("reportLogMessages")) { - if (!Array.isArray(message.reportLogMessages)) - return "reportLogMessages: array expected"; - for (var i = 0; i < message.reportLogMessages.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.verify(message.reportLogMessages[i]); + var properties = {}; + if (message.translationTaskResult != null && message.hasOwnProperty("translationTaskResult")) { + properties.details = 1; + { + var error = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.verify(message.translationTaskResult); if (error) - return "reportLogMessages." + error; + return "translationTaskResult." + error; } } return null; }; /** - * Creates a TranslationTaskResult message from a plain object. Also converts values to their respective internal types. + * Creates a MigrationTaskResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult + * @returns {google.cloud.bigquery.migration.v2.MigrationTaskResult} MigrationTaskResult */ - TranslationTaskResult.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.TranslationTaskResult) + MigrationTaskResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.MigrationTaskResult) return object; - var message = new $root.google.cloud.bigquery.migration.v2.TranslationTaskResult(); - if (object.translatedLiterals) { - if (!Array.isArray(object.translatedLiterals)) - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.translatedLiterals: array expected"); - message.translatedLiterals = []; - for (var i = 0; i < object.translatedLiterals.length; ++i) { - if (typeof object.translatedLiterals[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.translatedLiterals: object expected"); - message.translatedLiterals[i] = $root.google.cloud.bigquery.migration.v2.Literal.fromObject(object.translatedLiterals[i]); - } - } - if (object.reportLogMessages) { - if (!Array.isArray(object.reportLogMessages)) - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.reportLogMessages: array expected"); - message.reportLogMessages = []; - for (var i = 0; i < object.reportLogMessages.length; ++i) { - if (typeof object.reportLogMessages[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.reportLogMessages: object expected"); - message.reportLogMessages[i] = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.fromObject(object.reportLogMessages[i]); - } + var message = new $root.google.cloud.bigquery.migration.v2.MigrationTaskResult(); + if (object.translationTaskResult != null) { + if (typeof object.translationTaskResult !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.MigrationTaskResult.translationTaskResult: object expected"); + message.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.fromObject(object.translationTaskResult); } return message; }; /** - * Creates a plain object from a TranslationTaskResult message. Also converts values to other types if specified. + * Creates a plain object from a MigrationTaskResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.TranslationTaskResult} message TranslationTaskResult + * @param {google.cloud.bigquery.migration.v2.MigrationTaskResult} message MigrationTaskResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranslationTaskResult.toObject = function toObject(message, options) { + MigrationTaskResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.translatedLiterals = []; - object.reportLogMessages = []; - } - if (message.translatedLiterals && message.translatedLiterals.length) { - object.translatedLiterals = []; - for (var j = 0; j < message.translatedLiterals.length; ++j) - object.translatedLiterals[j] = $root.google.cloud.bigquery.migration.v2.Literal.toObject(message.translatedLiterals[j], options); - } - if (message.reportLogMessages && message.reportLogMessages.length) { - object.reportLogMessages = []; - for (var j = 0; j < message.reportLogMessages.length; ++j) - object.reportLogMessages[j] = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.toObject(message.reportLogMessages[j], options); + if (message.translationTaskResult != null && message.hasOwnProperty("translationTaskResult")) { + object.translationTaskResult = $root.google.cloud.bigquery.migration.v2.TranslationTaskResult.toObject(message.translationTaskResult, options); + if (options.oneofs) + object.details = "translationTaskResult"; } return object; }; /** - * Converts this TranslationTaskResult to JSON. + * Converts this MigrationTaskResult to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @instance * @returns {Object.} JSON object */ - TranslationTaskResult.prototype.toJSON = function toJSON() { + MigrationTaskResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TranslationTaskResult + * Gets the default type url for MigrationTaskResult * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult + * @memberof google.cloud.bigquery.migration.v2.MigrationTaskResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TranslationTaskResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MigrationTaskResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TranslationTaskResult"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MigrationTaskResult"; }; - return TranslationTaskResult; + return MigrationTaskResult; })(); - v2.ResourceErrorDetail = (function() { + v2.TranslationTaskResult = (function() { /** - * Properties of a ResourceErrorDetail. + * Properties of a TranslationTaskResult. * @memberof google.cloud.bigquery.migration.v2 - * @interface IResourceErrorDetail - * @property {google.rpc.IResourceInfo|null} [resourceInfo] ResourceErrorDetail resourceInfo - * @property {Array.|null} [errorDetails] ResourceErrorDetail errorDetails - * @property {number|null} [errorCount] ResourceErrorDetail errorCount + * @interface ITranslationTaskResult + * @property {Array.|null} [translatedLiterals] TranslationTaskResult translatedLiterals + * @property {Array.|null} [reportLogMessages] TranslationTaskResult reportLogMessages + * @property {string|null} [consoleUri] TranslationTaskResult consoleUri */ /** - * Constructs a new ResourceErrorDetail. + * Constructs a new TranslationTaskResult. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a ResourceErrorDetail. - * @implements IResourceErrorDetail + * @classdesc Represents a TranslationTaskResult. + * @implements ITranslationTaskResult * @constructor - * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult=} [properties] Properties to set */ - function ResourceErrorDetail(properties) { - this.errorDetails = []; + function TranslationTaskResult(properties) { + this.translatedLiterals = []; + this.reportLogMessages = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2245,108 +2546,111 @@ } /** - * ResourceErrorDetail resourceInfo. - * @member {google.rpc.IResourceInfo|null|undefined} resourceInfo - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * TranslationTaskResult translatedLiterals. + * @member {Array.} translatedLiterals + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @instance */ - ResourceErrorDetail.prototype.resourceInfo = null; + TranslationTaskResult.prototype.translatedLiterals = $util.emptyArray; /** - * ResourceErrorDetail errorDetails. - * @member {Array.} errorDetails - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * TranslationTaskResult reportLogMessages. + * @member {Array.} reportLogMessages + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @instance */ - ResourceErrorDetail.prototype.errorDetails = $util.emptyArray; + TranslationTaskResult.prototype.reportLogMessages = $util.emptyArray; /** - * ResourceErrorDetail errorCount. - * @member {number} errorCount - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * TranslationTaskResult consoleUri. + * @member {string} consoleUri + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @instance */ - ResourceErrorDetail.prototype.errorCount = 0; + TranslationTaskResult.prototype.consoleUri = ""; /** - * Creates a new ResourceErrorDetail instance using the specified properties. + * Creates a new TranslationTaskResult instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail instance + * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult instance */ - ResourceErrorDetail.create = function create(properties) { - return new ResourceErrorDetail(properties); + TranslationTaskResult.create = function create(properties) { + return new TranslationTaskResult(properties); }; /** - * Encodes the specified ResourceErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify|verify} messages. + * Encodes the specified TranslationTaskResult message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationTaskResult.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail} message ResourceErrorDetail message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult} message TranslationTaskResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceErrorDetail.encode = function encode(message, writer) { + TranslationTaskResult.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.resourceInfo != null && Object.hasOwnProperty.call(message, "resourceInfo")) - $root.google.rpc.ResourceInfo.encode(message.resourceInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.errorDetails != null && message.errorDetails.length) - for (var i = 0; i < message.errorDetails.length; ++i) - $root.google.cloud.bigquery.migration.v2.ErrorDetail.encode(message.errorDetails[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.errorCount != null && Object.hasOwnProperty.call(message, "errorCount")) - writer.uint32(/* id 3, wireType 0 =*/24).int32(message.errorCount); + if (message.translatedLiterals != null && message.translatedLiterals.length) + for (var i = 0; i < message.translatedLiterals.length; ++i) + $root.google.cloud.bigquery.migration.v2.Literal.encode(message.translatedLiterals[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.reportLogMessages != null && message.reportLogMessages.length) + for (var i = 0; i < message.reportLogMessages.length; ++i) + $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.encode(message.reportLogMessages[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.consoleUri != null && Object.hasOwnProperty.call(message, "consoleUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.consoleUri); return writer; }; /** - * Encodes the specified ResourceErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify|verify} messages. + * Encodes the specified TranslationTaskResult message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationTaskResult.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail} message ResourceErrorDetail message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITranslationTaskResult} message TranslationTaskResult message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { + TranslationTaskResult.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceErrorDetail message from the specified reader or buffer. + * Decodes a TranslationTaskResult message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail + * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceErrorDetail.decode = function decode(reader, length, error) { + TranslationTaskResult.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationTaskResult(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.resourceInfo = $root.google.rpc.ResourceInfo.decode(reader, reader.uint32()); + if (!(message.translatedLiterals && message.translatedLiterals.length)) + message.translatedLiterals = []; + message.translatedLiterals.push($root.google.cloud.bigquery.migration.v2.Literal.decode(reader, reader.uint32())); break; } case 2: { - if (!(message.errorDetails && message.errorDetails.length)) - message.errorDetails = []; - message.errorDetails.push($root.google.cloud.bigquery.migration.v2.ErrorDetail.decode(reader, reader.uint32())); + if (!(message.reportLogMessages && message.reportLogMessages.length)) + message.reportLogMessages = []; + message.reportLogMessages.push($root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.decode(reader, reader.uint32())); break; } case 3: { - message.errorCount = reader.int32(); + message.consoleUri = reader.string(); break; } default: @@ -2358,163 +2662,177 @@ }; /** - * Decodes a ResourceErrorDetail message from the specified reader or buffer, length delimited. + * Decodes a TranslationTaskResult message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail + * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResourceErrorDetail.decodeDelimited = function decodeDelimited(reader) { + TranslationTaskResult.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResourceErrorDetail message. + * Verifies a TranslationTaskResult message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResourceErrorDetail.verify = function verify(message) { + TranslationTaskResult.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.resourceInfo != null && message.hasOwnProperty("resourceInfo")) { - var error = $root.google.rpc.ResourceInfo.verify(message.resourceInfo); - if (error) - return "resourceInfo." + error; + if (message.translatedLiterals != null && message.hasOwnProperty("translatedLiterals")) { + if (!Array.isArray(message.translatedLiterals)) + return "translatedLiterals: array expected"; + for (var i = 0; i < message.translatedLiterals.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.Literal.verify(message.translatedLiterals[i]); + if (error) + return "translatedLiterals." + error; + } } - if (message.errorDetails != null && message.hasOwnProperty("errorDetails")) { - if (!Array.isArray(message.errorDetails)) - return "errorDetails: array expected"; - for (var i = 0; i < message.errorDetails.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.ErrorDetail.verify(message.errorDetails[i]); + if (message.reportLogMessages != null && message.hasOwnProperty("reportLogMessages")) { + if (!Array.isArray(message.reportLogMessages)) + return "reportLogMessages: array expected"; + for (var i = 0; i < message.reportLogMessages.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.verify(message.reportLogMessages[i]); if (error) - return "errorDetails." + error; + return "reportLogMessages." + error; } } - if (message.errorCount != null && message.hasOwnProperty("errorCount")) - if (!$util.isInteger(message.errorCount)) - return "errorCount: integer expected"; + if (message.consoleUri != null && message.hasOwnProperty("consoleUri")) + if (!$util.isString(message.consoleUri)) + return "consoleUri: string expected"; return null; }; /** - * Creates a ResourceErrorDetail message from a plain object. Also converts values to their respective internal types. + * Creates a TranslationTaskResult message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail + * @returns {google.cloud.bigquery.migration.v2.TranslationTaskResult} TranslationTaskResult */ - ResourceErrorDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail) + TranslationTaskResult.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.TranslationTaskResult) return object; - var message = new $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail(); - if (object.resourceInfo != null) { - if (typeof object.resourceInfo !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ResourceErrorDetail.resourceInfo: object expected"); - message.resourceInfo = $root.google.rpc.ResourceInfo.fromObject(object.resourceInfo); + var message = new $root.google.cloud.bigquery.migration.v2.TranslationTaskResult(); + if (object.translatedLiterals) { + if (!Array.isArray(object.translatedLiterals)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.translatedLiterals: array expected"); + message.translatedLiterals = []; + for (var i = 0; i < object.translatedLiterals.length; ++i) { + if (typeof object.translatedLiterals[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.translatedLiterals: object expected"); + message.translatedLiterals[i] = $root.google.cloud.bigquery.migration.v2.Literal.fromObject(object.translatedLiterals[i]); + } } - if (object.errorDetails) { - if (!Array.isArray(object.errorDetails)) - throw TypeError(".google.cloud.bigquery.migration.v2.ResourceErrorDetail.errorDetails: array expected"); - message.errorDetails = []; - for (var i = 0; i < object.errorDetails.length; ++i) { - if (typeof object.errorDetails[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ResourceErrorDetail.errorDetails: object expected"); - message.errorDetails[i] = $root.google.cloud.bigquery.migration.v2.ErrorDetail.fromObject(object.errorDetails[i]); + if (object.reportLogMessages) { + if (!Array.isArray(object.reportLogMessages)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.reportLogMessages: array expected"); + message.reportLogMessages = []; + for (var i = 0; i < object.reportLogMessages.length; ++i) { + if (typeof object.reportLogMessages[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationTaskResult.reportLogMessages: object expected"); + message.reportLogMessages[i] = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.fromObject(object.reportLogMessages[i]); } } - if (object.errorCount != null) - message.errorCount = object.errorCount | 0; + if (object.consoleUri != null) + message.consoleUri = String(object.consoleUri); return message; }; /** - * Creates a plain object from a ResourceErrorDetail message. Also converts values to other types if specified. + * Creates a plain object from a TranslationTaskResult message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static - * @param {google.cloud.bigquery.migration.v2.ResourceErrorDetail} message ResourceErrorDetail + * @param {google.cloud.bigquery.migration.v2.TranslationTaskResult} message TranslationTaskResult * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceErrorDetail.toObject = function toObject(message, options) { + TranslationTaskResult.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.errorDetails = []; - if (options.defaults) { - object.resourceInfo = null; - object.errorCount = 0; - } - if (message.resourceInfo != null && message.hasOwnProperty("resourceInfo")) - object.resourceInfo = $root.google.rpc.ResourceInfo.toObject(message.resourceInfo, options); - if (message.errorDetails && message.errorDetails.length) { - object.errorDetails = []; - for (var j = 0; j < message.errorDetails.length; ++j) - object.errorDetails[j] = $root.google.cloud.bigquery.migration.v2.ErrorDetail.toObject(message.errorDetails[j], options); + if (options.arrays || options.defaults) { + object.translatedLiterals = []; + object.reportLogMessages = []; } - if (message.errorCount != null && message.hasOwnProperty("errorCount")) - object.errorCount = message.errorCount; + if (options.defaults) + object.consoleUri = ""; + if (message.translatedLiterals && message.translatedLiterals.length) { + object.translatedLiterals = []; + for (var j = 0; j < message.translatedLiterals.length; ++j) + object.translatedLiterals[j] = $root.google.cloud.bigquery.migration.v2.Literal.toObject(message.translatedLiterals[j], options); + } + if (message.reportLogMessages && message.reportLogMessages.length) { + object.reportLogMessages = []; + for (var j = 0; j < message.reportLogMessages.length; ++j) + object.reportLogMessages[j] = $root.google.cloud.bigquery.migration.v2.GcsReportLogMessage.toObject(message.reportLogMessages[j], options); + } + if (message.consoleUri != null && message.hasOwnProperty("consoleUri")) + object.consoleUri = message.consoleUri; return object; }; /** - * Converts this ResourceErrorDetail to JSON. + * Converts this TranslationTaskResult to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @instance * @returns {Object.} JSON object */ - ResourceErrorDetail.prototype.toJSON = function toJSON() { + TranslationTaskResult.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceErrorDetail + * Gets the default type url for TranslationTaskResult * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @memberof google.cloud.bigquery.migration.v2.TranslationTaskResult * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TranslationTaskResult.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ResourceErrorDetail"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TranslationTaskResult"; }; - return ResourceErrorDetail; + return TranslationTaskResult; })(); - v2.ErrorDetail = (function() { + v2.ResourceErrorDetail = (function() { /** - * Properties of an ErrorDetail. + * Properties of a ResourceErrorDetail. * @memberof google.cloud.bigquery.migration.v2 - * @interface IErrorDetail - * @property {google.cloud.bigquery.migration.v2.IErrorLocation|null} [location] ErrorDetail location - * @property {google.rpc.IErrorInfo|null} [errorInfo] ErrorDetail errorInfo + * @interface IResourceErrorDetail + * @property {google.rpc.IResourceInfo|null} [resourceInfo] ResourceErrorDetail resourceInfo + * @property {Array.|null} [errorDetails] ResourceErrorDetail errorDetails + * @property {number|null} [errorCount] ResourceErrorDetail errorCount */ /** - * Constructs a new ErrorDetail. + * Constructs a new ResourceErrorDetail. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an ErrorDetail. - * @implements IErrorDetail + * @classdesc Represents a ResourceErrorDetail. + * @implements IResourceErrorDetail * @constructor - * @param {google.cloud.bigquery.migration.v2.IErrorDetail=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail=} [properties] Properties to set */ - function ErrorDetail(properties) { + function ResourceErrorDetail(properties) { + this.errorDetails = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2522,91 +2840,108 @@ } /** - * ErrorDetail location. - * @member {google.cloud.bigquery.migration.v2.IErrorLocation|null|undefined} location - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * ResourceErrorDetail resourceInfo. + * @member {google.rpc.IResourceInfo|null|undefined} resourceInfo + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @instance */ - ErrorDetail.prototype.location = null; + ResourceErrorDetail.prototype.resourceInfo = null; /** - * ErrorDetail errorInfo. - * @member {google.rpc.IErrorInfo|null|undefined} errorInfo - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * ResourceErrorDetail errorDetails. + * @member {Array.} errorDetails + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @instance */ - ErrorDetail.prototype.errorInfo = null; + ResourceErrorDetail.prototype.errorDetails = $util.emptyArray; /** - * Creates a new ErrorDetail instance using the specified properties. + * ResourceErrorDetail errorCount. + * @member {number} errorCount + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail + * @instance + */ + ResourceErrorDetail.prototype.errorCount = 0; + + /** + * Creates a new ResourceErrorDetail instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.IErrorDetail=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail instance + * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail instance */ - ErrorDetail.create = function create(properties) { - return new ErrorDetail(properties); + ResourceErrorDetail.create = function create(properties) { + return new ResourceErrorDetail(properties); }; /** - * Encodes the specified ErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. + * Encodes the specified ResourceErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.IErrorDetail} message ErrorDetail message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail} message ResourceErrorDetail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ErrorDetail.encode = function encode(message, writer) { + ResourceErrorDetail.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.location != null && Object.hasOwnProperty.call(message, "location")) - $root.google.cloud.bigquery.migration.v2.ErrorLocation.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.errorInfo != null && Object.hasOwnProperty.call(message, "errorInfo")) - $root.google.rpc.ErrorInfo.encode(message.errorInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.resourceInfo != null && Object.hasOwnProperty.call(message, "resourceInfo")) + $root.google.rpc.ResourceInfo.encode(message.resourceInfo, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errorDetails != null && message.errorDetails.length) + for (var i = 0; i < message.errorDetails.length; ++i) + $root.google.cloud.bigquery.migration.v2.ErrorDetail.encode(message.errorDetails[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.errorCount != null && Object.hasOwnProperty.call(message, "errorCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.errorCount); return writer; }; /** - * Encodes the specified ErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. + * Encodes the specified ResourceErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ResourceErrorDetail.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.IErrorDetail} message ErrorDetail message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IResourceErrorDetail} message ResourceErrorDetail message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { + ResourceErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ErrorDetail message from the specified reader or buffer. + * Decodes a ResourceErrorDetail message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ErrorDetail.decode = function decode(reader, length, error) { + ResourceErrorDetail.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ErrorDetail(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.decode(reader, reader.uint32()); + message.resourceInfo = $root.google.rpc.ResourceInfo.decode(reader, reader.uint32()); break; } case 2: { - message.errorInfo = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); + if (!(message.errorDetails && message.errorDetails.length)) + message.errorDetails = []; + message.errorDetails.push($root.google.cloud.bigquery.migration.v2.ErrorDetail.decode(reader, reader.uint32())); + break; + } + case 3: { + message.errorCount = reader.int32(); break; } default: @@ -2618,133 +2953,393 @@ }; /** - * Decodes an ErrorDetail message from the specified reader or buffer, length delimited. + * Decodes a ResourceErrorDetail message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ErrorDetail.decodeDelimited = function decodeDelimited(reader) { + ResourceErrorDetail.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ErrorDetail message. + * Verifies a ResourceErrorDetail message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ErrorDetail.verify = function verify(message) { + ResourceErrorDetail.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.location != null && message.hasOwnProperty("location")) { - var error = $root.google.cloud.bigquery.migration.v2.ErrorLocation.verify(message.location); + if (message.resourceInfo != null && message.hasOwnProperty("resourceInfo")) { + var error = $root.google.rpc.ResourceInfo.verify(message.resourceInfo); if (error) - return "location." + error; + return "resourceInfo." + error; } - if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) { - var error = $root.google.rpc.ErrorInfo.verify(message.errorInfo); - if (error) - return "errorInfo." + error; + if (message.errorDetails != null && message.hasOwnProperty("errorDetails")) { + if (!Array.isArray(message.errorDetails)) + return "errorDetails: array expected"; + for (var i = 0; i < message.errorDetails.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.ErrorDetail.verify(message.errorDetails[i]); + if (error) + return "errorDetails." + error; + } } + if (message.errorCount != null && message.hasOwnProperty("errorCount")) + if (!$util.isInteger(message.errorCount)) + return "errorCount: integer expected"; return null; }; /** - * Creates an ErrorDetail message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceErrorDetail message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + * @returns {google.cloud.bigquery.migration.v2.ResourceErrorDetail} ResourceErrorDetail */ - ErrorDetail.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ErrorDetail) + ResourceErrorDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail) return object; - var message = new $root.google.cloud.bigquery.migration.v2.ErrorDetail(); - if (object.location != null) { - if (typeof object.location !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ErrorDetail.location: object expected"); - message.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.fromObject(object.location); + var message = new $root.google.cloud.bigquery.migration.v2.ResourceErrorDetail(); + if (object.resourceInfo != null) { + if (typeof object.resourceInfo !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ResourceErrorDetail.resourceInfo: object expected"); + message.resourceInfo = $root.google.rpc.ResourceInfo.fromObject(object.resourceInfo); } - if (object.errorInfo != null) { - if (typeof object.errorInfo !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ErrorDetail.errorInfo: object expected"); - message.errorInfo = $root.google.rpc.ErrorInfo.fromObject(object.errorInfo); + if (object.errorDetails) { + if (!Array.isArray(object.errorDetails)) + throw TypeError(".google.cloud.bigquery.migration.v2.ResourceErrorDetail.errorDetails: array expected"); + message.errorDetails = []; + for (var i = 0; i < object.errorDetails.length; ++i) { + if (typeof object.errorDetails[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ResourceErrorDetail.errorDetails: object expected"); + message.errorDetails[i] = $root.google.cloud.bigquery.migration.v2.ErrorDetail.fromObject(object.errorDetails[i]); + } } + if (object.errorCount != null) + message.errorCount = object.errorCount | 0; return message; }; /** - * Creates a plain object from an ErrorDetail message. Also converts values to other types if specified. + * Creates a plain object from a ResourceErrorDetail message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static - * @param {google.cloud.bigquery.migration.v2.ErrorDetail} message ErrorDetail + * @param {google.cloud.bigquery.migration.v2.ResourceErrorDetail} message ResourceErrorDetail * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ErrorDetail.toObject = function toObject(message, options) { + ResourceErrorDetail.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.errorDetails = []; if (options.defaults) { - object.location = null; - object.errorInfo = null; + object.resourceInfo = null; + object.errorCount = 0; } - if (message.location != null && message.hasOwnProperty("location")) - object.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.toObject(message.location, options); - if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) - object.errorInfo = $root.google.rpc.ErrorInfo.toObject(message.errorInfo, options); + if (message.resourceInfo != null && message.hasOwnProperty("resourceInfo")) + object.resourceInfo = $root.google.rpc.ResourceInfo.toObject(message.resourceInfo, options); + if (message.errorDetails && message.errorDetails.length) { + object.errorDetails = []; + for (var j = 0; j < message.errorDetails.length; ++j) + object.errorDetails[j] = $root.google.cloud.bigquery.migration.v2.ErrorDetail.toObject(message.errorDetails[j], options); + } + if (message.errorCount != null && message.hasOwnProperty("errorCount")) + object.errorCount = message.errorCount; return object; }; /** - * Converts this ErrorDetail to JSON. + * Converts this ResourceErrorDetail to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @instance * @returns {Object.} JSON object */ - ErrorDetail.prototype.toJSON = function toJSON() { + ResourceErrorDetail.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ErrorDetail + * Gets the default type url for ResourceErrorDetail * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @memberof google.cloud.bigquery.migration.v2.ResourceErrorDetail * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResourceErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ErrorDetail"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ResourceErrorDetail"; }; - return ErrorDetail; + return ResourceErrorDetail; })(); - v2.ErrorLocation = (function() { + v2.ErrorDetail = (function() { /** - * Properties of an ErrorLocation. + * Properties of an ErrorDetail. * @memberof google.cloud.bigquery.migration.v2 - * @interface IErrorLocation - * @property {number|null} [line] ErrorLocation line - * @property {number|null} [column] ErrorLocation column - */ - + * @interface IErrorDetail + * @property {google.cloud.bigquery.migration.v2.IErrorLocation|null} [location] ErrorDetail location + * @property {google.rpc.IErrorInfo|null} [errorInfo] ErrorDetail errorInfo + */ + + /** + * Constructs a new ErrorDetail. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents an ErrorDetail. + * @implements IErrorDetail + * @constructor + * @param {google.cloud.bigquery.migration.v2.IErrorDetail=} [properties] Properties to set + */ + function ErrorDetail(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ErrorDetail location. + * @member {google.cloud.bigquery.migration.v2.IErrorLocation|null|undefined} location + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @instance + */ + ErrorDetail.prototype.location = null; + + /** + * ErrorDetail errorInfo. + * @member {google.rpc.IErrorInfo|null|undefined} errorInfo + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @instance + */ + ErrorDetail.prototype.errorInfo = null; + + /** + * Creates a new ErrorDetail instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2.IErrorDetail=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail instance + */ + ErrorDetail.create = function create(properties) { + return new ErrorDetail(properties); + }; + + /** + * Encodes the specified ErrorDetail message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2.IErrorDetail} message ErrorDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorDetail.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + $root.google.cloud.bigquery.migration.v2.ErrorLocation.encode(message.location, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.errorInfo != null && Object.hasOwnProperty.call(message, "errorInfo")) + $root.google.rpc.ErrorInfo.encode(message.errorInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ErrorDetail message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ErrorDetail.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2.IErrorDetail} message ErrorDetail message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ErrorDetail.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ErrorDetail message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorDetail.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ErrorDetail(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + case 1: { + message.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.decode(reader, reader.uint32()); + break; + } + case 2: { + message.errorInfo = $root.google.rpc.ErrorInfo.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ErrorDetail message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ErrorDetail.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ErrorDetail message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ErrorDetail.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + var error = $root.google.cloud.bigquery.migration.v2.ErrorLocation.verify(message.location); + if (error) + return "location." + error; + } + if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) { + var error = $root.google.rpc.ErrorInfo.verify(message.errorInfo); + if (error) + return "errorInfo." + error; + } + return null; + }; + + /** + * Creates an ErrorDetail message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.ErrorDetail} ErrorDetail + */ + ErrorDetail.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ErrorDetail) + return object; + var message = new $root.google.cloud.bigquery.migration.v2.ErrorDetail(); + if (object.location != null) { + if (typeof object.location !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ErrorDetail.location: object expected"); + message.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.fromObject(object.location); + } + if (object.errorInfo != null) { + if (typeof object.errorInfo !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ErrorDetail.errorInfo: object expected"); + message.errorInfo = $root.google.rpc.ErrorInfo.fromObject(object.errorInfo); + } + return message; + }; + + /** + * Creates a plain object from an ErrorDetail message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {google.cloud.bigquery.migration.v2.ErrorDetail} message ErrorDetail + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ErrorDetail.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.location = null; + object.errorInfo = null; + } + if (message.location != null && message.hasOwnProperty("location")) + object.location = $root.google.cloud.bigquery.migration.v2.ErrorLocation.toObject(message.location, options); + if (message.errorInfo != null && message.hasOwnProperty("errorInfo")) + object.errorInfo = $root.google.rpc.ErrorInfo.toObject(message.errorInfo, options); + return object; + }; + + /** + * Converts this ErrorDetail to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @instance + * @returns {Object.} JSON object + */ + ErrorDetail.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ErrorDetail + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.ErrorDetail + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ErrorDetail.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ErrorDetail"; + }; + + return ErrorDetail; + })(); + + v2.ErrorLocation = (function() { + + /** + * Properties of an ErrorLocation. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IErrorLocation + * @property {number|null} [line] ErrorLocation line + * @property {number|null} [column] ErrorLocation column + */ + /** * Constructs a new ErrorLocation. * @memberof google.cloud.bigquery.migration.v2 @@ -5281,152 +5876,506 @@ }; /** - * Creates a plain object from a Dialect message. Also converts values to other types if specified. + * Creates a plain object from a Dialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @static + * @param {google.cloud.bigquery.migration.v2.Dialect} message Dialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Dialect.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.bigqueryDialect != null && message.hasOwnProperty("bigqueryDialect")) { + object.bigqueryDialect = $root.google.cloud.bigquery.migration.v2.BigQueryDialect.toObject(message.bigqueryDialect, options); + if (options.oneofs) + object.dialectValue = "bigqueryDialect"; + } + if (message.hiveqlDialect != null && message.hasOwnProperty("hiveqlDialect")) { + object.hiveqlDialect = $root.google.cloud.bigquery.migration.v2.HiveQLDialect.toObject(message.hiveqlDialect, options); + if (options.oneofs) + object.dialectValue = "hiveqlDialect"; + } + if (message.redshiftDialect != null && message.hasOwnProperty("redshiftDialect")) { + object.redshiftDialect = $root.google.cloud.bigquery.migration.v2.RedshiftDialect.toObject(message.redshiftDialect, options); + if (options.oneofs) + object.dialectValue = "redshiftDialect"; + } + if (message.teradataDialect != null && message.hasOwnProperty("teradataDialect")) { + object.teradataDialect = $root.google.cloud.bigquery.migration.v2.TeradataDialect.toObject(message.teradataDialect, options); + if (options.oneofs) + object.dialectValue = "teradataDialect"; + } + if (message.oracleDialect != null && message.hasOwnProperty("oracleDialect")) { + object.oracleDialect = $root.google.cloud.bigquery.migration.v2.OracleDialect.toObject(message.oracleDialect, options); + if (options.oneofs) + object.dialectValue = "oracleDialect"; + } + if (message.sparksqlDialect != null && message.hasOwnProperty("sparksqlDialect")) { + object.sparksqlDialect = $root.google.cloud.bigquery.migration.v2.SparkSQLDialect.toObject(message.sparksqlDialect, options); + if (options.oneofs) + object.dialectValue = "sparksqlDialect"; + } + if (message.snowflakeDialect != null && message.hasOwnProperty("snowflakeDialect")) { + object.snowflakeDialect = $root.google.cloud.bigquery.migration.v2.SnowflakeDialect.toObject(message.snowflakeDialect, options); + if (options.oneofs) + object.dialectValue = "snowflakeDialect"; + } + if (message.netezzaDialect != null && message.hasOwnProperty("netezzaDialect")) { + object.netezzaDialect = $root.google.cloud.bigquery.migration.v2.NetezzaDialect.toObject(message.netezzaDialect, options); + if (options.oneofs) + object.dialectValue = "netezzaDialect"; + } + if (message.azureSynapseDialect != null && message.hasOwnProperty("azureSynapseDialect")) { + object.azureSynapseDialect = $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect.toObject(message.azureSynapseDialect, options); + if (options.oneofs) + object.dialectValue = "azureSynapseDialect"; + } + if (message.verticaDialect != null && message.hasOwnProperty("verticaDialect")) { + object.verticaDialect = $root.google.cloud.bigquery.migration.v2.VerticaDialect.toObject(message.verticaDialect, options); + if (options.oneofs) + object.dialectValue = "verticaDialect"; + } + if (message.sqlServerDialect != null && message.hasOwnProperty("sqlServerDialect")) { + object.sqlServerDialect = $root.google.cloud.bigquery.migration.v2.SQLServerDialect.toObject(message.sqlServerDialect, options); + if (options.oneofs) + object.dialectValue = "sqlServerDialect"; + } + if (message.postgresqlDialect != null && message.hasOwnProperty("postgresqlDialect")) { + object.postgresqlDialect = $root.google.cloud.bigquery.migration.v2.PostgresqlDialect.toObject(message.postgresqlDialect, options); + if (options.oneofs) + object.dialectValue = "postgresqlDialect"; + } + if (message.prestoDialect != null && message.hasOwnProperty("prestoDialect")) { + object.prestoDialect = $root.google.cloud.bigquery.migration.v2.PrestoDialect.toObject(message.prestoDialect, options); + if (options.oneofs) + object.dialectValue = "prestoDialect"; + } + if (message.mysqlDialect != null && message.hasOwnProperty("mysqlDialect")) { + object.mysqlDialect = $root.google.cloud.bigquery.migration.v2.MySQLDialect.toObject(message.mysqlDialect, options); + if (options.oneofs) + object.dialectValue = "mysqlDialect"; + } + if (message.db2Dialect != null && message.hasOwnProperty("db2Dialect")) { + object.db2Dialect = $root.google.cloud.bigquery.migration.v2.DB2Dialect.toObject(message.db2Dialect, options); + if (options.oneofs) + object.dialectValue = "db2Dialect"; + } + if (message.sqliteDialect != null && message.hasOwnProperty("sqliteDialect")) { + object.sqliteDialect = $root.google.cloud.bigquery.migration.v2.SQLiteDialect.toObject(message.sqliteDialect, options); + if (options.oneofs) + object.dialectValue = "sqliteDialect"; + } + if (message.greenplumDialect != null && message.hasOwnProperty("greenplumDialect")) { + object.greenplumDialect = $root.google.cloud.bigquery.migration.v2.GreenplumDialect.toObject(message.greenplumDialect, options); + if (options.oneofs) + object.dialectValue = "greenplumDialect"; + } + return object; + }; + + /** + * Converts this Dialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @instance + * @returns {Object.} JSON object + */ + Dialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Dialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.Dialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Dialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.Dialect"; + }; + + return Dialect; + })(); + + v2.BigQueryDialect = (function() { + + /** + * Properties of a BigQueryDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IBigQueryDialect + */ + + /** + * Constructs a new BigQueryDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a BigQueryDialect. + * @implements IBigQueryDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect=} [properties] Properties to set + */ + function BigQueryDialect(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new BigQueryDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect instance + */ + BigQueryDialect.create = function create(properties) { + return new BigQueryDialect(properties); + }; + + /** + * Encodes the specified BigQueryDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.BigQueryDialect.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect} message BigQueryDialect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDialect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified BigQueryDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.BigQueryDialect.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect} message BigQueryDialect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BigQueryDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BigQueryDialect message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDialect.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.BigQueryDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BigQueryDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BigQueryDialect.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BigQueryDialect message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BigQueryDialect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a BigQueryDialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect + */ + BigQueryDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.BigQueryDialect) + return object; + return new $root.google.cloud.bigquery.migration.v2.BigQueryDialect(); + }; + + /** + * Creates a plain object from a BigQueryDialect message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {google.cloud.bigquery.migration.v2.BigQueryDialect} message BigQueryDialect + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BigQueryDialect.toObject = function toObject() { + return {}; + }; + + /** + * Converts this BigQueryDialect to JSON. + * @function toJSON + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @instance + * @returns {Object.} JSON object + */ + BigQueryDialect.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for BigQueryDialect + * @function getTypeUrl + * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + BigQueryDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.BigQueryDialect"; + }; + + return BigQueryDialect; + })(); + + v2.HiveQLDialect = (function() { + + /** + * Properties of a HiveQLDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @interface IHiveQLDialect + */ + + /** + * Constructs a new HiveQLDialect. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a HiveQLDialect. + * @implements IHiveQLDialect + * @constructor + * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect=} [properties] Properties to set + */ + function HiveQLDialect(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new HiveQLDialect instance using the specified properties. + * @function create + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect instance + */ + HiveQLDialect.create = function create(properties) { + return new HiveQLDialect(properties); + }; + + /** + * Encodes the specified HiveQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. + * @function encode + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect} message HiveQLDialect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HiveQLDialect.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified HiveQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect} message HiveQLDialect message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HiveQLDialect.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HiveQLDialect message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HiveQLDialect.decode = function decode(reader, length, error) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.HiveQLDialect(); + while (reader.pos < end) { + var tag = reader.uint32(); + if (tag === error) + break; + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HiveQLDialect message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HiveQLDialect.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HiveQLDialect message. + * @function verify + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HiveQLDialect.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a HiveQLDialect message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + */ + HiveQLDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.HiveQLDialect) + return object; + return new $root.google.cloud.bigquery.migration.v2.HiveQLDialect(); + }; + + /** + * Creates a plain object from a HiveQLDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.Dialect + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.Dialect} message Dialect + * @param {google.cloud.bigquery.migration.v2.HiveQLDialect} message HiveQLDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Dialect.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.bigqueryDialect != null && message.hasOwnProperty("bigqueryDialect")) { - object.bigqueryDialect = $root.google.cloud.bigquery.migration.v2.BigQueryDialect.toObject(message.bigqueryDialect, options); - if (options.oneofs) - object.dialectValue = "bigqueryDialect"; - } - if (message.hiveqlDialect != null && message.hasOwnProperty("hiveqlDialect")) { - object.hiveqlDialect = $root.google.cloud.bigquery.migration.v2.HiveQLDialect.toObject(message.hiveqlDialect, options); - if (options.oneofs) - object.dialectValue = "hiveqlDialect"; - } - if (message.redshiftDialect != null && message.hasOwnProperty("redshiftDialect")) { - object.redshiftDialect = $root.google.cloud.bigquery.migration.v2.RedshiftDialect.toObject(message.redshiftDialect, options); - if (options.oneofs) - object.dialectValue = "redshiftDialect"; - } - if (message.teradataDialect != null && message.hasOwnProperty("teradataDialect")) { - object.teradataDialect = $root.google.cloud.bigquery.migration.v2.TeradataDialect.toObject(message.teradataDialect, options); - if (options.oneofs) - object.dialectValue = "teradataDialect"; - } - if (message.oracleDialect != null && message.hasOwnProperty("oracleDialect")) { - object.oracleDialect = $root.google.cloud.bigquery.migration.v2.OracleDialect.toObject(message.oracleDialect, options); - if (options.oneofs) - object.dialectValue = "oracleDialect"; - } - if (message.sparksqlDialect != null && message.hasOwnProperty("sparksqlDialect")) { - object.sparksqlDialect = $root.google.cloud.bigquery.migration.v2.SparkSQLDialect.toObject(message.sparksqlDialect, options); - if (options.oneofs) - object.dialectValue = "sparksqlDialect"; - } - if (message.snowflakeDialect != null && message.hasOwnProperty("snowflakeDialect")) { - object.snowflakeDialect = $root.google.cloud.bigquery.migration.v2.SnowflakeDialect.toObject(message.snowflakeDialect, options); - if (options.oneofs) - object.dialectValue = "snowflakeDialect"; - } - if (message.netezzaDialect != null && message.hasOwnProperty("netezzaDialect")) { - object.netezzaDialect = $root.google.cloud.bigquery.migration.v2.NetezzaDialect.toObject(message.netezzaDialect, options); - if (options.oneofs) - object.dialectValue = "netezzaDialect"; - } - if (message.azureSynapseDialect != null && message.hasOwnProperty("azureSynapseDialect")) { - object.azureSynapseDialect = $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect.toObject(message.azureSynapseDialect, options); - if (options.oneofs) - object.dialectValue = "azureSynapseDialect"; - } - if (message.verticaDialect != null && message.hasOwnProperty("verticaDialect")) { - object.verticaDialect = $root.google.cloud.bigquery.migration.v2.VerticaDialect.toObject(message.verticaDialect, options); - if (options.oneofs) - object.dialectValue = "verticaDialect"; - } - if (message.sqlServerDialect != null && message.hasOwnProperty("sqlServerDialect")) { - object.sqlServerDialect = $root.google.cloud.bigquery.migration.v2.SQLServerDialect.toObject(message.sqlServerDialect, options); - if (options.oneofs) - object.dialectValue = "sqlServerDialect"; - } - if (message.postgresqlDialect != null && message.hasOwnProperty("postgresqlDialect")) { - object.postgresqlDialect = $root.google.cloud.bigquery.migration.v2.PostgresqlDialect.toObject(message.postgresqlDialect, options); - if (options.oneofs) - object.dialectValue = "postgresqlDialect"; - } - if (message.prestoDialect != null && message.hasOwnProperty("prestoDialect")) { - object.prestoDialect = $root.google.cloud.bigquery.migration.v2.PrestoDialect.toObject(message.prestoDialect, options); - if (options.oneofs) - object.dialectValue = "prestoDialect"; - } - if (message.mysqlDialect != null && message.hasOwnProperty("mysqlDialect")) { - object.mysqlDialect = $root.google.cloud.bigquery.migration.v2.MySQLDialect.toObject(message.mysqlDialect, options); - if (options.oneofs) - object.dialectValue = "mysqlDialect"; - } - if (message.db2Dialect != null && message.hasOwnProperty("db2Dialect")) { - object.db2Dialect = $root.google.cloud.bigquery.migration.v2.DB2Dialect.toObject(message.db2Dialect, options); - if (options.oneofs) - object.dialectValue = "db2Dialect"; - } - if (message.sqliteDialect != null && message.hasOwnProperty("sqliteDialect")) { - object.sqliteDialect = $root.google.cloud.bigquery.migration.v2.SQLiteDialect.toObject(message.sqliteDialect, options); - if (options.oneofs) - object.dialectValue = "sqliteDialect"; - } - if (message.greenplumDialect != null && message.hasOwnProperty("greenplumDialect")) { - object.greenplumDialect = $root.google.cloud.bigquery.migration.v2.GreenplumDialect.toObject(message.greenplumDialect, options); - if (options.oneofs) - object.dialectValue = "greenplumDialect"; - } - return object; + HiveQLDialect.toObject = function toObject() { + return {}; }; /** - * Converts this Dialect to JSON. + * Converts this HiveQLDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.Dialect + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect * @instance * @returns {Object.} JSON object */ - Dialect.prototype.toJSON = function toJSON() { + HiveQLDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Dialect + * Gets the default type url for HiveQLDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.Dialect + * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Dialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + HiveQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.Dialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.HiveQLDialect"; }; - return Dialect; + return HiveQLDialect; })(); - v2.BigQueryDialect = (function() { + v2.RedshiftDialect = (function() { /** - * Properties of a BigQueryDialect. + * Properties of a RedshiftDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IBigQueryDialect + * @interface IRedshiftDialect */ /** - * Constructs a new BigQueryDialect. + * Constructs a new RedshiftDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a BigQueryDialect. - * @implements IBigQueryDialect + * @classdesc Represents a RedshiftDialect. + * @implements IRedshiftDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect=} [properties] Properties to set */ - function BigQueryDialect(properties) { + function RedshiftDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5434,60 +6383,60 @@ } /** - * Creates a new BigQueryDialect instance using the specified properties. + * Creates a new RedshiftDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static - * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect instance + * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect instance */ - BigQueryDialect.create = function create(properties) { - return new BigQueryDialect(properties); + RedshiftDialect.create = function create(properties) { + return new RedshiftDialect(properties); }; /** - * Encodes the specified BigQueryDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.BigQueryDialect.verify|verify} messages. + * Encodes the specified RedshiftDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.RedshiftDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static - * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect} message BigQueryDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect} message RedshiftDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryDialect.encode = function encode(message, writer) { + RedshiftDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified BigQueryDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.BigQueryDialect.verify|verify} messages. + * Encodes the specified RedshiftDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.RedshiftDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static - * @param {google.cloud.bigquery.migration.v2.IBigQueryDialect} message BigQueryDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect} message RedshiftDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - BigQueryDialect.encodeDelimited = function encodeDelimited(message, writer) { + RedshiftDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a BigQueryDialect message from the specified reader or buffer. + * Decodes a RedshiftDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect + * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryDialect.decode = function decode(reader, length, error) { + RedshiftDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.BigQueryDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.RedshiftDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -5502,108 +6451,109 @@ }; /** - * Decodes a BigQueryDialect message from the specified reader or buffer, length delimited. + * Decodes a RedshiftDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect + * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - BigQueryDialect.decodeDelimited = function decodeDelimited(reader) { + RedshiftDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a BigQueryDialect message. + * Verifies a RedshiftDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - BigQueryDialect.verify = function verify(message) { + RedshiftDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a BigQueryDialect message from a plain object. Also converts values to their respective internal types. + * Creates a RedshiftDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.BigQueryDialect} BigQueryDialect + * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect */ - BigQueryDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.BigQueryDialect) + RedshiftDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.RedshiftDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.BigQueryDialect(); + return new $root.google.cloud.bigquery.migration.v2.RedshiftDialect(); }; /** - * Creates a plain object from a BigQueryDialect message. Also converts values to other types if specified. + * Creates a plain object from a RedshiftDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static - * @param {google.cloud.bigquery.migration.v2.BigQueryDialect} message BigQueryDialect + * @param {google.cloud.bigquery.migration.v2.RedshiftDialect} message RedshiftDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - BigQueryDialect.toObject = function toObject() { + RedshiftDialect.toObject = function toObject() { return {}; }; /** - * Converts this BigQueryDialect to JSON. + * Converts this RedshiftDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @instance * @returns {Object.} JSON object */ - BigQueryDialect.prototype.toJSON = function toJSON() { + RedshiftDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for BigQueryDialect + * Gets the default type url for RedshiftDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.BigQueryDialect + * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - BigQueryDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RedshiftDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.BigQueryDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.RedshiftDialect"; }; - return BigQueryDialect; + return RedshiftDialect; })(); - v2.HiveQLDialect = (function() { + v2.TeradataDialect = (function() { /** - * Properties of a HiveQLDialect. + * Properties of a TeradataDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IHiveQLDialect + * @interface ITeradataDialect + * @property {google.cloud.bigquery.migration.v2.TeradataDialect.Mode|null} [mode] TeradataDialect mode */ /** - * Constructs a new HiveQLDialect. + * Constructs a new TeradataDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a HiveQLDialect. - * @implements IHiveQLDialect + * @classdesc Represents a TeradataDialect. + * @implements ITeradataDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ITeradataDialect=} [properties] Properties to set */ - function HiveQLDialect(properties) { + function TeradataDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5611,65 +6561,79 @@ } /** - * Creates a new HiveQLDialect instance using the specified properties. + * TeradataDialect mode. + * @member {google.cloud.bigquery.migration.v2.TeradataDialect.Mode} mode + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @instance + */ + TeradataDialect.prototype.mode = 0; + + /** + * Creates a new TeradataDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static - * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect instance + * @param {google.cloud.bigquery.migration.v2.ITeradataDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect instance */ - HiveQLDialect.create = function create(properties) { - return new HiveQLDialect(properties); + TeradataDialect.create = function create(properties) { + return new TeradataDialect(properties); }; /** - * Encodes the specified HiveQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. + * Encodes the specified TeradataDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TeradataDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static - * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect} message HiveQLDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITeradataDialect} message TeradataDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HiveQLDialect.encode = function encode(message, writer) { + TeradataDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); return writer; }; /** - * Encodes the specified HiveQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.HiveQLDialect.verify|verify} messages. + * Encodes the specified TeradataDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TeradataDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static - * @param {google.cloud.bigquery.migration.v2.IHiveQLDialect} message HiveQLDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITeradataDialect} message TeradataDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HiveQLDialect.encodeDelimited = function encodeDelimited(message, writer) { + TeradataDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HiveQLDialect message from the specified reader or buffer. + * Decodes a TeradataDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HiveQLDialect.decode = function decode(reader, length, error) { + TeradataDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.HiveQLDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TeradataDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.mode = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -5679,108 +6643,161 @@ }; /** - * Decodes a HiveQLDialect message from the specified reader or buffer, length delimited. + * Decodes a TeradataDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - HiveQLDialect.decodeDelimited = function decodeDelimited(reader) { + TeradataDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HiveQLDialect message. + * Verifies a TeradataDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - HiveQLDialect.verify = function verify(message) { + TeradataDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.mode != null && message.hasOwnProperty("mode")) + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; /** - * Creates a HiveQLDialect message from a plain object. Also converts values to their respective internal types. + * Creates a TeradataDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.HiveQLDialect} HiveQLDialect + * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect */ - HiveQLDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.HiveQLDialect) + TeradataDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.TeradataDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.HiveQLDialect(); + var message = new $root.google.cloud.bigquery.migration.v2.TeradataDialect(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "SQL": + case 1: + message.mode = 1; + break; + case "BTEQ": + case 2: + message.mode = 2; + break; + } + return message; }; /** - * Creates a plain object from a HiveQLDialect message. Also converts values to other types if specified. + * Creates a plain object from a TeradataDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static - * @param {google.cloud.bigquery.migration.v2.HiveQLDialect} message HiveQLDialect + * @param {google.cloud.bigquery.migration.v2.TeradataDialect} message TeradataDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HiveQLDialect.toObject = function toObject() { - return {}; + TeradataDialect.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; + if (message.mode != null && message.hasOwnProperty("mode")) + object.mode = options.enums === String ? $root.google.cloud.bigquery.migration.v2.TeradataDialect.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.bigquery.migration.v2.TeradataDialect.Mode[message.mode] : message.mode; + return object; }; /** - * Converts this HiveQLDialect to JSON. + * Converts this TeradataDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @instance * @returns {Object.} JSON object */ - HiveQLDialect.prototype.toJSON = function toJSON() { + TeradataDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HiveQLDialect + * Gets the default type url for TeradataDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.HiveQLDialect + * @memberof google.cloud.bigquery.migration.v2.TeradataDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HiveQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TeradataDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.HiveQLDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TeradataDialect"; }; - return HiveQLDialect; + /** + * Mode enum. + * @name google.cloud.bigquery.migration.v2.TeradataDialect.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} SQL=1 SQL value + * @property {number} BTEQ=2 BTEQ value + */ + TeradataDialect.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "SQL"] = 1; + values[valuesById[2] = "BTEQ"] = 2; + return values; + })(); + + return TeradataDialect; })(); - v2.RedshiftDialect = (function() { + v2.OracleDialect = (function() { /** - * Properties of a RedshiftDialect. + * Properties of an OracleDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IRedshiftDialect + * @interface IOracleDialect */ /** - * Constructs a new RedshiftDialect. + * Constructs a new OracleDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a RedshiftDialect. - * @implements IRedshiftDialect + * @classdesc Represents an OracleDialect. + * @implements IOracleDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IOracleDialect=} [properties] Properties to set */ - function RedshiftDialect(properties) { + function OracleDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5788,60 +6805,60 @@ } /** - * Creates a new RedshiftDialect instance using the specified properties. + * Creates a new OracleDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static - * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect instance + * @param {google.cloud.bigquery.migration.v2.IOracleDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect instance */ - RedshiftDialect.create = function create(properties) { - return new RedshiftDialect(properties); + OracleDialect.create = function create(properties) { + return new OracleDialect(properties); }; /** - * Encodes the specified RedshiftDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.RedshiftDialect.verify|verify} messages. + * Encodes the specified OracleDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.OracleDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static - * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect} message RedshiftDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IOracleDialect} message OracleDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RedshiftDialect.encode = function encode(message, writer) { + OracleDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified RedshiftDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.RedshiftDialect.verify|verify} messages. + * Encodes the specified OracleDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.OracleDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static - * @param {google.cloud.bigquery.migration.v2.IRedshiftDialect} message RedshiftDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IOracleDialect} message OracleDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RedshiftDialect.encodeDelimited = function encodeDelimited(message, writer) { + OracleDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RedshiftDialect message from the specified reader or buffer. + * Decodes an OracleDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect + * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RedshiftDialect.decode = function decode(reader, length, error) { + OracleDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.RedshiftDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.OracleDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -5856,109 +6873,108 @@ }; /** - * Decodes a RedshiftDialect message from the specified reader or buffer, length delimited. + * Decodes an OracleDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect + * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - RedshiftDialect.decodeDelimited = function decodeDelimited(reader) { + OracleDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RedshiftDialect message. + * Verifies an OracleDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - RedshiftDialect.verify = function verify(message) { + OracleDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a RedshiftDialect message from a plain object. Also converts values to their respective internal types. + * Creates an OracleDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.RedshiftDialect} RedshiftDialect - */ - RedshiftDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.RedshiftDialect) + * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect + */ + OracleDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.OracleDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.RedshiftDialect(); + return new $root.google.cloud.bigquery.migration.v2.OracleDialect(); }; /** - * Creates a plain object from a RedshiftDialect message. Also converts values to other types if specified. + * Creates a plain object from an OracleDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static - * @param {google.cloud.bigquery.migration.v2.RedshiftDialect} message RedshiftDialect + * @param {google.cloud.bigquery.migration.v2.OracleDialect} message OracleDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RedshiftDialect.toObject = function toObject() { + OracleDialect.toObject = function toObject() { return {}; }; /** - * Converts this RedshiftDialect to JSON. + * Converts this OracleDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @instance * @returns {Object.} JSON object */ - RedshiftDialect.prototype.toJSON = function toJSON() { + OracleDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RedshiftDialect + * Gets the default type url for OracleDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.RedshiftDialect + * @memberof google.cloud.bigquery.migration.v2.OracleDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RedshiftDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + OracleDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.RedshiftDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.OracleDialect"; }; - return RedshiftDialect; + return OracleDialect; })(); - v2.TeradataDialect = (function() { + v2.SparkSQLDialect = (function() { /** - * Properties of a TeradataDialect. + * Properties of a SparkSQLDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface ITeradataDialect - * @property {google.cloud.bigquery.migration.v2.TeradataDialect.Mode|null} [mode] TeradataDialect mode + * @interface ISparkSQLDialect */ /** - * Constructs a new TeradataDialect. + * Constructs a new SparkSQLDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TeradataDialect. - * @implements ITeradataDialect + * @classdesc Represents a SparkSQLDialect. + * @implements ISparkSQLDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.ITeradataDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect=} [properties] Properties to set */ - function TeradataDialect(properties) { + function SparkSQLDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5966,79 +6982,65 @@ } /** - * TeradataDialect mode. - * @member {google.cloud.bigquery.migration.v2.TeradataDialect.Mode} mode - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect - * @instance - */ - TeradataDialect.prototype.mode = 0; - - /** - * Creates a new TeradataDialect instance using the specified properties. + * Creates a new SparkSQLDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.ITeradataDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect instance + * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect instance */ - TeradataDialect.create = function create(properties) { - return new TeradataDialect(properties); + SparkSQLDialect.create = function create(properties) { + return new SparkSQLDialect(properties); }; /** - * Encodes the specified TeradataDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TeradataDialect.verify|verify} messages. + * Encodes the specified SparkSQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SparkSQLDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.ITeradataDialect} message TeradataDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect} message SparkSQLDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TeradataDialect.encode = function encode(message, writer) { + SparkSQLDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); return writer; }; /** - * Encodes the specified TeradataDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TeradataDialect.verify|verify} messages. + * Encodes the specified SparkSQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SparkSQLDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.ITeradataDialect} message TeradataDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect} message SparkSQLDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TeradataDialect.encodeDelimited = function encodeDelimited(message, writer) { + SparkSQLDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TeradataDialect message from the specified reader or buffer. + * Decodes a SparkSQLDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect + * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TeradataDialect.decode = function decode(reader, length, error) { + SparkSQLDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TeradataDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SparkSQLDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { - case 1: { - message.mode = reader.int32(); - break; - } default: reader.skipType(tag & 7); break; @@ -6048,161 +7050,108 @@ }; /** - * Decodes a TeradataDialect message from the specified reader or buffer, length delimited. + * Decodes a SparkSQLDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect + * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TeradataDialect.decodeDelimited = function decodeDelimited(reader) { + SparkSQLDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TeradataDialect message. + * Verifies a SparkSQLDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TeradataDialect.verify = function verify(message) { + SparkSQLDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.mode != null && message.hasOwnProperty("mode")) - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - break; - } return null; }; /** - * Creates a TeradataDialect message from a plain object. Also converts values to their respective internal types. + * Creates a SparkSQLDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TeradataDialect} TeradataDialect + * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect */ - TeradataDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.TeradataDialect) + SparkSQLDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SparkSQLDialect) return object; - var message = new $root.google.cloud.bigquery.migration.v2.TeradataDialect(); - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "SQL": - case 1: - message.mode = 1; - break; - case "BTEQ": - case 2: - message.mode = 2; - break; - } - return message; + return new $root.google.cloud.bigquery.migration.v2.SparkSQLDialect(); }; /** - * Creates a plain object from a TeradataDialect message. Also converts values to other types if specified. + * Creates a plain object from a SparkSQLDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.TeradataDialect} message TeradataDialect + * @param {google.cloud.bigquery.migration.v2.SparkSQLDialect} message SparkSQLDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TeradataDialect.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.mode = options.enums === String ? "MODE_UNSPECIFIED" : 0; - if (message.mode != null && message.hasOwnProperty("mode")) - object.mode = options.enums === String ? $root.google.cloud.bigquery.migration.v2.TeradataDialect.Mode[message.mode] === undefined ? message.mode : $root.google.cloud.bigquery.migration.v2.TeradataDialect.Mode[message.mode] : message.mode; - return object; + SparkSQLDialect.toObject = function toObject() { + return {}; }; /** - * Converts this TeradataDialect to JSON. + * Converts this SparkSQLDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @instance * @returns {Object.} JSON object */ - TeradataDialect.prototype.toJSON = function toJSON() { + SparkSQLDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TeradataDialect + * Gets the default type url for SparkSQLDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TeradataDialect + * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TeradataDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SparkSQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TeradataDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SparkSQLDialect"; }; - /** - * Mode enum. - * @name google.cloud.bigquery.migration.v2.TeradataDialect.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} SQL=1 SQL value - * @property {number} BTEQ=2 BTEQ value - */ - TeradataDialect.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "SQL"] = 1; - values[valuesById[2] = "BTEQ"] = 2; - return values; - })(); - - return TeradataDialect; + return SparkSQLDialect; })(); - v2.OracleDialect = (function() { + v2.SnowflakeDialect = (function() { /** - * Properties of an OracleDialect. + * Properties of a SnowflakeDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IOracleDialect + * @interface ISnowflakeDialect */ /** - * Constructs a new OracleDialect. + * Constructs a new SnowflakeDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an OracleDialect. - * @implements IOracleDialect + * @classdesc Represents a SnowflakeDialect. + * @implements ISnowflakeDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IOracleDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect=} [properties] Properties to set */ - function OracleDialect(properties) { + function SnowflakeDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6210,60 +7159,60 @@ } /** - * Creates a new OracleDialect instance using the specified properties. + * Creates a new SnowflakeDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static - * @param {google.cloud.bigquery.migration.v2.IOracleDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect instance + * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect instance */ - OracleDialect.create = function create(properties) { - return new OracleDialect(properties); + SnowflakeDialect.create = function create(properties) { + return new SnowflakeDialect(properties); }; /** - * Encodes the specified OracleDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.OracleDialect.verify|verify} messages. + * Encodes the specified SnowflakeDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SnowflakeDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static - * @param {google.cloud.bigquery.migration.v2.IOracleDialect} message OracleDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect} message SnowflakeDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OracleDialect.encode = function encode(message, writer) { + SnowflakeDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified OracleDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.OracleDialect.verify|verify} messages. + * Encodes the specified SnowflakeDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SnowflakeDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static - * @param {google.cloud.bigquery.migration.v2.IOracleDialect} message OracleDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect} message SnowflakeDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - OracleDialect.encodeDelimited = function encodeDelimited(message, writer) { + SnowflakeDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an OracleDialect message from the specified reader or buffer. + * Decodes a SnowflakeDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect + * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OracleDialect.decode = function decode(reader, length, error) { + SnowflakeDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.OracleDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SnowflakeDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -6278,108 +7227,108 @@ }; /** - * Decodes an OracleDialect message from the specified reader or buffer, length delimited. + * Decodes a SnowflakeDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect + * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - OracleDialect.decodeDelimited = function decodeDelimited(reader) { + SnowflakeDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an OracleDialect message. + * Verifies a SnowflakeDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - OracleDialect.verify = function verify(message) { + SnowflakeDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates an OracleDialect message from a plain object. Also converts values to their respective internal types. + * Creates a SnowflakeDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.OracleDialect} OracleDialect + * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect */ - OracleDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.OracleDialect) + SnowflakeDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SnowflakeDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.OracleDialect(); + return new $root.google.cloud.bigquery.migration.v2.SnowflakeDialect(); }; /** - * Creates a plain object from an OracleDialect message. Also converts values to other types if specified. + * Creates a plain object from a SnowflakeDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static - * @param {google.cloud.bigquery.migration.v2.OracleDialect} message OracleDialect + * @param {google.cloud.bigquery.migration.v2.SnowflakeDialect} message SnowflakeDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - OracleDialect.toObject = function toObject() { + SnowflakeDialect.toObject = function toObject() { return {}; }; /** - * Converts this OracleDialect to JSON. + * Converts this SnowflakeDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @instance * @returns {Object.} JSON object */ - OracleDialect.prototype.toJSON = function toJSON() { + SnowflakeDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for OracleDialect + * Gets the default type url for SnowflakeDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.OracleDialect + * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - OracleDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SnowflakeDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.OracleDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SnowflakeDialect"; }; - return OracleDialect; + return SnowflakeDialect; })(); - v2.SparkSQLDialect = (function() { + v2.NetezzaDialect = (function() { /** - * Properties of a SparkSQLDialect. + * Properties of a NetezzaDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface ISparkSQLDialect + * @interface INetezzaDialect */ /** - * Constructs a new SparkSQLDialect. + * Constructs a new NetezzaDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SparkSQLDialect. - * @implements ISparkSQLDialect + * @classdesc Represents a NetezzaDialect. + * @implements INetezzaDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.INetezzaDialect=} [properties] Properties to set */ - function SparkSQLDialect(properties) { + function NetezzaDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6387,60 +7336,60 @@ } /** - * Creates a new SparkSQLDialect instance using the specified properties. + * Creates a new NetezzaDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect instance + * @param {google.cloud.bigquery.migration.v2.INetezzaDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect instance */ - SparkSQLDialect.create = function create(properties) { - return new SparkSQLDialect(properties); + NetezzaDialect.create = function create(properties) { + return new NetezzaDialect(properties); }; /** - * Encodes the specified SparkSQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SparkSQLDialect.verify|verify} messages. + * Encodes the specified NetezzaDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NetezzaDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect} message SparkSQLDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.INetezzaDialect} message NetezzaDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SparkSQLDialect.encode = function encode(message, writer) { + NetezzaDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified SparkSQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SparkSQLDialect.verify|verify} messages. + * Encodes the specified NetezzaDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NetezzaDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISparkSQLDialect} message SparkSQLDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.INetezzaDialect} message NetezzaDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SparkSQLDialect.encodeDelimited = function encodeDelimited(message, writer) { + NetezzaDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SparkSQLDialect message from the specified reader or buffer. + * Decodes a NetezzaDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect + * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SparkSQLDialect.decode = function decode(reader, length, error) { + NetezzaDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SparkSQLDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.NetezzaDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -6455,108 +7404,108 @@ }; /** - * Decodes a SparkSQLDialect message from the specified reader or buffer, length delimited. + * Decodes a NetezzaDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect + * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SparkSQLDialect.decodeDelimited = function decodeDelimited(reader) { + NetezzaDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SparkSQLDialect message. + * Verifies a NetezzaDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SparkSQLDialect.verify = function verify(message) { + NetezzaDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a SparkSQLDialect message from a plain object. Also converts values to their respective internal types. + * Creates a NetezzaDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SparkSQLDialect} SparkSQLDialect + * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect */ - SparkSQLDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SparkSQLDialect) + NetezzaDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.NetezzaDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.SparkSQLDialect(); + return new $root.google.cloud.bigquery.migration.v2.NetezzaDialect(); }; /** - * Creates a plain object from a SparkSQLDialect message. Also converts values to other types if specified. + * Creates a plain object from a NetezzaDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static - * @param {google.cloud.bigquery.migration.v2.SparkSQLDialect} message SparkSQLDialect + * @param {google.cloud.bigquery.migration.v2.NetezzaDialect} message NetezzaDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SparkSQLDialect.toObject = function toObject() { + NetezzaDialect.toObject = function toObject() { return {}; }; /** - * Converts this SparkSQLDialect to JSON. + * Converts this NetezzaDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @instance * @returns {Object.} JSON object */ - SparkSQLDialect.prototype.toJSON = function toJSON() { + NetezzaDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SparkSQLDialect + * Gets the default type url for NetezzaDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SparkSQLDialect + * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SparkSQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NetezzaDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SparkSQLDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NetezzaDialect"; }; - return SparkSQLDialect; + return NetezzaDialect; })(); - v2.SnowflakeDialect = (function() { + v2.AzureSynapseDialect = (function() { /** - * Properties of a SnowflakeDialect. + * Properties of an AzureSynapseDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface ISnowflakeDialect + * @interface IAzureSynapseDialect */ /** - * Constructs a new SnowflakeDialect. + * Constructs a new AzureSynapseDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SnowflakeDialect. - * @implements ISnowflakeDialect + * @classdesc Represents an AzureSynapseDialect. + * @implements IAzureSynapseDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect=} [properties] Properties to set */ - function SnowflakeDialect(properties) { + function AzureSynapseDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6564,60 +7513,60 @@ } /** - * Creates a new SnowflakeDialect instance using the specified properties. + * Creates a new AzureSynapseDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect instance + * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect instance */ - SnowflakeDialect.create = function create(properties) { - return new SnowflakeDialect(properties); + AzureSynapseDialect.create = function create(properties) { + return new AzureSynapseDialect(properties); }; /** - * Encodes the specified SnowflakeDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SnowflakeDialect.verify|verify} messages. + * Encodes the specified AzureSynapseDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AzureSynapseDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect} message SnowflakeDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect} message AzureSynapseDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SnowflakeDialect.encode = function encode(message, writer) { + AzureSynapseDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified SnowflakeDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SnowflakeDialect.verify|verify} messages. + * Encodes the specified AzureSynapseDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AzureSynapseDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISnowflakeDialect} message SnowflakeDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect} message AzureSynapseDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SnowflakeDialect.encodeDelimited = function encodeDelimited(message, writer) { + AzureSynapseDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SnowflakeDialect message from the specified reader or buffer. + * Decodes an AzureSynapseDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect + * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SnowflakeDialect.decode = function decode(reader, length, error) { + AzureSynapseDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SnowflakeDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -6632,108 +7581,108 @@ }; /** - * Decodes a SnowflakeDialect message from the specified reader or buffer, length delimited. + * Decodes an AzureSynapseDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect + * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SnowflakeDialect.decodeDelimited = function decodeDelimited(reader) { + AzureSynapseDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SnowflakeDialect message. + * Verifies an AzureSynapseDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SnowflakeDialect.verify = function verify(message) { + AzureSynapseDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a SnowflakeDialect message from a plain object. Also converts values to their respective internal types. + * Creates an AzureSynapseDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SnowflakeDialect} SnowflakeDialect + * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect */ - SnowflakeDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SnowflakeDialect) + AzureSynapseDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.SnowflakeDialect(); + return new $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect(); }; /** - * Creates a plain object from a SnowflakeDialect message. Also converts values to other types if specified. + * Creates a plain object from an AzureSynapseDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static - * @param {google.cloud.bigquery.migration.v2.SnowflakeDialect} message SnowflakeDialect + * @param {google.cloud.bigquery.migration.v2.AzureSynapseDialect} message AzureSynapseDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SnowflakeDialect.toObject = function toObject() { + AzureSynapseDialect.toObject = function toObject() { return {}; }; /** - * Converts this SnowflakeDialect to JSON. + * Converts this AzureSynapseDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @instance * @returns {Object.} JSON object */ - SnowflakeDialect.prototype.toJSON = function toJSON() { + AzureSynapseDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SnowflakeDialect + * Gets the default type url for AzureSynapseDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SnowflakeDialect + * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SnowflakeDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AzureSynapseDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SnowflakeDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.AzureSynapseDialect"; }; - return SnowflakeDialect; + return AzureSynapseDialect; })(); - v2.NetezzaDialect = (function() { + v2.VerticaDialect = (function() { /** - * Properties of a NetezzaDialect. + * Properties of a VerticaDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface INetezzaDialect + * @interface IVerticaDialect */ /** - * Constructs a new NetezzaDialect. + * Constructs a new VerticaDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a NetezzaDialect. - * @implements INetezzaDialect + * @classdesc Represents a VerticaDialect. + * @implements IVerticaDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.INetezzaDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IVerticaDialect=} [properties] Properties to set */ - function NetezzaDialect(properties) { + function VerticaDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6741,60 +7690,60 @@ } /** - * Creates a new NetezzaDialect instance using the specified properties. + * Creates a new VerticaDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static - * @param {google.cloud.bigquery.migration.v2.INetezzaDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect instance + * @param {google.cloud.bigquery.migration.v2.IVerticaDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect instance */ - NetezzaDialect.create = function create(properties) { - return new NetezzaDialect(properties); + VerticaDialect.create = function create(properties) { + return new VerticaDialect(properties); }; /** - * Encodes the specified NetezzaDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NetezzaDialect.verify|verify} messages. + * Encodes the specified VerticaDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.VerticaDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static - * @param {google.cloud.bigquery.migration.v2.INetezzaDialect} message NetezzaDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IVerticaDialect} message VerticaDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NetezzaDialect.encode = function encode(message, writer) { + VerticaDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified NetezzaDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NetezzaDialect.verify|verify} messages. + * Encodes the specified VerticaDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.VerticaDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static - * @param {google.cloud.bigquery.migration.v2.INetezzaDialect} message NetezzaDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IVerticaDialect} message VerticaDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NetezzaDialect.encodeDelimited = function encodeDelimited(message, writer) { + VerticaDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NetezzaDialect message from the specified reader or buffer. + * Decodes a VerticaDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect + * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NetezzaDialect.decode = function decode(reader, length, error) { + VerticaDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.NetezzaDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.VerticaDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -6809,108 +7758,108 @@ }; /** - * Decodes a NetezzaDialect message from the specified reader or buffer, length delimited. + * Decodes a VerticaDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect + * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NetezzaDialect.decodeDelimited = function decodeDelimited(reader) { + VerticaDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NetezzaDialect message. + * Verifies a VerticaDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NetezzaDialect.verify = function verify(message) { + VerticaDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a NetezzaDialect message from a plain object. Also converts values to their respective internal types. + * Creates a VerticaDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.NetezzaDialect} NetezzaDialect + * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect */ - NetezzaDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.NetezzaDialect) + VerticaDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.VerticaDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.NetezzaDialect(); + return new $root.google.cloud.bigquery.migration.v2.VerticaDialect(); }; /** - * Creates a plain object from a NetezzaDialect message. Also converts values to other types if specified. + * Creates a plain object from a VerticaDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static - * @param {google.cloud.bigquery.migration.v2.NetezzaDialect} message NetezzaDialect + * @param {google.cloud.bigquery.migration.v2.VerticaDialect} message VerticaDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NetezzaDialect.toObject = function toObject() { + VerticaDialect.toObject = function toObject() { return {}; }; /** - * Converts this NetezzaDialect to JSON. + * Converts this VerticaDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @instance * @returns {Object.} JSON object */ - NetezzaDialect.prototype.toJSON = function toJSON() { + VerticaDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NetezzaDialect + * Gets the default type url for VerticaDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.NetezzaDialect + * @memberof google.cloud.bigquery.migration.v2.VerticaDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NetezzaDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + VerticaDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NetezzaDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.VerticaDialect"; }; - return NetezzaDialect; + return VerticaDialect; })(); - v2.AzureSynapseDialect = (function() { + v2.SQLServerDialect = (function() { /** - * Properties of an AzureSynapseDialect. + * Properties of a SQLServerDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IAzureSynapseDialect + * @interface ISQLServerDialect */ /** - * Constructs a new AzureSynapseDialect. + * Constructs a new SQLServerDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an AzureSynapseDialect. - * @implements IAzureSynapseDialect + * @classdesc Represents a SQLServerDialect. + * @implements ISQLServerDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect=} [properties] Properties to set */ - function AzureSynapseDialect(properties) { + function SQLServerDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6918,60 +7867,60 @@ } /** - * Creates a new AzureSynapseDialect instance using the specified properties. + * Creates a new SQLServerDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static - * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect instance + * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect instance */ - AzureSynapseDialect.create = function create(properties) { - return new AzureSynapseDialect(properties); + SQLServerDialect.create = function create(properties) { + return new SQLServerDialect(properties); }; /** - * Encodes the specified AzureSynapseDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.AzureSynapseDialect.verify|verify} messages. + * Encodes the specified SQLServerDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLServerDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static - * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect} message AzureSynapseDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect} message SQLServerDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureSynapseDialect.encode = function encode(message, writer) { + SQLServerDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified AzureSynapseDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.AzureSynapseDialect.verify|verify} messages. + * Encodes the specified SQLServerDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLServerDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static - * @param {google.cloud.bigquery.migration.v2.IAzureSynapseDialect} message AzureSynapseDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect} message SQLServerDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - AzureSynapseDialect.encodeDelimited = function encodeDelimited(message, writer) { + SQLServerDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an AzureSynapseDialect message from the specified reader or buffer. + * Decodes a SQLServerDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect + * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureSynapseDialect.decode = function decode(reader, length, error) { + SQLServerDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SQLServerDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -6986,108 +7935,108 @@ }; /** - * Decodes an AzureSynapseDialect message from the specified reader or buffer, length delimited. + * Decodes a SQLServerDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect + * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - AzureSynapseDialect.decodeDelimited = function decodeDelimited(reader) { + SQLServerDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an AzureSynapseDialect message. + * Verifies a SQLServerDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - AzureSynapseDialect.verify = function verify(message) { + SQLServerDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates an AzureSynapseDialect message from a plain object. Also converts values to their respective internal types. + * Creates a SQLServerDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.AzureSynapseDialect} AzureSynapseDialect + * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect */ - AzureSynapseDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect) + SQLServerDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SQLServerDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.AzureSynapseDialect(); + return new $root.google.cloud.bigquery.migration.v2.SQLServerDialect(); }; /** - * Creates a plain object from an AzureSynapseDialect message. Also converts values to other types if specified. + * Creates a plain object from a SQLServerDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static - * @param {google.cloud.bigquery.migration.v2.AzureSynapseDialect} message AzureSynapseDialect + * @param {google.cloud.bigquery.migration.v2.SQLServerDialect} message SQLServerDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - AzureSynapseDialect.toObject = function toObject() { + SQLServerDialect.toObject = function toObject() { return {}; }; /** - * Converts this AzureSynapseDialect to JSON. + * Converts this SQLServerDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @instance * @returns {Object.} JSON object */ - AzureSynapseDialect.prototype.toJSON = function toJSON() { + SQLServerDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for AzureSynapseDialect + * Gets the default type url for SQLServerDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.AzureSynapseDialect + * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - AzureSynapseDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SQLServerDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.AzureSynapseDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SQLServerDialect"; }; - return AzureSynapseDialect; + return SQLServerDialect; })(); - v2.VerticaDialect = (function() { + v2.PostgresqlDialect = (function() { /** - * Properties of a VerticaDialect. + * Properties of a PostgresqlDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IVerticaDialect + * @interface IPostgresqlDialect */ /** - * Constructs a new VerticaDialect. + * Constructs a new PostgresqlDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a VerticaDialect. - * @implements IVerticaDialect + * @classdesc Represents a PostgresqlDialect. + * @implements IPostgresqlDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IVerticaDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect=} [properties] Properties to set */ - function VerticaDialect(properties) { + function PostgresqlDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7095,60 +8044,60 @@ } /** - * Creates a new VerticaDialect instance using the specified properties. + * Creates a new PostgresqlDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static - * @param {google.cloud.bigquery.migration.v2.IVerticaDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect instance + * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect instance */ - VerticaDialect.create = function create(properties) { - return new VerticaDialect(properties); + PostgresqlDialect.create = function create(properties) { + return new PostgresqlDialect(properties); }; /** - * Encodes the specified VerticaDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.VerticaDialect.verify|verify} messages. + * Encodes the specified PostgresqlDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.PostgresqlDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static - * @param {google.cloud.bigquery.migration.v2.IVerticaDialect} message VerticaDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect} message PostgresqlDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerticaDialect.encode = function encode(message, writer) { + PostgresqlDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified VerticaDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.VerticaDialect.verify|verify} messages. + * Encodes the specified PostgresqlDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PostgresqlDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static - * @param {google.cloud.bigquery.migration.v2.IVerticaDialect} message VerticaDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect} message PostgresqlDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - VerticaDialect.encodeDelimited = function encodeDelimited(message, writer) { + PostgresqlDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a VerticaDialect message from the specified reader or buffer. + * Decodes a PostgresqlDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect + * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VerticaDialect.decode = function decode(reader, length, error) { + PostgresqlDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.VerticaDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.PostgresqlDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -7163,108 +8112,108 @@ }; /** - * Decodes a VerticaDialect message from the specified reader or buffer, length delimited. + * Decodes a PostgresqlDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect + * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - VerticaDialect.decodeDelimited = function decodeDelimited(reader) { + PostgresqlDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a VerticaDialect message. + * Verifies a PostgresqlDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - VerticaDialect.verify = function verify(message) { + PostgresqlDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a VerticaDialect message from a plain object. Also converts values to their respective internal types. + * Creates a PostgresqlDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.VerticaDialect} VerticaDialect + * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect */ - VerticaDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.VerticaDialect) + PostgresqlDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.PostgresqlDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.VerticaDialect(); + return new $root.google.cloud.bigquery.migration.v2.PostgresqlDialect(); }; /** - * Creates a plain object from a VerticaDialect message. Also converts values to other types if specified. + * Creates a plain object from a PostgresqlDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static - * @param {google.cloud.bigquery.migration.v2.VerticaDialect} message VerticaDialect + * @param {google.cloud.bigquery.migration.v2.PostgresqlDialect} message PostgresqlDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - VerticaDialect.toObject = function toObject() { + PostgresqlDialect.toObject = function toObject() { return {}; }; /** - * Converts this VerticaDialect to JSON. + * Converts this PostgresqlDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @instance * @returns {Object.} JSON object */ - VerticaDialect.prototype.toJSON = function toJSON() { + PostgresqlDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for VerticaDialect + * Gets the default type url for PostgresqlDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.VerticaDialect + * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - VerticaDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PostgresqlDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.VerticaDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.PostgresqlDialect"; }; - return VerticaDialect; + return PostgresqlDialect; })(); - v2.SQLServerDialect = (function() { + v2.PrestoDialect = (function() { /** - * Properties of a SQLServerDialect. + * Properties of a PrestoDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface ISQLServerDialect + * @interface IPrestoDialect */ /** - * Constructs a new SQLServerDialect. + * Constructs a new PrestoDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SQLServerDialect. - * @implements ISQLServerDialect + * @classdesc Represents a PrestoDialect. + * @implements IPrestoDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IPrestoDialect=} [properties] Properties to set */ - function SQLServerDialect(properties) { + function PrestoDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7272,60 +8221,60 @@ } /** - * Creates a new SQLServerDialect instance using the specified properties. + * Creates a new PrestoDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect instance + * @param {google.cloud.bigquery.migration.v2.IPrestoDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect instance */ - SQLServerDialect.create = function create(properties) { - return new SQLServerDialect(properties); + PrestoDialect.create = function create(properties) { + return new PrestoDialect(properties); }; /** - * Encodes the specified SQLServerDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLServerDialect.verify|verify} messages. + * Encodes the specified PrestoDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.PrestoDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect} message SQLServerDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IPrestoDialect} message PrestoDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SQLServerDialect.encode = function encode(message, writer) { + PrestoDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified SQLServerDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLServerDialect.verify|verify} messages. + * Encodes the specified PrestoDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PrestoDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static - * @param {google.cloud.bigquery.migration.v2.ISQLServerDialect} message SQLServerDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IPrestoDialect} message PrestoDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SQLServerDialect.encodeDelimited = function encodeDelimited(message, writer) { + PrestoDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SQLServerDialect message from the specified reader or buffer. + * Decodes a PrestoDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect + * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SQLServerDialect.decode = function decode(reader, length, error) { + PrestoDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SQLServerDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.PrestoDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -7340,108 +8289,108 @@ }; /** - * Decodes a SQLServerDialect message from the specified reader or buffer, length delimited. + * Decodes a PrestoDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect + * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SQLServerDialect.decodeDelimited = function decodeDelimited(reader) { + PrestoDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SQLServerDialect message. + * Verifies a PrestoDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SQLServerDialect.verify = function verify(message) { + PrestoDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a SQLServerDialect message from a plain object. Also converts values to their respective internal types. + * Creates a PrestoDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SQLServerDialect} SQLServerDialect + * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect */ - SQLServerDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SQLServerDialect) + PrestoDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.PrestoDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.SQLServerDialect(); + return new $root.google.cloud.bigquery.migration.v2.PrestoDialect(); }; /** - * Creates a plain object from a SQLServerDialect message. Also converts values to other types if specified. + * Creates a plain object from a PrestoDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static - * @param {google.cloud.bigquery.migration.v2.SQLServerDialect} message SQLServerDialect + * @param {google.cloud.bigquery.migration.v2.PrestoDialect} message PrestoDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SQLServerDialect.toObject = function toObject() { + PrestoDialect.toObject = function toObject() { return {}; }; /** - * Converts this SQLServerDialect to JSON. + * Converts this PrestoDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @instance * @returns {Object.} JSON object */ - SQLServerDialect.prototype.toJSON = function toJSON() { + PrestoDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SQLServerDialect + * Gets the default type url for PrestoDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SQLServerDialect + * @memberof google.cloud.bigquery.migration.v2.PrestoDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SQLServerDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PrestoDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SQLServerDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.PrestoDialect"; }; - return SQLServerDialect; + return PrestoDialect; })(); - v2.PostgresqlDialect = (function() { + v2.MySQLDialect = (function() { /** - * Properties of a PostgresqlDialect. + * Properties of a MySQLDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IPostgresqlDialect + * @interface IMySQLDialect */ /** - * Constructs a new PostgresqlDialect. + * Constructs a new MySQLDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a PostgresqlDialect. - * @implements IPostgresqlDialect + * @classdesc Represents a MySQLDialect. + * @implements IMySQLDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IMySQLDialect=} [properties] Properties to set */ - function PostgresqlDialect(properties) { + function MySQLDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7449,60 +8398,60 @@ } /** - * Creates a new PostgresqlDialect instance using the specified properties. + * Creates a new MySQLDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect instance + * @param {google.cloud.bigquery.migration.v2.IMySQLDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect instance */ - PostgresqlDialect.create = function create(properties) { - return new PostgresqlDialect(properties); + MySQLDialect.create = function create(properties) { + return new MySQLDialect(properties); }; /** - * Encodes the specified PostgresqlDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.PostgresqlDialect.verify|verify} messages. + * Encodes the specified MySQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MySQLDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect} message PostgresqlDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMySQLDialect} message MySQLDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PostgresqlDialect.encode = function encode(message, writer) { + MySQLDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified PostgresqlDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PostgresqlDialect.verify|verify} messages. + * Encodes the specified MySQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MySQLDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.IPostgresqlDialect} message PostgresqlDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IMySQLDialect} message MySQLDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PostgresqlDialect.encodeDelimited = function encodeDelimited(message, writer) { + MySQLDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PostgresqlDialect message from the specified reader or buffer. + * Decodes a MySQLDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect + * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PostgresqlDialect.decode = function decode(reader, length, error) { + MySQLDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.PostgresqlDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MySQLDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -7517,108 +8466,108 @@ }; /** - * Decodes a PostgresqlDialect message from the specified reader or buffer, length delimited. + * Decodes a MySQLDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect + * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PostgresqlDialect.decodeDelimited = function decodeDelimited(reader) { + MySQLDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PostgresqlDialect message. + * Verifies a MySQLDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PostgresqlDialect.verify = function verify(message) { + MySQLDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a PostgresqlDialect message from a plain object. Also converts values to their respective internal types. + * Creates a MySQLDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.PostgresqlDialect} PostgresqlDialect + * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect */ - PostgresqlDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.PostgresqlDialect) + MySQLDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.MySQLDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.PostgresqlDialect(); + return new $root.google.cloud.bigquery.migration.v2.MySQLDialect(); }; /** - * Creates a plain object from a PostgresqlDialect message. Also converts values to other types if specified. + * Creates a plain object from a MySQLDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static - * @param {google.cloud.bigquery.migration.v2.PostgresqlDialect} message PostgresqlDialect + * @param {google.cloud.bigquery.migration.v2.MySQLDialect} message MySQLDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PostgresqlDialect.toObject = function toObject() { + MySQLDialect.toObject = function toObject() { return {}; }; /** - * Converts this PostgresqlDialect to JSON. + * Converts this MySQLDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @instance * @returns {Object.} JSON object */ - PostgresqlDialect.prototype.toJSON = function toJSON() { + MySQLDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PostgresqlDialect + * Gets the default type url for MySQLDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.PostgresqlDialect + * @memberof google.cloud.bigquery.migration.v2.MySQLDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PostgresqlDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MySQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.PostgresqlDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MySQLDialect"; }; - return PostgresqlDialect; + return MySQLDialect; })(); - v2.PrestoDialect = (function() { + v2.DB2Dialect = (function() { /** - * Properties of a PrestoDialect. + * Properties of a DB2Dialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IPrestoDialect + * @interface IDB2Dialect */ /** - * Constructs a new PrestoDialect. + * Constructs a new DB2Dialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a PrestoDialect. - * @implements IPrestoDialect + * @classdesc Represents a DB2Dialect. + * @implements IDB2Dialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IPrestoDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IDB2Dialect=} [properties] Properties to set */ - function PrestoDialect(properties) { + function DB2Dialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7626,60 +8575,60 @@ } /** - * Creates a new PrestoDialect instance using the specified properties. + * Creates a new DB2Dialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static - * @param {google.cloud.bigquery.migration.v2.IPrestoDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect instance + * @param {google.cloud.bigquery.migration.v2.IDB2Dialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect instance */ - PrestoDialect.create = function create(properties) { - return new PrestoDialect(properties); + DB2Dialect.create = function create(properties) { + return new DB2Dialect(properties); }; /** - * Encodes the specified PrestoDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.PrestoDialect.verify|verify} messages. + * Encodes the specified DB2Dialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.DB2Dialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static - * @param {google.cloud.bigquery.migration.v2.IPrestoDialect} message PrestoDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IDB2Dialect} message DB2Dialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrestoDialect.encode = function encode(message, writer) { + DB2Dialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified PrestoDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.PrestoDialect.verify|verify} messages. + * Encodes the specified DB2Dialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.DB2Dialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static - * @param {google.cloud.bigquery.migration.v2.IPrestoDialect} message PrestoDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IDB2Dialect} message DB2Dialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PrestoDialect.encodeDelimited = function encodeDelimited(message, writer) { + DB2Dialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PrestoDialect message from the specified reader or buffer. + * Decodes a DB2Dialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect + * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrestoDialect.decode = function decode(reader, length, error) { + DB2Dialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.PrestoDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.DB2Dialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -7694,108 +8643,108 @@ }; /** - * Decodes a PrestoDialect message from the specified reader or buffer, length delimited. + * Decodes a DB2Dialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect + * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PrestoDialect.decodeDelimited = function decodeDelimited(reader) { + DB2Dialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PrestoDialect message. + * Verifies a DB2Dialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PrestoDialect.verify = function verify(message) { + DB2Dialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a PrestoDialect message from a plain object. Also converts values to their respective internal types. + * Creates a DB2Dialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.PrestoDialect} PrestoDialect + * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect */ - PrestoDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.PrestoDialect) + DB2Dialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.DB2Dialect) return object; - return new $root.google.cloud.bigquery.migration.v2.PrestoDialect(); + return new $root.google.cloud.bigquery.migration.v2.DB2Dialect(); }; /** - * Creates a plain object from a PrestoDialect message. Also converts values to other types if specified. + * Creates a plain object from a DB2Dialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static - * @param {google.cloud.bigquery.migration.v2.PrestoDialect} message PrestoDialect + * @param {google.cloud.bigquery.migration.v2.DB2Dialect} message DB2Dialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PrestoDialect.toObject = function toObject() { + DB2Dialect.toObject = function toObject() { return {}; }; /** - * Converts this PrestoDialect to JSON. + * Converts this DB2Dialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @instance * @returns {Object.} JSON object */ - PrestoDialect.prototype.toJSON = function toJSON() { + DB2Dialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PrestoDialect + * Gets the default type url for DB2Dialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.PrestoDialect + * @memberof google.cloud.bigquery.migration.v2.DB2Dialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PrestoDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DB2Dialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.PrestoDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.DB2Dialect"; }; - return PrestoDialect; + return DB2Dialect; })(); - v2.MySQLDialect = (function() { + v2.SQLiteDialect = (function() { /** - * Properties of a MySQLDialect. + * Properties of a SQLiteDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IMySQLDialect + * @interface ISQLiteDialect */ /** - * Constructs a new MySQLDialect. + * Constructs a new SQLiteDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a MySQLDialect. - * @implements IMySQLDialect + * @classdesc Represents a SQLiteDialect. + * @implements ISQLiteDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IMySQLDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect=} [properties] Properties to set */ - function MySQLDialect(properties) { + function SQLiteDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7803,60 +8752,60 @@ } /** - * Creates a new MySQLDialect instance using the specified properties. + * Creates a new SQLiteDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static - * @param {google.cloud.bigquery.migration.v2.IMySQLDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect instance + * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect instance */ - MySQLDialect.create = function create(properties) { - return new MySQLDialect(properties); + SQLiteDialect.create = function create(properties) { + return new SQLiteDialect(properties); }; /** - * Encodes the specified MySQLDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.MySQLDialect.verify|verify} messages. + * Encodes the specified SQLiteDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLiteDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static - * @param {google.cloud.bigquery.migration.v2.IMySQLDialect} message MySQLDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect} message SQLiteDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MySQLDialect.encode = function encode(message, writer) { + SQLiteDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified MySQLDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.MySQLDialect.verify|verify} messages. + * Encodes the specified SQLiteDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLiteDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static - * @param {google.cloud.bigquery.migration.v2.IMySQLDialect} message MySQLDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect} message SQLiteDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MySQLDialect.encodeDelimited = function encodeDelimited(message, writer) { + SQLiteDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MySQLDialect message from the specified reader or buffer. + * Decodes a SQLiteDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect + * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MySQLDialect.decode = function decode(reader, length, error) { + SQLiteDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.MySQLDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SQLiteDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -7871,108 +8820,108 @@ }; /** - * Decodes a MySQLDialect message from the specified reader or buffer, length delimited. + * Decodes a SQLiteDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect + * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - MySQLDialect.decodeDelimited = function decodeDelimited(reader) { + SQLiteDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MySQLDialect message. + * Verifies a SQLiteDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - MySQLDialect.verify = function verify(message) { + SQLiteDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a MySQLDialect message from a plain object. Also converts values to their respective internal types. + * Creates a SQLiteDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.MySQLDialect} MySQLDialect + * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect */ - MySQLDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.MySQLDialect) + SQLiteDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SQLiteDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.MySQLDialect(); + return new $root.google.cloud.bigquery.migration.v2.SQLiteDialect(); }; /** - * Creates a plain object from a MySQLDialect message. Also converts values to other types if specified. + * Creates a plain object from a SQLiteDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static - * @param {google.cloud.bigquery.migration.v2.MySQLDialect} message MySQLDialect + * @param {google.cloud.bigquery.migration.v2.SQLiteDialect} message SQLiteDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MySQLDialect.toObject = function toObject() { + SQLiteDialect.toObject = function toObject() { return {}; }; /** - * Converts this MySQLDialect to JSON. + * Converts this SQLiteDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @instance * @returns {Object.} JSON object */ - MySQLDialect.prototype.toJSON = function toJSON() { + SQLiteDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MySQLDialect + * Gets the default type url for SQLiteDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.MySQLDialect + * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MySQLDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SQLiteDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.MySQLDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SQLiteDialect"; }; - return MySQLDialect; + return SQLiteDialect; })(); - v2.DB2Dialect = (function() { + v2.GreenplumDialect = (function() { /** - * Properties of a DB2Dialect. + * Properties of a GreenplumDialect. * @memberof google.cloud.bigquery.migration.v2 - * @interface IDB2Dialect + * @interface IGreenplumDialect */ /** - * Constructs a new DB2Dialect. + * Constructs a new GreenplumDialect. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a DB2Dialect. - * @implements IDB2Dialect + * @classdesc Represents a GreenplumDialect. + * @implements IGreenplumDialect * @constructor - * @param {google.cloud.bigquery.migration.v2.IDB2Dialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect=} [properties] Properties to set */ - function DB2Dialect(properties) { + function GreenplumDialect(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -7980,60 +8929,60 @@ } /** - * Creates a new DB2Dialect instance using the specified properties. + * Creates a new GreenplumDialect instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static - * @param {google.cloud.bigquery.migration.v2.IDB2Dialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect instance + * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect instance */ - DB2Dialect.create = function create(properties) { - return new DB2Dialect(properties); + GreenplumDialect.create = function create(properties) { + return new GreenplumDialect(properties); }; /** - * Encodes the specified DB2Dialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.DB2Dialect.verify|verify} messages. + * Encodes the specified GreenplumDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.GreenplumDialect.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static - * @param {google.cloud.bigquery.migration.v2.IDB2Dialect} message DB2Dialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect} message GreenplumDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DB2Dialect.encode = function encode(message, writer) { + GreenplumDialect.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); return writer; }; /** - * Encodes the specified DB2Dialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.DB2Dialect.verify|verify} messages. + * Encodes the specified GreenplumDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.GreenplumDialect.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static - * @param {google.cloud.bigquery.migration.v2.IDB2Dialect} message DB2Dialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect} message GreenplumDialect message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DB2Dialect.encodeDelimited = function encodeDelimited(message, writer) { + GreenplumDialect.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DB2Dialect message from the specified reader or buffer. + * Decodes a GreenplumDialect message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect + * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DB2Dialect.decode = function decode(reader, length, error) { + GreenplumDialect.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.DB2Dialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.GreenplumDialect(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) @@ -8048,108 +8997,110 @@ }; /** - * Decodes a DB2Dialect message from the specified reader or buffer, length delimited. + * Decodes a GreenplumDialect message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect + * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DB2Dialect.decodeDelimited = function decodeDelimited(reader) { + GreenplumDialect.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DB2Dialect message. + * Verifies a GreenplumDialect message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DB2Dialect.verify = function verify(message) { + GreenplumDialect.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; return null; }; /** - * Creates a DB2Dialect message from a plain object. Also converts values to their respective internal types. + * Creates a GreenplumDialect message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.DB2Dialect} DB2Dialect + * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect */ - DB2Dialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.DB2Dialect) + GreenplumDialect.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.GreenplumDialect) return object; - return new $root.google.cloud.bigquery.migration.v2.DB2Dialect(); + return new $root.google.cloud.bigquery.migration.v2.GreenplumDialect(); }; /** - * Creates a plain object from a DB2Dialect message. Also converts values to other types if specified. + * Creates a plain object from a GreenplumDialect message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static - * @param {google.cloud.bigquery.migration.v2.DB2Dialect} message DB2Dialect + * @param {google.cloud.bigquery.migration.v2.GreenplumDialect} message GreenplumDialect * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DB2Dialect.toObject = function toObject() { + GreenplumDialect.toObject = function toObject() { return {}; }; /** - * Converts this DB2Dialect to JSON. + * Converts this GreenplumDialect to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @instance * @returns {Object.} JSON object */ - DB2Dialect.prototype.toJSON = function toJSON() { + GreenplumDialect.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DB2Dialect + * Gets the default type url for GreenplumDialect * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.DB2Dialect + * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DB2Dialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GreenplumDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.DB2Dialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.GreenplumDialect"; }; - return DB2Dialect; + return GreenplumDialect; })(); - v2.SQLiteDialect = (function() { + v2.ObjectNameMappingList = (function() { /** - * Properties of a SQLiteDialect. + * Properties of an ObjectNameMappingList. * @memberof google.cloud.bigquery.migration.v2 - * @interface ISQLiteDialect + * @interface IObjectNameMappingList + * @property {Array.|null} [nameMap] ObjectNameMappingList nameMap */ /** - * Constructs a new SQLiteDialect. + * Constructs a new ObjectNameMappingList. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SQLiteDialect. - * @implements ISQLiteDialect + * @classdesc Represents an ObjectNameMappingList. + * @implements IObjectNameMappingList * @constructor - * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList=} [properties] Properties to set */ - function SQLiteDialect(properties) { + function ObjectNameMappingList(properties) { + this.nameMap = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8157,65 +9108,82 @@ } /** - * Creates a new SQLiteDialect instance using the specified properties. + * ObjectNameMappingList nameMap. + * @member {Array.} nameMap + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @instance + */ + ObjectNameMappingList.prototype.nameMap = $util.emptyArray; + + /** + * Creates a new ObjectNameMappingList instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static - * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect instance + * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList instance */ - SQLiteDialect.create = function create(properties) { - return new SQLiteDialect(properties); + ObjectNameMappingList.create = function create(properties) { + return new ObjectNameMappingList(properties); }; /** - * Encodes the specified SQLiteDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLiteDialect.verify|verify} messages. + * Encodes the specified ObjectNameMappingList message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMappingList.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static - * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect} message SQLiteDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList} message ObjectNameMappingList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SQLiteDialect.encode = function encode(message, writer) { + ObjectNameMappingList.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.nameMap != null && message.nameMap.length) + for (var i = 0; i < message.nameMap.length; ++i) + $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.encode(message.nameMap[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SQLiteDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SQLiteDialect.verify|verify} messages. + * Encodes the specified ObjectNameMappingList message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMappingList.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static - * @param {google.cloud.bigquery.migration.v2.ISQLiteDialect} message SQLiteDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList} message ObjectNameMappingList message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SQLiteDialect.encodeDelimited = function encodeDelimited(message, writer) { + ObjectNameMappingList.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SQLiteDialect message from the specified reader or buffer. + * Decodes an ObjectNameMappingList message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SQLiteDialect.decode = function decode(reader, length, error) { + ObjectNameMappingList.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SQLiteDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + if (!(message.nameMap && message.nameMap.length)) + message.nameMap = []; + message.nameMap.push($root.google.cloud.bigquery.migration.v2.ObjectNameMapping.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -8225,174 +9193,234 @@ }; /** - * Decodes a SQLiteDialect message from the specified reader or buffer, length delimited. + * Decodes an ObjectNameMappingList message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SQLiteDialect.decodeDelimited = function decodeDelimited(reader) { + ObjectNameMappingList.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SQLiteDialect message. + * Verifies an ObjectNameMappingList message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SQLiteDialect.verify = function verify(message) { + ObjectNameMappingList.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.nameMap != null && message.hasOwnProperty("nameMap")) { + if (!Array.isArray(message.nameMap)) + return "nameMap: array expected"; + for (var i = 0; i < message.nameMap.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.verify(message.nameMap[i]); + if (error) + return "nameMap." + error; + } + } return null; }; /** - * Creates a SQLiteDialect message from a plain object. Also converts values to their respective internal types. + * Creates an ObjectNameMappingList message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SQLiteDialect} SQLiteDialect + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList */ - SQLiteDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SQLiteDialect) + ObjectNameMappingList.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList) return object; - return new $root.google.cloud.bigquery.migration.v2.SQLiteDialect(); + var message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList(); + if (object.nameMap) { + if (!Array.isArray(object.nameMap)) + throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMappingList.nameMap: array expected"); + message.nameMap = []; + for (var i = 0; i < object.nameMap.length; ++i) { + if (typeof object.nameMap[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMappingList.nameMap: object expected"); + message.nameMap[i] = $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.fromObject(object.nameMap[i]); + } + } + return message; }; /** - * Creates a plain object from a SQLiteDialect message. Also converts values to other types if specified. + * Creates a plain object from an ObjectNameMappingList message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static - * @param {google.cloud.bigquery.migration.v2.SQLiteDialect} message SQLiteDialect + * @param {google.cloud.bigquery.migration.v2.ObjectNameMappingList} message ObjectNameMappingList * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SQLiteDialect.toObject = function toObject() { - return {}; + ObjectNameMappingList.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.nameMap = []; + if (message.nameMap && message.nameMap.length) { + object.nameMap = []; + for (var j = 0; j < message.nameMap.length; ++j) + object.nameMap[j] = $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.toObject(message.nameMap[j], options); + } + return object; }; /** - * Converts this SQLiteDialect to JSON. + * Converts this ObjectNameMappingList to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @instance * @returns {Object.} JSON object */ - SQLiteDialect.prototype.toJSON = function toJSON() { + ObjectNameMappingList.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SQLiteDialect + * Gets the default type url for ObjectNameMappingList * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SQLiteDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SQLiteDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ObjectNameMappingList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SQLiteDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ObjectNameMappingList"; }; - return SQLiteDialect; + return ObjectNameMappingList; })(); - v2.GreenplumDialect = (function() { + v2.ObjectNameMapping = (function() { /** - * Properties of a GreenplumDialect. + * Properties of an ObjectNameMapping. * @memberof google.cloud.bigquery.migration.v2 - * @interface IGreenplumDialect + * @interface IObjectNameMapping + * @property {google.cloud.bigquery.migration.v2.INameMappingKey|null} [source] ObjectNameMapping source + * @property {google.cloud.bigquery.migration.v2.INameMappingValue|null} [target] ObjectNameMapping target */ /** - * Constructs a new GreenplumDialect. + * Constructs a new ObjectNameMapping. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a GreenplumDialect. - * @implements IGreenplumDialect + * @classdesc Represents an ObjectNameMapping. + * @implements IObjectNameMapping * @constructor - * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping=} [properties] Properties to set + */ + function ObjectNameMapping(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ObjectNameMapping source. + * @member {google.cloud.bigquery.migration.v2.INameMappingKey|null|undefined} source + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @instance + */ + ObjectNameMapping.prototype.source = null; + + /** + * ObjectNameMapping target. + * @member {google.cloud.bigquery.migration.v2.INameMappingValue|null|undefined} target + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @instance */ - function GreenplumDialect(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + ObjectNameMapping.prototype.target = null; /** - * Creates a new GreenplumDialect instance using the specified properties. + * Creates a new ObjectNameMapping instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static - * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect instance + * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping instance */ - GreenplumDialect.create = function create(properties) { - return new GreenplumDialect(properties); + ObjectNameMapping.create = function create(properties) { + return new ObjectNameMapping(properties); }; /** - * Encodes the specified GreenplumDialect message. Does not implicitly {@link google.cloud.bigquery.migration.v2.GreenplumDialect.verify|verify} messages. + * Encodes the specified ObjectNameMapping message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMapping.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static - * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect} message GreenplumDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping} message ObjectNameMapping message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GreenplumDialect.encode = function encode(message, writer) { + ObjectNameMapping.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.source != null && Object.hasOwnProperty.call(message, "source")) + $root.google.cloud.bigquery.migration.v2.NameMappingKey.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.target != null && Object.hasOwnProperty.call(message, "target")) + $root.google.cloud.bigquery.migration.v2.NameMappingValue.encode(message.target, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GreenplumDialect message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.GreenplumDialect.verify|verify} messages. + * Encodes the specified ObjectNameMapping message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMapping.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static - * @param {google.cloud.bigquery.migration.v2.IGreenplumDialect} message GreenplumDialect message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping} message ObjectNameMapping message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GreenplumDialect.encodeDelimited = function encodeDelimited(message, writer) { + ObjectNameMapping.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GreenplumDialect message from the specified reader or buffer. + * Decodes an ObjectNameMapping message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GreenplumDialect.decode = function decode(reader, length, error) { + ObjectNameMapping.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.GreenplumDialect(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMapping(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { + case 1: { + message.source = $root.google.cloud.bigquery.migration.v2.NameMappingKey.decode(reader, reader.uint32()); + break; + } + case 2: { + message.target = $root.google.cloud.bigquery.migration.v2.NameMappingValue.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -8402,110 +9430,145 @@ }; /** - * Decodes a GreenplumDialect message from the specified reader or buffer, length delimited. + * Decodes an ObjectNameMapping message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GreenplumDialect.decodeDelimited = function decodeDelimited(reader) { + ObjectNameMapping.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GreenplumDialect message. + * Verifies an ObjectNameMapping message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GreenplumDialect.verify = function verify(message) { + ObjectNameMapping.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.source != null && message.hasOwnProperty("source")) { + var error = $root.google.cloud.bigquery.migration.v2.NameMappingKey.verify(message.source); + if (error) + return "source." + error; + } + if (message.target != null && message.hasOwnProperty("target")) { + var error = $root.google.cloud.bigquery.migration.v2.NameMappingValue.verify(message.target); + if (error) + return "target." + error; + } return null; }; /** - * Creates a GreenplumDialect message from a plain object. Also converts values to their respective internal types. + * Creates an ObjectNameMapping message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.GreenplumDialect} GreenplumDialect + * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping */ - GreenplumDialect.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.GreenplumDialect) + ObjectNameMapping.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.ObjectNameMapping) return object; - return new $root.google.cloud.bigquery.migration.v2.GreenplumDialect(); + var message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMapping(); + if (object.source != null) { + if (typeof object.source !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMapping.source: object expected"); + message.source = $root.google.cloud.bigquery.migration.v2.NameMappingKey.fromObject(object.source); + } + if (object.target != null) { + if (typeof object.target !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMapping.target: object expected"); + message.target = $root.google.cloud.bigquery.migration.v2.NameMappingValue.fromObject(object.target); + } + return message; }; /** - * Creates a plain object from a GreenplumDialect message. Also converts values to other types if specified. + * Creates a plain object from an ObjectNameMapping message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static - * @param {google.cloud.bigquery.migration.v2.GreenplumDialect} message GreenplumDialect + * @param {google.cloud.bigquery.migration.v2.ObjectNameMapping} message ObjectNameMapping * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GreenplumDialect.toObject = function toObject() { - return {}; + ObjectNameMapping.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.source = null; + object.target = null; + } + if (message.source != null && message.hasOwnProperty("source")) + object.source = $root.google.cloud.bigquery.migration.v2.NameMappingKey.toObject(message.source, options); + if (message.target != null && message.hasOwnProperty("target")) + object.target = $root.google.cloud.bigquery.migration.v2.NameMappingValue.toObject(message.target, options); + return object; }; /** - * Converts this GreenplumDialect to JSON. + * Converts this ObjectNameMapping to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @instance * @returns {Object.} JSON object */ - GreenplumDialect.prototype.toJSON = function toJSON() { + ObjectNameMapping.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GreenplumDialect + * Gets the default type url for ObjectNameMapping * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.GreenplumDialect + * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GreenplumDialect.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ObjectNameMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.GreenplumDialect"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ObjectNameMapping"; }; - return GreenplumDialect; + return ObjectNameMapping; })(); - v2.ObjectNameMappingList = (function() { + v2.NameMappingKey = (function() { /** - * Properties of an ObjectNameMappingList. + * Properties of a NameMappingKey. * @memberof google.cloud.bigquery.migration.v2 - * @interface IObjectNameMappingList - * @property {Array.|null} [nameMap] ObjectNameMappingList nameMap + * @interface INameMappingKey + * @property {google.cloud.bigquery.migration.v2.NameMappingKey.Type|null} [type] NameMappingKey type + * @property {string|null} [database] NameMappingKey database + * @property {string|null} [schema] NameMappingKey schema + * @property {string|null} [relation] NameMappingKey relation + * @property {string|null} [attribute] NameMappingKey attribute */ /** - * Constructs a new ObjectNameMappingList. + * Constructs a new NameMappingKey. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an ObjectNameMappingList. - * @implements IObjectNameMappingList + * @classdesc Represents a NameMappingKey. + * @implements INameMappingKey * @constructor - * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.INameMappingKey=} [properties] Properties to set */ - function ObjectNameMappingList(properties) { - this.nameMap = []; + function NameMappingKey(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8513,80 +9576,133 @@ } /** - * ObjectNameMappingList nameMap. - * @member {Array.} nameMap - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * NameMappingKey type. + * @member {google.cloud.bigquery.migration.v2.NameMappingKey.Type} type + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @instance */ - ObjectNameMappingList.prototype.nameMap = $util.emptyArray; + NameMappingKey.prototype.type = 0; /** - * Creates a new ObjectNameMappingList instance using the specified properties. + * NameMappingKey database. + * @member {string} database + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @instance + */ + NameMappingKey.prototype.database = ""; + + /** + * NameMappingKey schema. + * @member {string} schema + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @instance + */ + NameMappingKey.prototype.schema = ""; + + /** + * NameMappingKey relation. + * @member {string} relation + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @instance + */ + NameMappingKey.prototype.relation = ""; + + /** + * NameMappingKey attribute. + * @member {string} attribute + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @instance + */ + NameMappingKey.prototype.attribute = ""; + + /** + * Creates a new NameMappingKey instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList instance + * @param {google.cloud.bigquery.migration.v2.INameMappingKey=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey instance */ - ObjectNameMappingList.create = function create(properties) { - return new ObjectNameMappingList(properties); + NameMappingKey.create = function create(properties) { + return new NameMappingKey(properties); }; /** - * Encodes the specified ObjectNameMappingList message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMappingList.verify|verify} messages. + * Encodes the specified NameMappingKey message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingKey.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList} message ObjectNameMappingList message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.INameMappingKey} message NameMappingKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectNameMappingList.encode = function encode(message, writer) { + NameMappingKey.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nameMap != null && message.nameMap.length) - for (var i = 0; i < message.nameMap.length; ++i) - $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.encode(message.nameMap[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.database); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.schema); + if (message.relation != null && Object.hasOwnProperty.call(message, "relation")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.relation); + if (message.attribute != null && Object.hasOwnProperty.call(message, "attribute")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.attribute); return writer; }; /** - * Encodes the specified ObjectNameMappingList message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMappingList.verify|verify} messages. + * Encodes the specified NameMappingKey message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingKey.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMappingList} message ObjectNameMappingList message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.INameMappingKey} message NameMappingKey message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectNameMappingList.encodeDelimited = function encodeDelimited(message, writer) { + NameMappingKey.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ObjectNameMappingList message from the specified reader or buffer. + * Decodes a NameMappingKey message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList + * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ObjectNameMappingList.decode = function decode(reader, length, error) { + NameMappingKey.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.NameMappingKey(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.nameMap && message.nameMap.length)) - message.nameMap = []; - message.nameMap.push($root.google.cloud.bigquery.migration.v2.ObjectNameMapping.decode(reader, reader.uint32())); + message.type = reader.int32(); + break; + } + case 2: { + message.database = reader.string(); + break; + } + case 3: { + message.schema = reader.string(); + break; + } + case 4: { + message.relation = reader.string(); + break; + } + case 5: { + message.attribute = reader.string(); break; } default: @@ -8598,140 +9714,233 @@ }; /** - * Decodes an ObjectNameMappingList message from the specified reader or buffer, length delimited. + * Decodes a NameMappingKey message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList + * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ObjectNameMappingList.decodeDelimited = function decodeDelimited(reader) { + NameMappingKey.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ObjectNameMappingList message. + * Verifies a NameMappingKey message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ObjectNameMappingList.verify = function verify(message) { + NameMappingKey.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.nameMap != null && message.hasOwnProperty("nameMap")) { - if (!Array.isArray(message.nameMap)) - return "nameMap: array expected"; - for (var i = 0; i < message.nameMap.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.verify(message.nameMap[i]); - if (error) - return "nameMap." + error; + if (message.type != null && message.hasOwnProperty("type")) + switch (message.type) { + default: + return "type: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + break; } - } + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.relation != null && message.hasOwnProperty("relation")) + if (!$util.isString(message.relation)) + return "relation: string expected"; + if (message.attribute != null && message.hasOwnProperty("attribute")) + if (!$util.isString(message.attribute)) + return "attribute: string expected"; return null; }; /** - * Creates an ObjectNameMappingList message from a plain object. Also converts values to their respective internal types. + * Creates a NameMappingKey message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMappingList} ObjectNameMappingList + * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey */ - ObjectNameMappingList.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList) + NameMappingKey.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingKey) return object; - var message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMappingList(); - if (object.nameMap) { - if (!Array.isArray(object.nameMap)) - throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMappingList.nameMap: array expected"); - message.nameMap = []; - for (var i = 0; i < object.nameMap.length; ++i) { - if (typeof object.nameMap[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMappingList.nameMap: object expected"); - message.nameMap[i] = $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.fromObject(object.nameMap[i]); + var message = new $root.google.cloud.bigquery.migration.v2.NameMappingKey(); + switch (object.type) { + default: + if (typeof object.type === "number") { + message.type = object.type; + break; } + break; + case "TYPE_UNSPECIFIED": + case 0: + message.type = 0; + break; + case "DATABASE": + case 1: + message.type = 1; + break; + case "SCHEMA": + case 2: + message.type = 2; + break; + case "RELATION": + case 3: + message.type = 3; + break; + case "ATTRIBUTE": + case 4: + message.type = 4; + break; + case "RELATION_ALIAS": + case 5: + message.type = 5; + break; + case "ATTRIBUTE_ALIAS": + case 6: + message.type = 6; + break; + case "FUNCTION": + case 7: + message.type = 7; + break; } + if (object.database != null) + message.database = String(object.database); + if (object.schema != null) + message.schema = String(object.schema); + if (object.relation != null) + message.relation = String(object.relation); + if (object.attribute != null) + message.attribute = String(object.attribute); return message; }; /** - * Creates a plain object from an ObjectNameMappingList message. Also converts values to other types if specified. + * Creates a plain object from a NameMappingKey message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static - * @param {google.cloud.bigquery.migration.v2.ObjectNameMappingList} message ObjectNameMappingList + * @param {google.cloud.bigquery.migration.v2.NameMappingKey} message NameMappingKey * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ObjectNameMappingList.toObject = function toObject(message, options) { + NameMappingKey.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.nameMap = []; - if (message.nameMap && message.nameMap.length) { - object.nameMap = []; - for (var j = 0; j < message.nameMap.length; ++j) - object.nameMap[j] = $root.google.cloud.bigquery.migration.v2.ObjectNameMapping.toObject(message.nameMap[j], options); + if (options.defaults) { + object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; + object.database = ""; + object.schema = ""; + object.relation = ""; + object.attribute = ""; } + if (message.type != null && message.hasOwnProperty("type")) + object.type = options.enums === String ? $root.google.cloud.bigquery.migration.v2.NameMappingKey.Type[message.type] === undefined ? message.type : $root.google.cloud.bigquery.migration.v2.NameMappingKey.Type[message.type] : message.type; + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.relation != null && message.hasOwnProperty("relation")) + object.relation = message.relation; + if (message.attribute != null && message.hasOwnProperty("attribute")) + object.attribute = message.attribute; return object; }; /** - * Converts this ObjectNameMappingList to JSON. + * Converts this NameMappingKey to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @instance * @returns {Object.} JSON object */ - ObjectNameMappingList.prototype.toJSON = function toJSON() { + NameMappingKey.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ObjectNameMappingList + * Gets the default type url for NameMappingKey * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMappingList + * @memberof google.cloud.bigquery.migration.v2.NameMappingKey * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ObjectNameMappingList.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NameMappingKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ObjectNameMappingList"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NameMappingKey"; }; - return ObjectNameMappingList; + /** + * Type enum. + * @name google.cloud.bigquery.migration.v2.NameMappingKey.Type + * @enum {number} + * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value + * @property {number} DATABASE=1 DATABASE value + * @property {number} SCHEMA=2 SCHEMA value + * @property {number} RELATION=3 RELATION value + * @property {number} ATTRIBUTE=4 ATTRIBUTE value + * @property {number} RELATION_ALIAS=5 RELATION_ALIAS value + * @property {number} ATTRIBUTE_ALIAS=6 ATTRIBUTE_ALIAS value + * @property {number} FUNCTION=7 FUNCTION value + */ + NameMappingKey.Type = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DATABASE"] = 1; + values[valuesById[2] = "SCHEMA"] = 2; + values[valuesById[3] = "RELATION"] = 3; + values[valuesById[4] = "ATTRIBUTE"] = 4; + values[valuesById[5] = "RELATION_ALIAS"] = 5; + values[valuesById[6] = "ATTRIBUTE_ALIAS"] = 6; + values[valuesById[7] = "FUNCTION"] = 7; + return values; + })(); + + return NameMappingKey; })(); - v2.ObjectNameMapping = (function() { + v2.NameMappingValue = (function() { /** - * Properties of an ObjectNameMapping. + * Properties of a NameMappingValue. * @memberof google.cloud.bigquery.migration.v2 - * @interface IObjectNameMapping - * @property {google.cloud.bigquery.migration.v2.INameMappingKey|null} [source] ObjectNameMapping source - * @property {google.cloud.bigquery.migration.v2.INameMappingValue|null} [target] ObjectNameMapping target + * @interface INameMappingValue + * @property {string|null} [database] NameMappingValue database + * @property {string|null} [schema] NameMappingValue schema + * @property {string|null} [relation] NameMappingValue relation + * @property {string|null} [attribute] NameMappingValue attribute */ /** - * Constructs a new ObjectNameMapping. + * Constructs a new NameMappingValue. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents an ObjectNameMapping. - * @implements IObjectNameMapping + * @classdesc Represents a NameMappingValue. + * @implements INameMappingValue * @constructor - * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.INameMappingValue=} [properties] Properties to set */ - function ObjectNameMapping(properties) { + function NameMappingValue(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8739,91 +9948,119 @@ } /** - * ObjectNameMapping source. - * @member {google.cloud.bigquery.migration.v2.INameMappingKey|null|undefined} source - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * NameMappingValue database. + * @member {string} database + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @instance */ - ObjectNameMapping.prototype.source = null; + NameMappingValue.prototype.database = ""; /** - * ObjectNameMapping target. - * @member {google.cloud.bigquery.migration.v2.INameMappingValue|null|undefined} target - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * NameMappingValue schema. + * @member {string} schema + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @instance + */ + NameMappingValue.prototype.schema = ""; + + /** + * NameMappingValue relation. + * @member {string} relation + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @instance + */ + NameMappingValue.prototype.relation = ""; + + /** + * NameMappingValue attribute. + * @member {string} attribute + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @instance */ - ObjectNameMapping.prototype.target = null; + NameMappingValue.prototype.attribute = ""; /** - * Creates a new ObjectNameMapping instance using the specified properties. + * Creates a new NameMappingValue instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping instance + * @param {google.cloud.bigquery.migration.v2.INameMappingValue=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue instance */ - ObjectNameMapping.create = function create(properties) { - return new ObjectNameMapping(properties); + NameMappingValue.create = function create(properties) { + return new NameMappingValue(properties); }; /** - * Encodes the specified ObjectNameMapping message. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMapping.verify|verify} messages. + * Encodes the specified NameMappingValue message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingValue.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping} message ObjectNameMapping message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.INameMappingValue} message NameMappingValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectNameMapping.encode = function encode(message, writer) { + NameMappingValue.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.source != null && Object.hasOwnProperty.call(message, "source")) - $root.google.cloud.bigquery.migration.v2.NameMappingKey.encode(message.source, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.target != null && Object.hasOwnProperty.call(message, "target")) - $root.google.cloud.bigquery.migration.v2.NameMappingValue.encode(message.target, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.database != null && Object.hasOwnProperty.call(message, "database")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.database); + if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.schema); + if (message.relation != null && Object.hasOwnProperty.call(message, "relation")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.relation); + if (message.attribute != null && Object.hasOwnProperty.call(message, "attribute")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.attribute); return writer; }; /** - * Encodes the specified ObjectNameMapping message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.ObjectNameMapping.verify|verify} messages. + * Encodes the specified NameMappingValue message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingValue.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static - * @param {google.cloud.bigquery.migration.v2.IObjectNameMapping} message ObjectNameMapping message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.INameMappingValue} message NameMappingValue message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ObjectNameMapping.encodeDelimited = function encodeDelimited(message, writer) { + NameMappingValue.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an ObjectNameMapping message from the specified reader or buffer. + * Decodes a NameMappingValue message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping + * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ObjectNameMapping.decode = function decode(reader, length, error) { + NameMappingValue.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMapping(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.NameMappingValue(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.source = $root.google.cloud.bigquery.migration.v2.NameMappingKey.decode(reader, reader.uint32()); + message.database = reader.string(); break; } case 2: { - message.target = $root.google.cloud.bigquery.migration.v2.NameMappingValue.decode(reader, reader.uint32()); + message.schema = reader.string(); + break; + } + case 3: { + message.relation = reader.string(); + break; + } + case 4: { + message.attribute = reader.string(); break; } default: @@ -8835,145 +10072,150 @@ }; /** - * Decodes an ObjectNameMapping message from the specified reader or buffer, length delimited. + * Decodes a NameMappingValue message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping + * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ObjectNameMapping.decodeDelimited = function decodeDelimited(reader) { + NameMappingValue.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an ObjectNameMapping message. + * Verifies a NameMappingValue message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ObjectNameMapping.verify = function verify(message) { + NameMappingValue.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.source != null && message.hasOwnProperty("source")) { - var error = $root.google.cloud.bigquery.migration.v2.NameMappingKey.verify(message.source); - if (error) - return "source." + error; - } - if (message.target != null && message.hasOwnProperty("target")) { - var error = $root.google.cloud.bigquery.migration.v2.NameMappingValue.verify(message.target); - if (error) - return "target." + error; - } + if (message.database != null && message.hasOwnProperty("database")) + if (!$util.isString(message.database)) + return "database: string expected"; + if (message.schema != null && message.hasOwnProperty("schema")) + if (!$util.isString(message.schema)) + return "schema: string expected"; + if (message.relation != null && message.hasOwnProperty("relation")) + if (!$util.isString(message.relation)) + return "relation: string expected"; + if (message.attribute != null && message.hasOwnProperty("attribute")) + if (!$util.isString(message.attribute)) + return "attribute: string expected"; return null; }; /** - * Creates an ObjectNameMapping message from a plain object. Also converts values to their respective internal types. + * Creates a NameMappingValue message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.ObjectNameMapping} ObjectNameMapping + * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue */ - ObjectNameMapping.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.ObjectNameMapping) + NameMappingValue.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingValue) return object; - var message = new $root.google.cloud.bigquery.migration.v2.ObjectNameMapping(); - if (object.source != null) { - if (typeof object.source !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMapping.source: object expected"); - message.source = $root.google.cloud.bigquery.migration.v2.NameMappingKey.fromObject(object.source); - } - if (object.target != null) { - if (typeof object.target !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.ObjectNameMapping.target: object expected"); - message.target = $root.google.cloud.bigquery.migration.v2.NameMappingValue.fromObject(object.target); - } + var message = new $root.google.cloud.bigquery.migration.v2.NameMappingValue(); + if (object.database != null) + message.database = String(object.database); + if (object.schema != null) + message.schema = String(object.schema); + if (object.relation != null) + message.relation = String(object.relation); + if (object.attribute != null) + message.attribute = String(object.attribute); return message; }; /** - * Creates a plain object from an ObjectNameMapping message. Also converts values to other types if specified. + * Creates a plain object from a NameMappingValue message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static - * @param {google.cloud.bigquery.migration.v2.ObjectNameMapping} message ObjectNameMapping + * @param {google.cloud.bigquery.migration.v2.NameMappingValue} message NameMappingValue * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ObjectNameMapping.toObject = function toObject(message, options) { + NameMappingValue.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.source = null; - object.target = null; + object.database = ""; + object.schema = ""; + object.relation = ""; + object.attribute = ""; } - if (message.source != null && message.hasOwnProperty("source")) - object.source = $root.google.cloud.bigquery.migration.v2.NameMappingKey.toObject(message.source, options); - if (message.target != null && message.hasOwnProperty("target")) - object.target = $root.google.cloud.bigquery.migration.v2.NameMappingValue.toObject(message.target, options); + if (message.database != null && message.hasOwnProperty("database")) + object.database = message.database; + if (message.schema != null && message.hasOwnProperty("schema")) + object.schema = message.schema; + if (message.relation != null && message.hasOwnProperty("relation")) + object.relation = message.relation; + if (message.attribute != null && message.hasOwnProperty("attribute")) + object.attribute = message.attribute; return object; }; /** - * Converts this ObjectNameMapping to JSON. + * Converts this NameMappingValue to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @instance * @returns {Object.} JSON object */ - ObjectNameMapping.prototype.toJSON = function toJSON() { + NameMappingValue.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ObjectNameMapping + * Gets the default type url for NameMappingValue * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.ObjectNameMapping + * @memberof google.cloud.bigquery.migration.v2.NameMappingValue * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ObjectNameMapping.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NameMappingValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.ObjectNameMapping"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NameMappingValue"; }; - return ObjectNameMapping; + return NameMappingValue; })(); - v2.NameMappingKey = (function() { + v2.SourceEnv = (function() { /** - * Properties of a NameMappingKey. + * Properties of a SourceEnv. * @memberof google.cloud.bigquery.migration.v2 - * @interface INameMappingKey - * @property {google.cloud.bigquery.migration.v2.NameMappingKey.Type|null} [type] NameMappingKey type - * @property {string|null} [database] NameMappingKey database - * @property {string|null} [schema] NameMappingKey schema - * @property {string|null} [relation] NameMappingKey relation - * @property {string|null} [attribute] NameMappingKey attribute + * @interface ISourceEnv + * @property {string|null} [defaultDatabase] SourceEnv defaultDatabase + * @property {Array.|null} [schemaSearchPath] SourceEnv schemaSearchPath + * @property {string|null} [metadataStoreDataset] SourceEnv metadataStoreDataset */ /** - * Constructs a new NameMappingKey. + * Constructs a new SourceEnv. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a NameMappingKey. - * @implements INameMappingKey + * @classdesc Represents a SourceEnv. + * @implements ISourceEnv * @constructor - * @param {google.cloud.bigquery.migration.v2.INameMappingKey=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISourceEnv=} [properties] Properties to set */ - function NameMappingKey(properties) { + function SourceEnv(properties) { + this.schemaSearchPath = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8981,133 +10223,108 @@ } /** - * NameMappingKey type. - * @member {google.cloud.bigquery.migration.v2.NameMappingKey.Type} type - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey - * @instance - */ - NameMappingKey.prototype.type = 0; - - /** - * NameMappingKey database. - * @member {string} database - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey - * @instance - */ - NameMappingKey.prototype.database = ""; - - /** - * NameMappingKey schema. - * @member {string} schema - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * SourceEnv defaultDatabase. + * @member {string} defaultDatabase + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @instance */ - NameMappingKey.prototype.schema = ""; + SourceEnv.prototype.defaultDatabase = ""; /** - * NameMappingKey relation. - * @member {string} relation - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * SourceEnv schemaSearchPath. + * @member {Array.} schemaSearchPath + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @instance */ - NameMappingKey.prototype.relation = ""; + SourceEnv.prototype.schemaSearchPath = $util.emptyArray; /** - * NameMappingKey attribute. - * @member {string} attribute - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * SourceEnv metadataStoreDataset. + * @member {string} metadataStoreDataset + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @instance */ - NameMappingKey.prototype.attribute = ""; + SourceEnv.prototype.metadataStoreDataset = ""; /** - * Creates a new NameMappingKey instance using the specified properties. + * Creates a new SourceEnv instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingKey=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey instance + * @param {google.cloud.bigquery.migration.v2.ISourceEnv=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv instance */ - NameMappingKey.create = function create(properties) { - return new NameMappingKey(properties); + SourceEnv.create = function create(properties) { + return new SourceEnv(properties); }; /** - * Encodes the specified NameMappingKey message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingKey.verify|verify} messages. + * Encodes the specified SourceEnv message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnv.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingKey} message NameMappingKey message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISourceEnv} message SourceEnv message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NameMappingKey.encode = function encode(message, writer) { + SourceEnv.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.type); - if (message.database != null && Object.hasOwnProperty.call(message, "database")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.database); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.schema); - if (message.relation != null && Object.hasOwnProperty.call(message, "relation")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.relation); - if (message.attribute != null && Object.hasOwnProperty.call(message, "attribute")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.attribute); + if (message.defaultDatabase != null && Object.hasOwnProperty.call(message, "defaultDatabase")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultDatabase); + if (message.schemaSearchPath != null && message.schemaSearchPath.length) + for (var i = 0; i < message.schemaSearchPath.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.schemaSearchPath[i]); + if (message.metadataStoreDataset != null && Object.hasOwnProperty.call(message, "metadataStoreDataset")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.metadataStoreDataset); return writer; }; /** - * Encodes the specified NameMappingKey message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingKey.verify|verify} messages. + * Encodes the specified SourceEnv message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnv.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingKey} message NameMappingKey message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISourceEnv} message SourceEnv message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NameMappingKey.encodeDelimited = function encodeDelimited(message, writer) { + SourceEnv.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NameMappingKey message from the specified reader or buffer. + * Decodes a SourceEnv message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey + * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NameMappingKey.decode = function decode(reader, length, error) { + SourceEnv.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.NameMappingKey(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SourceEnv(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.type = reader.int32(); + message.defaultDatabase = reader.string(); break; } case 2: { - message.database = reader.string(); + if (!(message.schemaSearchPath && message.schemaSearchPath.length)) + message.schemaSearchPath = []; + message.schemaSearchPath.push(reader.string()); break; } case 3: { - message.schema = reader.string(); - break; - } - case 4: { - message.relation = reader.string(); - break; - } - case 5: { - message.attribute = reader.string(); + message.metadataStoreDataset = reader.string(); break; } default: @@ -9119,233 +10336,160 @@ }; /** - * Decodes a NameMappingKey message from the specified reader or buffer, length delimited. + * Decodes a SourceEnv message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey + * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NameMappingKey.decodeDelimited = function decodeDelimited(reader) { + SourceEnv.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NameMappingKey message. + * Verifies a SourceEnv message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NameMappingKey.verify = function verify(message) { + SourceEnv.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.type != null && message.hasOwnProperty("type")) - switch (message.type) { - default: - return "type: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - case 7: - break; - } - if (message.database != null && message.hasOwnProperty("database")) - if (!$util.isString(message.database)) - return "database: string expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.relation != null && message.hasOwnProperty("relation")) - if (!$util.isString(message.relation)) - return "relation: string expected"; - if (message.attribute != null && message.hasOwnProperty("attribute")) - if (!$util.isString(message.attribute)) - return "attribute: string expected"; + if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) + if (!$util.isString(message.defaultDatabase)) + return "defaultDatabase: string expected"; + if (message.schemaSearchPath != null && message.hasOwnProperty("schemaSearchPath")) { + if (!Array.isArray(message.schemaSearchPath)) + return "schemaSearchPath: array expected"; + for (var i = 0; i < message.schemaSearchPath.length; ++i) + if (!$util.isString(message.schemaSearchPath[i])) + return "schemaSearchPath: string[] expected"; + } + if (message.metadataStoreDataset != null && message.hasOwnProperty("metadataStoreDataset")) + if (!$util.isString(message.metadataStoreDataset)) + return "metadataStoreDataset: string expected"; return null; }; /** - * Creates a NameMappingKey message from a plain object. Also converts values to their respective internal types. + * Creates a SourceEnv message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.NameMappingKey} NameMappingKey + * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv */ - NameMappingKey.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingKey) + SourceEnv.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SourceEnv) return object; - var message = new $root.google.cloud.bigquery.migration.v2.NameMappingKey(); - switch (object.type) { - default: - if (typeof object.type === "number") { - message.type = object.type; - break; - } - break; - case "TYPE_UNSPECIFIED": - case 0: - message.type = 0; - break; - case "DATABASE": - case 1: - message.type = 1; - break; - case "SCHEMA": - case 2: - message.type = 2; - break; - case "RELATION": - case 3: - message.type = 3; - break; - case "ATTRIBUTE": - case 4: - message.type = 4; - break; - case "RELATION_ALIAS": - case 5: - message.type = 5; - break; - case "ATTRIBUTE_ALIAS": - case 6: - message.type = 6; - break; - case "FUNCTION": - case 7: - message.type = 7; - break; + var message = new $root.google.cloud.bigquery.migration.v2.SourceEnv(); + if (object.defaultDatabase != null) + message.defaultDatabase = String(object.defaultDatabase); + if (object.schemaSearchPath) { + if (!Array.isArray(object.schemaSearchPath)) + throw TypeError(".google.cloud.bigquery.migration.v2.SourceEnv.schemaSearchPath: array expected"); + message.schemaSearchPath = []; + for (var i = 0; i < object.schemaSearchPath.length; ++i) + message.schemaSearchPath[i] = String(object.schemaSearchPath[i]); } - if (object.database != null) - message.database = String(object.database); - if (object.schema != null) - message.schema = String(object.schema); - if (object.relation != null) - message.relation = String(object.relation); - if (object.attribute != null) - message.attribute = String(object.attribute); + if (object.metadataStoreDataset != null) + message.metadataStoreDataset = String(object.metadataStoreDataset); return message; }; /** - * Creates a plain object from a NameMappingKey message. Also converts values to other types if specified. + * Creates a plain object from a SourceEnv message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static - * @param {google.cloud.bigquery.migration.v2.NameMappingKey} message NameMappingKey + * @param {google.cloud.bigquery.migration.v2.SourceEnv} message SourceEnv * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NameMappingKey.toObject = function toObject(message, options) { + SourceEnv.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.schemaSearchPath = []; if (options.defaults) { - object.type = options.enums === String ? "TYPE_UNSPECIFIED" : 0; - object.database = ""; - object.schema = ""; - object.relation = ""; - object.attribute = ""; + object.defaultDatabase = ""; + object.metadataStoreDataset = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = options.enums === String ? $root.google.cloud.bigquery.migration.v2.NameMappingKey.Type[message.type] === undefined ? message.type : $root.google.cloud.bigquery.migration.v2.NameMappingKey.Type[message.type] : message.type; - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.relation != null && message.hasOwnProperty("relation")) - object.relation = message.relation; - if (message.attribute != null && message.hasOwnProperty("attribute")) - object.attribute = message.attribute; + if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) + object.defaultDatabase = message.defaultDatabase; + if (message.schemaSearchPath && message.schemaSearchPath.length) { + object.schemaSearchPath = []; + for (var j = 0; j < message.schemaSearchPath.length; ++j) + object.schemaSearchPath[j] = message.schemaSearchPath[j]; + } + if (message.metadataStoreDataset != null && message.hasOwnProperty("metadataStoreDataset")) + object.metadataStoreDataset = message.metadataStoreDataset; return object; }; /** - * Converts this NameMappingKey to JSON. + * Converts this SourceEnv to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @instance * @returns {Object.} JSON object */ - NameMappingKey.prototype.toJSON = function toJSON() { + SourceEnv.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NameMappingKey + * Gets the default type url for SourceEnv * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.NameMappingKey + * @memberof google.cloud.bigquery.migration.v2.SourceEnv * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NameMappingKey.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NameMappingKey"; - }; - - /** - * Type enum. - * @name google.cloud.bigquery.migration.v2.NameMappingKey.Type - * @enum {number} - * @property {number} TYPE_UNSPECIFIED=0 TYPE_UNSPECIFIED value - * @property {number} DATABASE=1 DATABASE value - * @property {number} SCHEMA=2 SCHEMA value - * @property {number} RELATION=3 RELATION value - * @property {number} ATTRIBUTE=4 ATTRIBUTE value - * @property {number} RELATION_ALIAS=5 RELATION_ALIAS value - * @property {number} ATTRIBUTE_ALIAS=6 ATTRIBUTE_ALIAS value - * @property {number} FUNCTION=7 FUNCTION value - */ - NameMappingKey.Type = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DATABASE"] = 1; - values[valuesById[2] = "SCHEMA"] = 2; - values[valuesById[3] = "RELATION"] = 3; - values[valuesById[4] = "ATTRIBUTE"] = 4; - values[valuesById[5] = "RELATION_ALIAS"] = 5; - values[valuesById[6] = "ATTRIBUTE_ALIAS"] = 6; - values[valuesById[7] = "FUNCTION"] = 7; - return values; - })(); + SourceEnv.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SourceEnv"; + }; - return NameMappingKey; + return SourceEnv; })(); - v2.NameMappingValue = (function() { + v2.TranslationDetails = (function() { /** - * Properties of a NameMappingValue. + * Properties of a TranslationDetails. * @memberof google.cloud.bigquery.migration.v2 - * @interface INameMappingValue - * @property {string|null} [database] NameMappingValue database - * @property {string|null} [schema] NameMappingValue schema - * @property {string|null} [relation] NameMappingValue relation - * @property {string|null} [attribute] NameMappingValue attribute + * @interface ITranslationDetails + * @property {Array.|null} [sourceTargetMapping] TranslationDetails sourceTargetMapping + * @property {string|null} [targetBaseUri] TranslationDetails targetBaseUri + * @property {google.cloud.bigquery.migration.v2.ISourceEnvironment|null} [sourceEnvironment] TranslationDetails sourceEnvironment + * @property {Array.|null} [targetReturnLiterals] TranslationDetails targetReturnLiterals + * @property {Array.|null} [targetTypes] TranslationDetails targetTypes + * @property {google.cloud.bigquery.migration.v2.ISuggestionConfig|null} [suggestionConfig] TranslationDetails suggestionConfig */ /** - * Constructs a new NameMappingValue. + * Constructs a new TranslationDetails. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a NameMappingValue. - * @implements INameMappingValue + * @classdesc Represents a TranslationDetails. + * @implements ITranslationDetails * @constructor - * @param {google.cloud.bigquery.migration.v2.INameMappingValue=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ITranslationDetails=} [properties] Properties to set */ - function NameMappingValue(properties) { + function TranslationDetails(properties) { + this.sourceTargetMapping = []; + this.targetReturnLiterals = []; + this.targetTypes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9353,119 +10497,156 @@ } /** - * NameMappingValue database. - * @member {string} database - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * TranslationDetails sourceTargetMapping. + * @member {Array.} sourceTargetMapping + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @instance */ - NameMappingValue.prototype.database = ""; + TranslationDetails.prototype.sourceTargetMapping = $util.emptyArray; /** - * NameMappingValue schema. - * @member {string} schema - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * TranslationDetails targetBaseUri. + * @member {string} targetBaseUri + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @instance */ - NameMappingValue.prototype.schema = ""; + TranslationDetails.prototype.targetBaseUri = ""; /** - * NameMappingValue relation. - * @member {string} relation - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * TranslationDetails sourceEnvironment. + * @member {google.cloud.bigquery.migration.v2.ISourceEnvironment|null|undefined} sourceEnvironment + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @instance */ - NameMappingValue.prototype.relation = ""; + TranslationDetails.prototype.sourceEnvironment = null; /** - * NameMappingValue attribute. - * @member {string} attribute - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * TranslationDetails targetReturnLiterals. + * @member {Array.} targetReturnLiterals + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @instance */ - NameMappingValue.prototype.attribute = ""; + TranslationDetails.prototype.targetReturnLiterals = $util.emptyArray; /** - * Creates a new NameMappingValue instance using the specified properties. + * TranslationDetails targetTypes. + * @member {Array.} targetTypes + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @instance + */ + TranslationDetails.prototype.targetTypes = $util.emptyArray; + + /** + * TranslationDetails suggestionConfig. + * @member {google.cloud.bigquery.migration.v2.ISuggestionConfig|null|undefined} suggestionConfig + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @instance + */ + TranslationDetails.prototype.suggestionConfig = null; + + /** + * Creates a new TranslationDetails instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingValue=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue instance + * @param {google.cloud.bigquery.migration.v2.ITranslationDetails=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails instance */ - NameMappingValue.create = function create(properties) { - return new NameMappingValue(properties); + TranslationDetails.create = function create(properties) { + return new TranslationDetails(properties); }; /** - * Encodes the specified NameMappingValue message. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingValue.verify|verify} messages. + * Encodes the specified TranslationDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationDetails.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingValue} message NameMappingValue message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITranslationDetails} message TranslationDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NameMappingValue.encode = function encode(message, writer) { + TranslationDetails.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.database != null && Object.hasOwnProperty.call(message, "database")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.database); - if (message.schema != null && Object.hasOwnProperty.call(message, "schema")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.schema); - if (message.relation != null && Object.hasOwnProperty.call(message, "relation")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.relation); - if (message.attribute != null && Object.hasOwnProperty.call(message, "attribute")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.attribute); + if (message.sourceTargetMapping != null && message.sourceTargetMapping.length) + for (var i = 0; i < message.sourceTargetMapping.length; ++i) + $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.encode(message.sourceTargetMapping[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.targetBaseUri != null && Object.hasOwnProperty.call(message, "targetBaseUri")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetBaseUri); + if (message.sourceEnvironment != null && Object.hasOwnProperty.call(message, "sourceEnvironment")) + $root.google.cloud.bigquery.migration.v2.SourceEnvironment.encode(message.sourceEnvironment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.targetReturnLiterals != null && message.targetReturnLiterals.length) + for (var i = 0; i < message.targetReturnLiterals.length; ++i) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.targetReturnLiterals[i]); + if (message.targetTypes != null && message.targetTypes.length) + for (var i = 0; i < message.targetTypes.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetTypes[i]); + if (message.suggestionConfig != null && Object.hasOwnProperty.call(message, "suggestionConfig")) + $root.google.cloud.bigquery.migration.v2.SuggestionConfig.encode(message.suggestionConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); return writer; }; /** - * Encodes the specified NameMappingValue message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.NameMappingValue.verify|verify} messages. + * Encodes the specified TranslationDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationDetails.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static - * @param {google.cloud.bigquery.migration.v2.INameMappingValue} message NameMappingValue message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ITranslationDetails} message TranslationDetails message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NameMappingValue.encodeDelimited = function encodeDelimited(message, writer) { + TranslationDetails.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NameMappingValue message from the specified reader or buffer. + * Decodes a TranslationDetails message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue + * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NameMappingValue.decode = function decode(reader, length, error) { + TranslationDetails.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.NameMappingValue(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationDetails(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.database = reader.string(); + if (!(message.sourceTargetMapping && message.sourceTargetMapping.length)) + message.sourceTargetMapping = []; + message.sourceTargetMapping.push($root.google.cloud.bigquery.migration.v2.SourceTargetMapping.decode(reader, reader.uint32())); break; } case 2: { - message.schema = reader.string(); + message.targetBaseUri = reader.string(); break; } case 3: { - message.relation = reader.string(); + message.sourceEnvironment = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.decode(reader, reader.uint32()); break; } case 4: { - message.attribute = reader.string(); + if (!(message.targetReturnLiterals && message.targetReturnLiterals.length)) + message.targetReturnLiterals = []; + message.targetReturnLiterals.push(reader.string()); + break; + } + case 5: { + if (!(message.targetTypes && message.targetTypes.length)) + message.targetTypes = []; + message.targetTypes.push(reader.string()); + break; + } + case 6: { + message.suggestionConfig = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.decode(reader, reader.uint32()); break; } default: @@ -9477,150 +10658,217 @@ }; /** - * Decodes a NameMappingValue message from the specified reader or buffer, length delimited. + * Decodes a TranslationDetails message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue + * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NameMappingValue.decodeDelimited = function decodeDelimited(reader) { + TranslationDetails.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NameMappingValue message. + * Verifies a TranslationDetails message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NameMappingValue.verify = function verify(message) { + TranslationDetails.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.database != null && message.hasOwnProperty("database")) - if (!$util.isString(message.database)) - return "database: string expected"; - if (message.schema != null && message.hasOwnProperty("schema")) - if (!$util.isString(message.schema)) - return "schema: string expected"; - if (message.relation != null && message.hasOwnProperty("relation")) - if (!$util.isString(message.relation)) - return "relation: string expected"; - if (message.attribute != null && message.hasOwnProperty("attribute")) - if (!$util.isString(message.attribute)) - return "attribute: string expected"; + if (message.sourceTargetMapping != null && message.hasOwnProperty("sourceTargetMapping")) { + if (!Array.isArray(message.sourceTargetMapping)) + return "sourceTargetMapping: array expected"; + for (var i = 0; i < message.sourceTargetMapping.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.verify(message.sourceTargetMapping[i]); + if (error) + return "sourceTargetMapping." + error; + } + } + if (message.targetBaseUri != null && message.hasOwnProperty("targetBaseUri")) + if (!$util.isString(message.targetBaseUri)) + return "targetBaseUri: string expected"; + if (message.sourceEnvironment != null && message.hasOwnProperty("sourceEnvironment")) { + var error = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.verify(message.sourceEnvironment); + if (error) + return "sourceEnvironment." + error; + } + if (message.targetReturnLiterals != null && message.hasOwnProperty("targetReturnLiterals")) { + if (!Array.isArray(message.targetReturnLiterals)) + return "targetReturnLiterals: array expected"; + for (var i = 0; i < message.targetReturnLiterals.length; ++i) + if (!$util.isString(message.targetReturnLiterals[i])) + return "targetReturnLiterals: string[] expected"; + } + if (message.targetTypes != null && message.hasOwnProperty("targetTypes")) { + if (!Array.isArray(message.targetTypes)) + return "targetTypes: array expected"; + for (var i = 0; i < message.targetTypes.length; ++i) + if (!$util.isString(message.targetTypes[i])) + return "targetTypes: string[] expected"; + } + if (message.suggestionConfig != null && message.hasOwnProperty("suggestionConfig")) { + var error = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.verify(message.suggestionConfig); + if (error) + return "suggestionConfig." + error; + } return null; }; /** - * Creates a NameMappingValue message from a plain object. Also converts values to their respective internal types. + * Creates a TranslationDetails message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.NameMappingValue} NameMappingValue + * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails */ - NameMappingValue.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.NameMappingValue) + TranslationDetails.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.TranslationDetails) return object; - var message = new $root.google.cloud.bigquery.migration.v2.NameMappingValue(); - if (object.database != null) - message.database = String(object.database); - if (object.schema != null) - message.schema = String(object.schema); - if (object.relation != null) - message.relation = String(object.relation); - if (object.attribute != null) - message.attribute = String(object.attribute); + var message = new $root.google.cloud.bigquery.migration.v2.TranslationDetails(); + if (object.sourceTargetMapping) { + if (!Array.isArray(object.sourceTargetMapping)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceTargetMapping: array expected"); + message.sourceTargetMapping = []; + for (var i = 0; i < object.sourceTargetMapping.length; ++i) { + if (typeof object.sourceTargetMapping[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceTargetMapping: object expected"); + message.sourceTargetMapping[i] = $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.fromObject(object.sourceTargetMapping[i]); + } + } + if (object.targetBaseUri != null) + message.targetBaseUri = String(object.targetBaseUri); + if (object.sourceEnvironment != null) { + if (typeof object.sourceEnvironment !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceEnvironment: object expected"); + message.sourceEnvironment = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.fromObject(object.sourceEnvironment); + } + if (object.targetReturnLiterals) { + if (!Array.isArray(object.targetReturnLiterals)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.targetReturnLiterals: array expected"); + message.targetReturnLiterals = []; + for (var i = 0; i < object.targetReturnLiterals.length; ++i) + message.targetReturnLiterals[i] = String(object.targetReturnLiterals[i]); + } + if (object.targetTypes) { + if (!Array.isArray(object.targetTypes)) + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.targetTypes: array expected"); + message.targetTypes = []; + for (var i = 0; i < object.targetTypes.length; ++i) + message.targetTypes[i] = String(object.targetTypes[i]); + } + if (object.suggestionConfig != null) { + if (typeof object.suggestionConfig !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.suggestionConfig: object expected"); + message.suggestionConfig = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.fromObject(object.suggestionConfig); + } return message; }; /** - * Creates a plain object from a NameMappingValue message. Also converts values to other types if specified. + * Creates a plain object from a TranslationDetails message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static - * @param {google.cloud.bigquery.migration.v2.NameMappingValue} message NameMappingValue + * @param {google.cloud.bigquery.migration.v2.TranslationDetails} message TranslationDetails * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NameMappingValue.toObject = function toObject(message, options) { + TranslationDetails.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.sourceTargetMapping = []; + object.targetReturnLiterals = []; + object.targetTypes = []; + } if (options.defaults) { - object.database = ""; - object.schema = ""; - object.relation = ""; - object.attribute = ""; + object.targetBaseUri = ""; + object.sourceEnvironment = null; + object.suggestionConfig = null; } - if (message.database != null && message.hasOwnProperty("database")) - object.database = message.database; - if (message.schema != null && message.hasOwnProperty("schema")) - object.schema = message.schema; - if (message.relation != null && message.hasOwnProperty("relation")) - object.relation = message.relation; - if (message.attribute != null && message.hasOwnProperty("attribute")) - object.attribute = message.attribute; + if (message.sourceTargetMapping && message.sourceTargetMapping.length) { + object.sourceTargetMapping = []; + for (var j = 0; j < message.sourceTargetMapping.length; ++j) + object.sourceTargetMapping[j] = $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.toObject(message.sourceTargetMapping[j], options); + } + if (message.targetBaseUri != null && message.hasOwnProperty("targetBaseUri")) + object.targetBaseUri = message.targetBaseUri; + if (message.sourceEnvironment != null && message.hasOwnProperty("sourceEnvironment")) + object.sourceEnvironment = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.toObject(message.sourceEnvironment, options); + if (message.targetReturnLiterals && message.targetReturnLiterals.length) { + object.targetReturnLiterals = []; + for (var j = 0; j < message.targetReturnLiterals.length; ++j) + object.targetReturnLiterals[j] = message.targetReturnLiterals[j]; + } + if (message.targetTypes && message.targetTypes.length) { + object.targetTypes = []; + for (var j = 0; j < message.targetTypes.length; ++j) + object.targetTypes[j] = message.targetTypes[j]; + } + if (message.suggestionConfig != null && message.hasOwnProperty("suggestionConfig")) + object.suggestionConfig = $root.google.cloud.bigquery.migration.v2.SuggestionConfig.toObject(message.suggestionConfig, options); return object; }; /** - * Converts this NameMappingValue to JSON. + * Converts this TranslationDetails to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @instance * @returns {Object.} JSON object */ - NameMappingValue.prototype.toJSON = function toJSON() { + TranslationDetails.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NameMappingValue + * Gets the default type url for TranslationDetails * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.NameMappingValue + * @memberof google.cloud.bigquery.migration.v2.TranslationDetails * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NameMappingValue.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TranslationDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.NameMappingValue"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TranslationDetails"; }; - return NameMappingValue; + return TranslationDetails; })(); - v2.SourceEnv = (function() { + v2.SuggestionConfig = (function() { /** - * Properties of a SourceEnv. + * Properties of a SuggestionConfig. * @memberof google.cloud.bigquery.migration.v2 - * @interface ISourceEnv - * @property {string|null} [defaultDatabase] SourceEnv defaultDatabase - * @property {Array.|null} [schemaSearchPath] SourceEnv schemaSearchPath - * @property {string|null} [metadataStoreDataset] SourceEnv metadataStoreDataset + * @interface ISuggestionConfig + * @property {Array.|null} [skipSuggestionSteps] SuggestionConfig skipSuggestionSteps */ /** - * Constructs a new SourceEnv. + * Constructs a new SuggestionConfig. * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a SourceEnv. - * @implements ISourceEnv + * @classdesc Represents a SuggestionConfig. + * @implements ISuggestionConfig * @constructor - * @param {google.cloud.bigquery.migration.v2.ISourceEnv=} [properties] Properties to set + * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig=} [properties] Properties to set */ - function SourceEnv(properties) { - this.schemaSearchPath = []; + function SuggestionConfig(properties) { + this.skipSuggestionSteps = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9628,108 +10876,80 @@ } /** - * SourceEnv defaultDatabase. - * @member {string} defaultDatabase - * @memberof google.cloud.bigquery.migration.v2.SourceEnv - * @instance - */ - SourceEnv.prototype.defaultDatabase = ""; - - /** - * SourceEnv schemaSearchPath. - * @member {Array.} schemaSearchPath - * @memberof google.cloud.bigquery.migration.v2.SourceEnv - * @instance - */ - SourceEnv.prototype.schemaSearchPath = $util.emptyArray; - - /** - * SourceEnv metadataStoreDataset. - * @member {string} metadataStoreDataset - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * SuggestionConfig skipSuggestionSteps. + * @member {Array.} skipSuggestionSteps + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @instance */ - SourceEnv.prototype.metadataStoreDataset = ""; + SuggestionConfig.prototype.skipSuggestionSteps = $util.emptyArray; /** - * Creates a new SourceEnv instance using the specified properties. + * Creates a new SuggestionConfig instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static - * @param {google.cloud.bigquery.migration.v2.ISourceEnv=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv instance + * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig instance */ - SourceEnv.create = function create(properties) { - return new SourceEnv(properties); + SuggestionConfig.create = function create(properties) { + return new SuggestionConfig(properties); }; /** - * Encodes the specified SourceEnv message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnv.verify|verify} messages. + * Encodes the specified SuggestionConfig message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static - * @param {google.cloud.bigquery.migration.v2.ISourceEnv} message SourceEnv message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig} message SuggestionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceEnv.encode = function encode(message, writer) { + SuggestionConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.defaultDatabase != null && Object.hasOwnProperty.call(message, "defaultDatabase")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.defaultDatabase); - if (message.schemaSearchPath != null && message.schemaSearchPath.length) - for (var i = 0; i < message.schemaSearchPath.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.schemaSearchPath[i]); - if (message.metadataStoreDataset != null && Object.hasOwnProperty.call(message, "metadataStoreDataset")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.metadataStoreDataset); + if (message.skipSuggestionSteps != null && message.skipSuggestionSteps.length) + for (var i = 0; i < message.skipSuggestionSteps.length; ++i) + $root.google.cloud.bigquery.migration.v2.SuggestionStep.encode(message.skipSuggestionSteps[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified SourceEnv message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SourceEnv.verify|verify} messages. + * Encodes the specified SuggestionConfig message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static - * @param {google.cloud.bigquery.migration.v2.ISourceEnv} message SourceEnv message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISuggestionConfig} message SuggestionConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SourceEnv.encodeDelimited = function encodeDelimited(message, writer) { + SuggestionConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SourceEnv message from the specified reader or buffer. + * Decodes a SuggestionConfig message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv + * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceEnv.decode = function decode(reader, length, error) { + SuggestionConfig.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SourceEnv(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SuggestionConfig(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - message.defaultDatabase = reader.string(); - break; - } - case 2: { - if (!(message.schemaSearchPath && message.schemaSearchPath.length)) - message.schemaSearchPath = []; - message.schemaSearchPath.push(reader.string()); - break; - } - case 3: { - message.metadataStoreDataset = reader.string(); + if (!(message.skipSuggestionSteps && message.skipSuggestionSteps.length)) + message.skipSuggestionSteps = []; + message.skipSuggestionSteps.push($root.google.cloud.bigquery.migration.v2.SuggestionStep.decode(reader, reader.uint32())); break; } default: @@ -9741,302 +10961,232 @@ }; /** - * Decodes a SourceEnv message from the specified reader or buffer, length delimited. + * Decodes a SuggestionConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv + * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SourceEnv.decodeDelimited = function decodeDelimited(reader) { + SuggestionConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SourceEnv message. + * Verifies a SuggestionConfig message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SourceEnv.verify = function verify(message) { + SuggestionConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) - if (!$util.isString(message.defaultDatabase)) - return "defaultDatabase: string expected"; - if (message.schemaSearchPath != null && message.hasOwnProperty("schemaSearchPath")) { - if (!Array.isArray(message.schemaSearchPath)) - return "schemaSearchPath: array expected"; - for (var i = 0; i < message.schemaSearchPath.length; ++i) - if (!$util.isString(message.schemaSearchPath[i])) - return "schemaSearchPath: string[] expected"; + if (message.skipSuggestionSteps != null && message.hasOwnProperty("skipSuggestionSteps")) { + if (!Array.isArray(message.skipSuggestionSteps)) + return "skipSuggestionSteps: array expected"; + for (var i = 0; i < message.skipSuggestionSteps.length; ++i) { + var error = $root.google.cloud.bigquery.migration.v2.SuggestionStep.verify(message.skipSuggestionSteps[i]); + if (error) + return "skipSuggestionSteps." + error; + } } - if (message.metadataStoreDataset != null && message.hasOwnProperty("metadataStoreDataset")) - if (!$util.isString(message.metadataStoreDataset)) - return "metadataStoreDataset: string expected"; return null; }; /** - * Creates a SourceEnv message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestionConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.SourceEnv} SourceEnv + * @returns {google.cloud.bigquery.migration.v2.SuggestionConfig} SuggestionConfig */ - SourceEnv.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.SourceEnv) + SuggestionConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SuggestionConfig) return object; - var message = new $root.google.cloud.bigquery.migration.v2.SourceEnv(); - if (object.defaultDatabase != null) - message.defaultDatabase = String(object.defaultDatabase); - if (object.schemaSearchPath) { - if (!Array.isArray(object.schemaSearchPath)) - throw TypeError(".google.cloud.bigquery.migration.v2.SourceEnv.schemaSearchPath: array expected"); - message.schemaSearchPath = []; - for (var i = 0; i < object.schemaSearchPath.length; ++i) - message.schemaSearchPath[i] = String(object.schemaSearchPath[i]); + var message = new $root.google.cloud.bigquery.migration.v2.SuggestionConfig(); + if (object.skipSuggestionSteps) { + if (!Array.isArray(object.skipSuggestionSteps)) + throw TypeError(".google.cloud.bigquery.migration.v2.SuggestionConfig.skipSuggestionSteps: array expected"); + message.skipSuggestionSteps = []; + for (var i = 0; i < object.skipSuggestionSteps.length; ++i) { + if (typeof object.skipSuggestionSteps[i] !== "object") + throw TypeError(".google.cloud.bigquery.migration.v2.SuggestionConfig.skipSuggestionSteps: object expected"); + message.skipSuggestionSteps[i] = $root.google.cloud.bigquery.migration.v2.SuggestionStep.fromObject(object.skipSuggestionSteps[i]); + } } - if (object.metadataStoreDataset != null) - message.metadataStoreDataset = String(object.metadataStoreDataset); return message; }; /** - * Creates a plain object from a SourceEnv message. Also converts values to other types if specified. + * Creates a plain object from a SuggestionConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @static - * @param {google.cloud.bigquery.migration.v2.SourceEnv} message SourceEnv + * @param {google.cloud.bigquery.migration.v2.SuggestionConfig} message SuggestionConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SourceEnv.toObject = function toObject(message, options) { + SuggestionConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.schemaSearchPath = []; - if (options.defaults) { - object.defaultDatabase = ""; - object.metadataStoreDataset = ""; + object.skipSuggestionSteps = []; + if (message.skipSuggestionSteps && message.skipSuggestionSteps.length) { + object.skipSuggestionSteps = []; + for (var j = 0; j < message.skipSuggestionSteps.length; ++j) + object.skipSuggestionSteps[j] = $root.google.cloud.bigquery.migration.v2.SuggestionStep.toObject(message.skipSuggestionSteps[j], options); } - if (message.defaultDatabase != null && message.hasOwnProperty("defaultDatabase")) - object.defaultDatabase = message.defaultDatabase; - if (message.schemaSearchPath && message.schemaSearchPath.length) { - object.schemaSearchPath = []; - for (var j = 0; j < message.schemaSearchPath.length; ++j) - object.schemaSearchPath[j] = message.schemaSearchPath[j]; - } - if (message.metadataStoreDataset != null && message.hasOwnProperty("metadataStoreDataset")) - object.metadataStoreDataset = message.metadataStoreDataset; return object; }; /** - * Converts this SourceEnv to JSON. + * Converts this SuggestionConfig to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.SourceEnv + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig * @instance * @returns {Object.} JSON object */ - SourceEnv.prototype.toJSON = function toJSON() { + SuggestionConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SourceEnv + * Gets the default type url for SuggestionConfig * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.SourceEnv - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - SourceEnv.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SourceEnv"; - }; - - return SourceEnv; - })(); - - v2.TranslationDetails = (function() { - - /** - * Properties of a TranslationDetails. - * @memberof google.cloud.bigquery.migration.v2 - * @interface ITranslationDetails - * @property {Array.|null} [sourceTargetMapping] TranslationDetails sourceTargetMapping - * @property {string|null} [targetBaseUri] TranslationDetails targetBaseUri - * @property {google.cloud.bigquery.migration.v2.ISourceEnvironment|null} [sourceEnvironment] TranslationDetails sourceEnvironment - * @property {Array.|null} [targetReturnLiterals] TranslationDetails targetReturnLiterals - * @property {Array.|null} [targetTypes] TranslationDetails targetTypes - */ - - /** - * Constructs a new TranslationDetails. - * @memberof google.cloud.bigquery.migration.v2 - * @classdesc Represents a TranslationDetails. - * @implements ITranslationDetails - * @constructor - * @param {google.cloud.bigquery.migration.v2.ITranslationDetails=} [properties] Properties to set - */ - function TranslationDetails(properties) { - this.sourceTargetMapping = []; - this.targetReturnLiterals = []; - this.targetTypes = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * TranslationDetails sourceTargetMapping. - * @member {Array.} sourceTargetMapping - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails - * @instance + * @memberof google.cloud.bigquery.migration.v2.SuggestionConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ - TranslationDetails.prototype.sourceTargetMapping = $util.emptyArray; + SuggestionConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SuggestionConfig"; + }; + + return SuggestionConfig; + })(); + + v2.SuggestionStep = (function() { /** - * TranslationDetails targetBaseUri. - * @member {string} targetBaseUri - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails - * @instance + * Properties of a SuggestionStep. + * @memberof google.cloud.bigquery.migration.v2 + * @interface ISuggestionStep + * @property {google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType|null} [suggestionType] SuggestionStep suggestionType + * @property {google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget|null} [rewriteTarget] SuggestionStep rewriteTarget */ - TranslationDetails.prototype.targetBaseUri = ""; /** - * TranslationDetails sourceEnvironment. - * @member {google.cloud.bigquery.migration.v2.ISourceEnvironment|null|undefined} sourceEnvironment - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails - * @instance + * Constructs a new SuggestionStep. + * @memberof google.cloud.bigquery.migration.v2 + * @classdesc Represents a SuggestionStep. + * @implements ISuggestionStep + * @constructor + * @param {google.cloud.bigquery.migration.v2.ISuggestionStep=} [properties] Properties to set */ - TranslationDetails.prototype.sourceEnvironment = null; + function SuggestionStep(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * TranslationDetails targetReturnLiterals. - * @member {Array.} targetReturnLiterals - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * SuggestionStep suggestionType. + * @member {google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType} suggestionType + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @instance */ - TranslationDetails.prototype.targetReturnLiterals = $util.emptyArray; + SuggestionStep.prototype.suggestionType = 0; /** - * TranslationDetails targetTypes. - * @member {Array.} targetTypes - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * SuggestionStep rewriteTarget. + * @member {google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget} rewriteTarget + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @instance */ - TranslationDetails.prototype.targetTypes = $util.emptyArray; + SuggestionStep.prototype.rewriteTarget = 0; /** - * Creates a new TranslationDetails instance using the specified properties. + * Creates a new SuggestionStep instance using the specified properties. * @function create - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationDetails=} [properties] Properties to set - * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails instance + * @param {google.cloud.bigquery.migration.v2.ISuggestionStep=} [properties] Properties to set + * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep instance */ - TranslationDetails.create = function create(properties) { - return new TranslationDetails(properties); + SuggestionStep.create = function create(properties) { + return new SuggestionStep(properties); }; /** - * Encodes the specified TranslationDetails message. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationDetails.verify|verify} messages. + * Encodes the specified SuggestionStep message. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. * @function encode - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationDetails} message TranslationDetails message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISuggestionStep} message SuggestionStep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationDetails.encode = function encode(message, writer) { + SuggestionStep.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.sourceTargetMapping != null && message.sourceTargetMapping.length) - for (var i = 0; i < message.sourceTargetMapping.length; ++i) - $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.encode(message.sourceTargetMapping[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.targetBaseUri != null && Object.hasOwnProperty.call(message, "targetBaseUri")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.targetBaseUri); - if (message.sourceEnvironment != null && Object.hasOwnProperty.call(message, "sourceEnvironment")) - $root.google.cloud.bigquery.migration.v2.SourceEnvironment.encode(message.sourceEnvironment, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.targetReturnLiterals != null && message.targetReturnLiterals.length) - for (var i = 0; i < message.targetReturnLiterals.length; ++i) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.targetReturnLiterals[i]); - if (message.targetTypes != null && message.targetTypes.length) - for (var i = 0; i < message.targetTypes.length; ++i) - writer.uint32(/* id 5, wireType 2 =*/42).string(message.targetTypes[i]); + if (message.suggestionType != null && Object.hasOwnProperty.call(message, "suggestionType")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.suggestionType); + if (message.rewriteTarget != null && Object.hasOwnProperty.call(message, "rewriteTarget")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.rewriteTarget); return writer; }; /** - * Encodes the specified TranslationDetails message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.TranslationDetails.verify|verify} messages. + * Encodes the specified SuggestionStep message, length delimited. Does not implicitly {@link google.cloud.bigquery.migration.v2.SuggestionStep.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static - * @param {google.cloud.bigquery.migration.v2.ITranslationDetails} message TranslationDetails message or plain object to encode + * @param {google.cloud.bigquery.migration.v2.ISuggestionStep} message SuggestionStep message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TranslationDetails.encodeDelimited = function encodeDelimited(message, writer) { + SuggestionStep.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TranslationDetails message from the specified reader or buffer. + * Decodes a SuggestionStep message from the specified reader or buffer. * @function decode - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails + * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationDetails.decode = function decode(reader, length, error) { + SuggestionStep.decode = function decode(reader, length, error) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.TranslationDetails(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.bigquery.migration.v2.SuggestionStep(); while (reader.pos < end) { var tag = reader.uint32(); if (tag === error) break; switch (tag >>> 3) { case 1: { - if (!(message.sourceTargetMapping && message.sourceTargetMapping.length)) - message.sourceTargetMapping = []; - message.sourceTargetMapping.push($root.google.cloud.bigquery.migration.v2.SourceTargetMapping.decode(reader, reader.uint32())); + message.suggestionType = reader.int32(); break; } case 2: { - message.targetBaseUri = reader.string(); - break; - } - case 3: { - message.sourceEnvironment = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.decode(reader, reader.uint32()); - break; - } - case 4: { - if (!(message.targetReturnLiterals && message.targetReturnLiterals.length)) - message.targetReturnLiterals = []; - message.targetReturnLiterals.push(reader.string()); - break; - } - case 5: { - if (!(message.targetTypes && message.targetTypes.length)) - message.targetTypes = []; - message.targetTypes.push(reader.string()); + message.rewriteTarget = reader.int32(); break; } default: @@ -10048,183 +11198,191 @@ }; /** - * Decodes a TranslationDetails message from the specified reader or buffer, length delimited. + * Decodes a SuggestionStep message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails + * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TranslationDetails.decodeDelimited = function decodeDelimited(reader) { + SuggestionStep.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TranslationDetails message. + * Verifies a SuggestionStep message. * @function verify - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TranslationDetails.verify = function verify(message) { + SuggestionStep.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.sourceTargetMapping != null && message.hasOwnProperty("sourceTargetMapping")) { - if (!Array.isArray(message.sourceTargetMapping)) - return "sourceTargetMapping: array expected"; - for (var i = 0; i < message.sourceTargetMapping.length; ++i) { - var error = $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.verify(message.sourceTargetMapping[i]); - if (error) - return "sourceTargetMapping." + error; + if (message.suggestionType != null && message.hasOwnProperty("suggestionType")) + switch (message.suggestionType) { + default: + return "suggestionType: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.rewriteTarget != null && message.hasOwnProperty("rewriteTarget")) + switch (message.rewriteTarget) { + default: + return "rewriteTarget: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - if (message.targetBaseUri != null && message.hasOwnProperty("targetBaseUri")) - if (!$util.isString(message.targetBaseUri)) - return "targetBaseUri: string expected"; - if (message.sourceEnvironment != null && message.hasOwnProperty("sourceEnvironment")) { - var error = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.verify(message.sourceEnvironment); - if (error) - return "sourceEnvironment." + error; - } - if (message.targetReturnLiterals != null && message.hasOwnProperty("targetReturnLiterals")) { - if (!Array.isArray(message.targetReturnLiterals)) - return "targetReturnLiterals: array expected"; - for (var i = 0; i < message.targetReturnLiterals.length; ++i) - if (!$util.isString(message.targetReturnLiterals[i])) - return "targetReturnLiterals: string[] expected"; - } - if (message.targetTypes != null && message.hasOwnProperty("targetTypes")) { - if (!Array.isArray(message.targetTypes)) - return "targetTypes: array expected"; - for (var i = 0; i < message.targetTypes.length; ++i) - if (!$util.isString(message.targetTypes[i])) - return "targetTypes: string[] expected"; - } return null; }; /** - * Creates a TranslationDetails message from a plain object. Also converts values to their respective internal types. + * Creates a SuggestionStep message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static * @param {Object.} object Plain object - * @returns {google.cloud.bigquery.migration.v2.TranslationDetails} TranslationDetails + * @returns {google.cloud.bigquery.migration.v2.SuggestionStep} SuggestionStep */ - TranslationDetails.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.bigquery.migration.v2.TranslationDetails) + SuggestionStep.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.bigquery.migration.v2.SuggestionStep) return object; - var message = new $root.google.cloud.bigquery.migration.v2.TranslationDetails(); - if (object.sourceTargetMapping) { - if (!Array.isArray(object.sourceTargetMapping)) - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceTargetMapping: array expected"); - message.sourceTargetMapping = []; - for (var i = 0; i < object.sourceTargetMapping.length; ++i) { - if (typeof object.sourceTargetMapping[i] !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceTargetMapping: object expected"); - message.sourceTargetMapping[i] = $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.fromObject(object.sourceTargetMapping[i]); + var message = new $root.google.cloud.bigquery.migration.v2.SuggestionStep(); + switch (object.suggestionType) { + default: + if (typeof object.suggestionType === "number") { + message.suggestionType = object.suggestionType; + break; } + break; + case "SUGGESTION_TYPE_UNSPECIFIED": + case 0: + message.suggestionType = 0; + break; + case "QUERY_CUSTOMIZATION": + case 1: + message.suggestionType = 1; + break; + case "TRANSLATION_EXPLANATION": + case 2: + message.suggestionType = 2; + break; } - if (object.targetBaseUri != null) - message.targetBaseUri = String(object.targetBaseUri); - if (object.sourceEnvironment != null) { - if (typeof object.sourceEnvironment !== "object") - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.sourceEnvironment: object expected"); - message.sourceEnvironment = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.fromObject(object.sourceEnvironment); - } - if (object.targetReturnLiterals) { - if (!Array.isArray(object.targetReturnLiterals)) - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.targetReturnLiterals: array expected"); - message.targetReturnLiterals = []; - for (var i = 0; i < object.targetReturnLiterals.length; ++i) - message.targetReturnLiterals[i] = String(object.targetReturnLiterals[i]); - } - if (object.targetTypes) { - if (!Array.isArray(object.targetTypes)) - throw TypeError(".google.cloud.bigquery.migration.v2.TranslationDetails.targetTypes: array expected"); - message.targetTypes = []; - for (var i = 0; i < object.targetTypes.length; ++i) - message.targetTypes[i] = String(object.targetTypes[i]); + switch (object.rewriteTarget) { + default: + if (typeof object.rewriteTarget === "number") { + message.rewriteTarget = object.rewriteTarget; + break; + } + break; + case "REWRITE_TARGET_UNSPECIFIED": + case 0: + message.rewriteTarget = 0; + break; + case "SOURCE_SQL": + case 1: + message.rewriteTarget = 1; + break; + case "TARGET_SQL": + case 2: + message.rewriteTarget = 2; + break; } return message; }; /** - * Creates a plain object from a TranslationDetails message. Also converts values to other types if specified. + * Creates a plain object from a SuggestionStep message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static - * @param {google.cloud.bigquery.migration.v2.TranslationDetails} message TranslationDetails + * @param {google.cloud.bigquery.migration.v2.SuggestionStep} message SuggestionStep * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TranslationDetails.toObject = function toObject(message, options) { + SuggestionStep.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.sourceTargetMapping = []; - object.targetReturnLiterals = []; - object.targetTypes = []; - } if (options.defaults) { - object.targetBaseUri = ""; - object.sourceEnvironment = null; - } - if (message.sourceTargetMapping && message.sourceTargetMapping.length) { - object.sourceTargetMapping = []; - for (var j = 0; j < message.sourceTargetMapping.length; ++j) - object.sourceTargetMapping[j] = $root.google.cloud.bigquery.migration.v2.SourceTargetMapping.toObject(message.sourceTargetMapping[j], options); - } - if (message.targetBaseUri != null && message.hasOwnProperty("targetBaseUri")) - object.targetBaseUri = message.targetBaseUri; - if (message.sourceEnvironment != null && message.hasOwnProperty("sourceEnvironment")) - object.sourceEnvironment = $root.google.cloud.bigquery.migration.v2.SourceEnvironment.toObject(message.sourceEnvironment, options); - if (message.targetReturnLiterals && message.targetReturnLiterals.length) { - object.targetReturnLiterals = []; - for (var j = 0; j < message.targetReturnLiterals.length; ++j) - object.targetReturnLiterals[j] = message.targetReturnLiterals[j]; - } - if (message.targetTypes && message.targetTypes.length) { - object.targetTypes = []; - for (var j = 0; j < message.targetTypes.length; ++j) - object.targetTypes[j] = message.targetTypes[j]; + object.suggestionType = options.enums === String ? "SUGGESTION_TYPE_UNSPECIFIED" : 0; + object.rewriteTarget = options.enums === String ? "REWRITE_TARGET_UNSPECIFIED" : 0; } + if (message.suggestionType != null && message.hasOwnProperty("suggestionType")) + object.suggestionType = options.enums === String ? $root.google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType[message.suggestionType] === undefined ? message.suggestionType : $root.google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType[message.suggestionType] : message.suggestionType; + if (message.rewriteTarget != null && message.hasOwnProperty("rewriteTarget")) + object.rewriteTarget = options.enums === String ? $root.google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget[message.rewriteTarget] === undefined ? message.rewriteTarget : $root.google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget[message.rewriteTarget] : message.rewriteTarget; return object; }; /** - * Converts this TranslationDetails to JSON. + * Converts this SuggestionStep to JSON. * @function toJSON - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @instance * @returns {Object.} JSON object */ - TranslationDetails.prototype.toJSON = function toJSON() { + SuggestionStep.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TranslationDetails + * Gets the default type url for SuggestionStep * @function getTypeUrl - * @memberof google.cloud.bigquery.migration.v2.TranslationDetails + * @memberof google.cloud.bigquery.migration.v2.SuggestionStep * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TranslationDetails.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + SuggestionStep.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.TranslationDetails"; + return typeUrlPrefix + "/google.cloud.bigquery.migration.v2.SuggestionStep"; }; - return TranslationDetails; + /** + * SuggestionType enum. + * @name google.cloud.bigquery.migration.v2.SuggestionStep.SuggestionType + * @enum {number} + * @property {number} SUGGESTION_TYPE_UNSPECIFIED=0 SUGGESTION_TYPE_UNSPECIFIED value + * @property {number} QUERY_CUSTOMIZATION=1 QUERY_CUSTOMIZATION value + * @property {number} TRANSLATION_EXPLANATION=2 TRANSLATION_EXPLANATION value + */ + SuggestionStep.SuggestionType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "SUGGESTION_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "QUERY_CUSTOMIZATION"] = 1; + values[valuesById[2] = "TRANSLATION_EXPLANATION"] = 2; + return values; + })(); + + /** + * RewriteTarget enum. + * @name google.cloud.bigquery.migration.v2.SuggestionStep.RewriteTarget + * @enum {number} + * @property {number} REWRITE_TARGET_UNSPECIFIED=0 REWRITE_TARGET_UNSPECIFIED value + * @property {number} SOURCE_SQL=1 SOURCE_SQL value + * @property {number} TARGET_SQL=2 TARGET_SQL value + */ + SuggestionStep.RewriteTarget = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "REWRITE_TARGET_UNSPECIFIED"] = 0; + values[valuesById[1] = "SOURCE_SQL"] = 1; + values[valuesById[2] = "TARGET_SQL"] = 2; + return values; + })(); + + return SuggestionStep; })(); v2.SourceTargetMapping = (function() { @@ -10474,6 +11632,7 @@ * @interface ISourceSpec * @property {string|null} [baseUri] SourceSpec baseUri * @property {google.cloud.bigquery.migration.v2.ILiteral|null} [literal] SourceSpec literal + * @property {string|null} [gcsFilePath] SourceSpec gcsFilePath * @property {string|null} [encoding] SourceSpec encoding */ @@ -10508,6 +11667,14 @@ */ SourceSpec.prototype.literal = null; + /** + * SourceSpec gcsFilePath. + * @member {string|null|undefined} gcsFilePath + * @memberof google.cloud.bigquery.migration.v2.SourceSpec + * @instance + */ + SourceSpec.prototype.gcsFilePath = null; + /** * SourceSpec encoding. * @member {string} encoding @@ -10521,12 +11688,12 @@ /** * SourceSpec source. - * @member {"baseUri"|"literal"|undefined} source + * @member {"baseUri"|"literal"|"gcsFilePath"|undefined} source * @memberof google.cloud.bigquery.migration.v2.SourceSpec * @instance */ Object.defineProperty(SourceSpec.prototype, "source", { - get: $util.oneOfGetter($oneOfFields = ["baseUri", "literal"]), + get: $util.oneOfGetter($oneOfFields = ["baseUri", "literal", "gcsFilePath"]), set: $util.oneOfSetter($oneOfFields) }); @@ -10560,6 +11727,8 @@ $root.google.cloud.bigquery.migration.v2.Literal.encode(message.literal, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.encoding != null && Object.hasOwnProperty.call(message, "encoding")) writer.uint32(/* id 3, wireType 2 =*/26).string(message.encoding); + if (message.gcsFilePath != null && Object.hasOwnProperty.call(message, "gcsFilePath")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.gcsFilePath); return writer; }; @@ -10604,6 +11773,10 @@ message.literal = $root.google.cloud.bigquery.migration.v2.Literal.decode(reader, reader.uint32()); break; } + case 4: { + message.gcsFilePath = reader.string(); + break; + } case 3: { message.encoding = reader.string(); break; @@ -10659,6 +11832,13 @@ return "literal." + error; } } + if (message.gcsFilePath != null && message.hasOwnProperty("gcsFilePath")) { + if (properties.source === 1) + return "source: multiple values"; + properties.source = 1; + if (!$util.isString(message.gcsFilePath)) + return "gcsFilePath: string expected"; + } if (message.encoding != null && message.hasOwnProperty("encoding")) if (!$util.isString(message.encoding)) return "encoding: string expected"; @@ -10684,6 +11864,8 @@ throw TypeError(".google.cloud.bigquery.migration.v2.SourceSpec.literal: object expected"); message.literal = $root.google.cloud.bigquery.migration.v2.Literal.fromObject(object.literal); } + if (object.gcsFilePath != null) + message.gcsFilePath = String(object.gcsFilePath); if (object.encoding != null) message.encoding = String(object.encoding); return message; @@ -10716,6 +11898,11 @@ } if (message.encoding != null && message.hasOwnProperty("encoding")) object.encoding = message.encoding; + if (message.gcsFilePath != null && message.hasOwnProperty("gcsFilePath")) { + object.gcsFilePath = message.gcsFilePath; + if (options.oneofs) + object.source = "gcsFilePath"; + } return object; }; diff --git a/packages/google-cloud-bigquery-migration/protos/protos.json b/packages/google-cloud-bigquery-migration/protos/protos.json index a87e79928823..47c7fc1c94c6 100644 --- a/packages/google-cloud-bigquery-migration/protos/protos.json +++ b/packages/google-cloud-bigquery-migration/protos/protos.json @@ -18,6 +18,72 @@ "php_namespace": "Google\\Cloud\\BigQuery\\Migration\\V2" }, "nested": { + "AssessmentTaskDetails": { + "oneofs": { + "_featureHandle": { + "oneof": [ + "featureHandle" + ] + } + }, + "fields": { + "inputPath": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "outputDataset": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "querylogsPath": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "dataSource": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "featureHandle": { + "type": "AssessmentFeatureHandle", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, + "AssessmentFeatureHandle": { + "oneofs": { + "_addShareableDataset": { + "oneof": [ + "addShareableDataset" + ] + } + }, + "fields": { + "addShareableDataset": { + "type": "bool", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + } + } + }, "MigrationWorkflow": { "options": { "(google.api.resource).type": "bigquerymigration.googleapis.com/MigrationWorkflow", @@ -49,11 +115,17 @@ }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 4 + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "lastUpdateTime": { "type": "google.protobuf.Timestamp", - "id": 5 + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -72,12 +144,17 @@ "oneofs": { "taskDetails": { "oneof": [ + "assessmentTaskDetails", "translationConfigDetails", "translationDetails" ] } }, "fields": { + "assessmentTaskDetails": { + "type": "AssessmentTaskDetails", + "id": 12 + }, "translationConfigDetails": { "type": "TranslationConfigDetails", "id": 14 @@ -113,11 +190,17 @@ }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 6 + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "lastUpdateTime": { "type": "google.protobuf.Timestamp", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "resourceErrorDetails": { "rule": "repeated", @@ -129,12 +212,18 @@ }, "resourceErrorCount": { "type": "int32", - "id": 18 + "id": 18, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "metrics": { "rule": "repeated", "type": "TimeSeries", - "id": 19 + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "taskResult": { "type": "MigrationTaskResult", @@ -145,11 +234,17 @@ }, "totalProcessingErrorCount": { "type": "int32", - "id": 21 + "id": 21, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "totalResourceErrorCount": { "type": "int32", - "id": 22 + "id": 22, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -211,20 +306,32 @@ }, "resourceErrorCount": { "type": "int32", - "id": 13 + "id": 13, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "createTime": { "type": "google.protobuf.Timestamp", - "id": 7 + "id": 7, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "lastUpdateTime": { "type": "google.protobuf.Timestamp", - "id": 8 + "id": 8, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } }, "metrics": { "rule": "repeated", "type": "TimeSeries", - "id": 11 + "id": 11, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } } }, "nested": { @@ -267,6 +374,10 @@ "rule": "repeated", "type": "GcsReportLogMessage", "id": 2 + }, + "consoleUri": { + "type": "string", + "id": 3 } } }, @@ -767,6 +878,47 @@ "rule": "repeated", "type": "string", "id": 5 + }, + "suggestionConfig": { + "type": "SuggestionConfig", + "id": 6 + } + } + }, + "SuggestionConfig": { + "fields": { + "skipSuggestionSteps": { + "rule": "repeated", + "type": "SuggestionStep", + "id": 1 + } + } + }, + "SuggestionStep": { + "fields": { + "suggestionType": { + "type": "SuggestionType", + "id": 1 + }, + "rewriteTarget": { + "type": "RewriteTarget", + "id": 2 + } + }, + "nested": { + "SuggestionType": { + "values": { + "SUGGESTION_TYPE_UNSPECIFIED": 0, + "QUERY_CUSTOMIZATION": 1, + "TRANSLATION_EXPLANATION": 2 + } + }, + "RewriteTarget": { + "values": { + "REWRITE_TARGET_UNSPECIFIED": 0, + "SOURCE_SQL": 1, + "TARGET_SQL": 2 + } } } }, @@ -787,7 +939,8 @@ "source": { "oneof": [ "baseUri", - "literal" + "literal", + "gcsFilePath" ] } }, @@ -800,6 +953,10 @@ "type": "Literal", "id": 2 }, + "gcsFilePath": { + "type": "string", + "id": 4 + }, "encoding": { "type": "string", "id": 3, diff --git a/packages/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json b/packages/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json index b8cc943ce510..7dc6828feb59 100644 --- a/packages/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json +++ b/packages/google-cloud-bigquery-migration/src/v2/migration_service_proto_list.json @@ -1,4 +1,5 @@ [ + "../../protos/google/cloud/bigquery/migration/v2/assessment_task.proto", "../../protos/google/cloud/bigquery/migration/v2/migration_entities.proto", "../../protos/google/cloud/bigquery/migration/v2/migration_error_details.proto", "../../protos/google/cloud/bigquery/migration/v2/migration_metrics.proto",